Leetcode's two sum problem's solution in rust

Kindly review the code the hardway , to optimize and make it efficient.
Stackoverflow link of my code


Create a hashmap of target - Vec. Then, instead of iterating through the Vec in the inner loop, just lookup in the hashMap and see if it's Some vs None.


This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.