Two_Number_Sum

The Idea here is, to write a function that takes Two Arguments,
1)First Argument an Array of Numbers
2) Second arrgument is an Integer targetSum
Find Two Numbers in the Array that When You add them up, You get The Integer targetSum
if no numbers found that match the targetSum, then return an Emplty String

Two_Number_Sum_Method1.js

First I created an Object Called numbers, and it will hold a value Boolean Key to an Index,
then I Created a Variable Called PotintialMatch,
Here potintialMatch changes depending on each number in the Array
and checks if the PotintialMatch Is found in the array
If found, then Return [potintialMatch, Number]; Else if not found Then Assign true to numbers[number], and move to the next Value
if the Array Reaches the end and doesn't find a match, it just returns an empty array.
Here the Time complicity of this Method is O(N) Times , and O(n) Space , WHere n is the size of the array.

Two_Number_Sum_Method2.js

for Method two , I created Two variables(left, right) , the first one is equal to Zero,
and the second one is equal to the last Element of the array (array.length-1).
Two_Number_Sum_Method1

Inside a while Loop That chackes if (left < right)
then we check if left + right is equal to targetSum
if yes, return both left and right,
if not equal , Checks if (right + left) < target
then add 1 to left , if not add one to right
and here what is doing and moving both pointers towards the middle of he array, untill it find the answer
Here the Time complicity of this Method is O(nlog(n)) Times , and O(1) Space , WHere n is the size of the array.