sam-tripathi / Defeat-JAVA

It is a repositry consisting of java tutorials,projects, Data Structures and Algorithm, Roadmap Questions and Problems with Solution . Building a FREE Resources for java learners
17 stars 61 forks source link

Longest consecutive sequence #158

Closed kfayazuddin closed 1 year ago

kfayazuddin commented 1 year ago

Here i have solved the question of longest consecutive sequence using Hashmap where using arrays it its Time complexity O(n^2) Here implementing this through HashMap O(n)

Solved the issue #141