Skip to content

sagar0207/Deep-Dive-Java

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Deep-Dive-Java

Collections of solved top interview questions

All algorithms implemented in Java

These implementations are pure logic. There are many implementations of questions on the World Wide Web, that are much better for performance reasons.

Note

Some of the solutions may contains the function only.

Guidelines

Add approach, time complexity and space complexity of accepted code in description while submitting/updating the solution file.

Questions

  1. Best Time to Buy and Sell Stock with Cooldown.
  2. Validate Binary Search Tree.
  3. Next Permutation.
  4. Number of Islands.
  5. Same Tree.
  6. Flatten Binary Tree to Linked List.
  7. Merge Sort:Counting Inversions.
  8. Continuous Subarray Sum.
  9. Find the Celebrity.
  10. Lowest Common Ancestor of a Binary Search Tree.
  11. Lowest Common Ancestor of a Binary Tree.
  12. Convert Sorted Array to Binary Search Tree.
  13. The Skyline Problem.
  14. Valid Sudoku.
  15. Kth Smallest Element in a Sorted Matrix.
  16. Game of Life.
  17. LRU cache.
  18. Longest Palindromic Substring.
  19. Longest Substring Without Repeating Characters.
  20. 3Sum.
  21. Copy List with Random Pointer.
  22. Merge k Sorted Lists.
  23. Product of Array Except Self.
  24. Serialize and Deserialize Binary Tree.
  25. Symmetric Tree.
  26. Binary Tree Zigzag Level Order Traversal.
  27. Online Stock Span.
  28. Course Schedule.
  29. Decode String.
  30. Is Graph Bipartite?.
  31. Graph Valid Tree.
  32. Shuffle an Array.
  33. Partition List.
  34. Closest Leaf in a Binary Tree.
  35. Course Schedule II.
  36. Basic Calculator II.
  37. Jump Game.
  38. Jump Game II.
  39. Walls and gates.
  40. Unique Paths II.
  41. Add Two Numbers II.
  42. Search in Rotated Sorted Array II.
  43. Path Sum II.
  44. Fruit Into Baskets.
  45. Delete and earn.
  46. Design Twitter.
  47. Meeting Room II.
  48. Friend Circles.
  49. Number of Connected Components in an Undirected Graph.