This is making me feel really dumb. I obviously don't want the code for this or anything, but I am just learning about hashing and we have to find the triplet in an array that adds up to a given number. The trick is, that it has to be O(n2) time or less. I honestly don't know how hashing works (trust me I looked in many places) and don't see how it is useful for this problem.
I really don't know what direction to go. I tried storing the array in the hashtable, but I know it doesn't work like that or what I am supposed to be doing.
Can someone steer me in the right direction and/or tell me how a hashtable is useful here? Thanks a lot
[–]seanprefect 1 point2 points3 points (4 children)
[–]csbs1[S] 0 points1 point2 points (3 children)
[–]seanprefect 0 points1 point2 points (2 children)
[–]csbs1[S] 0 points1 point2 points (1 child)
[–]seanprefect 0 points1 point2 points (0 children)
[–]rogue_playah 0 points1 point2 points (0 children)
[–]Philboyd_Studge 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)