Hi just saw the findSum question in java script. Which sounds like a twoSum issue. I was wondering why you didn’t show the solution which can be done in O(n) which is to build a dictionary.
The key of this dictionary would be the complement value that is needed for a specific number to add up to the target and the value would be the number.
as we iterate through the array we fill up the dictionary checking whether the value in the array exists as the key in the dictionary,
If there is a match we have a key and value that add up to be the target value