-
Count of Smaller Numbers After Self - MergeSort based concise solution
Array
Binary Indexed Tree
Binary Search
C++
Divide and Conquer
Hard
Merge Sort
Ordered Set
Segment Tree
-
Largest Submatrix With Rearrangements - Permute histogram bars to maximize area
Array
C++
Greedy
Matrix
Medium
Sorting
-
Diagonal Traverse II - Short and clean five lines of code using TreeMap
Array
C++
Heap (Priority Queue)
Medium
Ordered Map
Sorting
-
Bus Routes - BFS solution with intuition
Array
Breadth-First Search
C++
Hard
Hash Table
-
Design Graph With Shortest Path Calculator - Dijkstra and Floyd-Warshall both solutions with intuition
C++
Design
Graph
Hard
Heap (Priority Queue)
Shortest Path
-
Restore the Array From Adjacent Pairs - Create graph and run DFS
Array
C++
Depth-First Search
Hash Table
Java
Medium
-
Count Nodes Equal to Average of Subtree - Simple recursion in O(n) TC
Binary Tree
C++
Depth-First Search
Medium
Recursion
Tree
-
Find Mode in Binary Search Tree - Two solutions: O(h) space and O(1) space
Binary Search Tree
Binary Tree
C++
Depth-First Search
Easy
Iterator
Tree