ELI5 - Hash Tables

help

I am working on a practice problem on coderbyte what asks for a return of all the pairs of elements in an array of numbers that sum to the largest number in the array. I got it to work using a nested for loop, but the solution on the site says its better to use a hash table. I am having trouble understanding what a hash table is though and how I would implement it in this case. Help?

Posted May 15, 2016, 7:41 PM UTC

77
Loading comments…