LogiQuest

Data Structures

Arrays, strings, stacks, queues, hash maps, trees and graphs.

156 problems

StatusTitleDifficulty
1. Two SumEasy
2. Valid ParenthesesEasy
3. Next Greater ElementMedium
4. Sliding Window MaximumHard
5. Element FrequencyEasy
6. Shortest Path in a GraphMedium
7. Number of IslandsMedium
8. Merge IntervalsMedium
9. Top K Frequent ElementsMedium
10. Valid AnagramEasy
11. First Unique CharacterEasy
12. Move ZeroesEasy
13. Rotate ArrayEasy
14. Product of Array Except SelfMedium
15. Set OperationsEasy
16. Sum of ArrayEasy
17. Minimum and MaximumEasy
18. Reverse an ArrayEasy
19. Second Largest Distinct ElementEasy
20. Count Even and OddEasy
21. Prefix SumsEasy
22. Range Sum QueriesMedium
23. Left RotationEasy
24. Remove Duplicates from Sorted ArrayEasy
25. Merge Two Sorted ArraysEasy
26. Negatives Before PositivesEasy
27. Leaders in an ArrayEasy
28. Equilibrium IndexMedium
29. Max Consecutive OnesEasy
30. Missing and RepeatingMedium
31. Best Subarray with BoundsMedium
32. Product ModuloEasy
33. Pair with Given DifferenceMedium
34. Count Pairs with SumMedium
35. Subarrays with Sum KMedium
36. Longest Subarray with Sum KMedium
37. Maximum Sum WindowEasy
38. Shortest Subarray with Sum ≥ SMedium
39. Count InversionsHard
40. Elements More Than n/3 TimesMedium
41. Stock SpanMedium
42. Sort 0s, 1s and 2sEasy
43. Next PermutationMedium
44. Alternate Positive and NegativeMedium
45. Find a Peak ElementMedium
46. Intersection of Two ArraysEasy
47. Union of Two ArraysEasy
48. Sort by FrequencyMedium
49. First Repeating ElementEasy
50. Zig-Zag ArrangementMedium
51. Minimum PlatformsMedium
52. Chocolate DistributionEasy
53. Maximum Product of TwoEasy
54. Distinct Elements in Every WindowMedium
55. Contains DuplicateEasy
56. Nearby DuplicateEasy
57. Longest Consecutive SequenceMedium
58. Top K Frequent WordsMedium
59. Valid SudokuMedium
60. Zero-Sum Subarray Exists?Easy
61. Count Distinct ValuesEasy
62. Four Arrays Zero SumMedium
63. Pairs with Equal Digit SumMedium
64. Distinct Pairs with SumMedium
65. First Unique After Each StepMedium
66. Stack OperationsEasy
67. Queue OperationsEasy
68. Min StackMedium
69. Evaluate Postfix ExpressionMedium
70. Infix to PostfixMedium
71. Next Greater Element (Circular)Medium
72. Largest Rectangle in a HistogramHard
73. Remove K DigitsMedium
74. Asteroid CollisionMedium
75. Sliding Window MinimumMedium
76. Decode StringMedium
77. Simplify Unix PathMedium
78. Minimum Brackets to AddMedium
79. Longest Valid ParenthesesHard
80. First Negative in Every WindowEasy
81. Binary Numbers 1 to NEasy
82. The CelebrityMedium
83. Shortest Path (Unweighted)Easy
84. Connected ComponentsEasy
85. Cycle in an Undirected GraphMedium
86. Cycle in a Directed GraphMedium
87. Topological OrderMedium
88. Shortest Path (Weighted)Medium
89. Minimum Spanning TreeMedium
90. Is the Graph Bipartite?Medium
91. Diameter of a TreeMedium
92. Tree Height from Parent ArrayEasy
93. Friend CirclesEasy
94. Rotting OrangesMedium
95. Count Regions of Same ColourEasy
96. Word LadderHard
97. Lowest Common AncestorHard
98. Paths in a DAGMedium
99. Knight's Shortest PathMedium
100. Transpose a MatrixEasy
101. Add Two MatricesEasy
102. Multiply Two MatricesMedium
103. Rotate Matrix 90° ClockwiseMedium
104. Spiral OrderMedium
105. Spiral Matrix GeneratorMedium
106. Diagonal DifferenceEasy
107. Row with Maximum SumEasy
108. Set Matrix ZeroesMedium
109. Search a Sorted MatrixMedium
110. Sub-matrix Sum QueriesMedium
111. Island PerimeterEasy
112. Negatives in a Sorted MatrixEasy
113. Toeplitz MatrixEasy
114. Game of Life — One StepMedium
115. Row with Most OnesEasy
116. Running MedianHard
117. LRU CacheMedium
118. Reverse a Linked ListEasy
119. Middle of a Linked ListEasy
120. Remove N-th Node from EndMedium
121. Merge Two Sorted ListsEasy
122. Palindrome Linked ListEasy
123. Remove Duplicates from Sorted ListEasy
124. Rotate List RightMedium
125. Add Two Numbers as ListsMedium
126. Partition ListMedium
127. Odd-Even Linked ListMedium
128. Swap Nodes in PairsMedium
129. Reverse Nodes in K-GroupsHard
130. Inorder TraversalEasy
131. Preorder TraversalEasy
132. Postorder TraversalEasy
133. Level Order by LinesEasy
134. Zigzag Level OrderMedium
135. Maximum Depth of a Binary TreeEasy
136. Minimum DepthEasy
137. Count and Sum of NodesEasy
138. Count LeavesEasy
139. Symmetric TreeEasy
140. Height-Balanced TreeEasy
141. Diameter of a Binary TreeEasy
142. Root-to-Leaf Path SumEasy
143. Validate a BSTMedium
144. K-th Smallest in a BSTMedium
145. LCA in a BSTEasy
146. Build a BST by InsertionEasy
147. Range Sum of a BSTEasy
148. Right Side ViewMedium
149. Left Side ViewEasy
150. Level Sums and Widest LevelMedium
151. Same TreeEasy
152. K Largest ElementsEasy
153. Merge K Sorted ListsHard
154. Connect Ropes at Minimum CostMedium
155. K-th Largest in a StreamMedium
156. Task SchedulerMedium

156 of 156 problems