LeetCode 1ย - Two Sum
Intuition
Approach
Complexity
Solution
ย ย ย ย ย ย if num in remaining_values.keys():
ย ย ย ย ย ย ย ย j = remaining_values[num]
ย ย ย ย ย ย ย ย return [i, j]
ย ย ย ย ย ย remaining_values[target - num] = i

@adityadedhia
Polymath, founder, and undergrad. I love to think, write, and build paradigm-breaking software. Here I share important ideas at the cutting edge and cross-section of philosophy, economics, management, computing, and the future.
reageer op bericht