Posts by LexFreitas • 1 point
1 post
-
-4
votes2
answers114
viewsA: Most efficient algorithm to find indices of the 2 elements of a list whose sum is equal to a certain value
You should put the list in order, which allows you to do a binary search that performs better than linear search. So you go through the list, taking a portion at a time. With this portion you can…