BhanukaUOM / Data-Structures-and-Algorithms

Data Structures and Algorithms in Java and Python 3
MIT License
4 stars 9 forks source link

hashmap implementation instead of traversing array #12

Closed ghost closed 5 years ago

ghost commented 5 years ago

Generally we traverse the array when we have to find the sum at two different indexes in an array this increases the time complexity but in this example we have reduced the complexity by using hashmap.