amritansh22 / Data-Structures-and-Algorithms-in-cpp

This repository is in development phase and will soon provide you with c++ code of various data structures and algorithms
MIT License
369 stars 341 forks source link

update Two_sum.cpp #493

Closed shashank-556 closed 3 years ago

shashank-556 commented 3 years ago

Updated Two_sum.cpp file to return the indices of two numbers (if exist) with a target sum even in an unsorted array . The worst case time complexity of program is practically still O(n)

welcome[bot] commented 3 years ago

Thanks for opening this pull request! Please be sure that you have checked out our contributing guidelines.

amritansh22 commented 3 years ago

Thanks for opening this pull request. Please star this repository to show your support, In the meantime I am reviewing the code.

shashank-556 commented 3 years ago

@amritansh22 Please review my code and let me know if there is any mistake .

welcome[bot] commented 3 years ago

Congrats on merging your first pull request! We are proud of you!

amritansh22 commented 3 years ago

@shashank-556 Thanks a lot for opening this pull request.