#Program NamePatternTimeSpaceKey IdeaLevel
1twoSumHashMapO(n)O(n)For each number, check if its complement already exists in a map.Simple
2productExceptSelfPrefix / SuffixO(n)O(1)Precompute left product array then multiply right product in reverse in-place.Middle
3maxSubarrayKadane's AlgorithmO(n)O(1)Keep a running sum; reset to current element whenever sum drops below it.Simple