Skip to content

Latest commit

 

History

History

Queue

  1. First Non Repeating Letter Problem.
    Question
    Solution
    Command:-

    $ go run 1.first-non-repeating-letter-solution.go
    Method TimeComplexity SpaceComplexity Source
    Map and Queue O(N) O(N) Link
  2. LRU Cache in O(N) TC Problem.
    Question
    Solution
    Command:-

    $ go run 2.lru-cache-in-o(n)-solution.go
    Method TimeComplexity SpaceComplexity Source
    Map and Queue O(N) O(1) Link
    Map and List with Prev and Next Pointer O(1) O(1) Link