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