Leetcode Leetcode Questions Practice Click on difficulty buttons (Easy, Medium, Hard) or Tags or company to filter that category problems only. # Title Sol Companies Difficulty Time Space Tags 1 Two Sum O(nlogn) O(1) Array, Hash Table 2 Add Two Numbers O(max(m,n)) O(1) Linked List, Math, Recursion 5 Longest Palindromic Substring O(n²) O(n²) String, DP 20 Valid Parentheses O(n) O(n) String, Stack 21 Merge Two Sorted Lists O(n) O(n) Linked List, Recursion 23 Merge K Sorted Lists O(nlogk) O(n) Linked List, Divide And Conquer, Priority Queue, Merge Sort 42 Trapping Rain Water O(n) O(1) Array, Two Pointers, DP, Stack 127 Word Ladder O(nm²) O(nm) BFS, Hash Table, String 138 Copy List With Random Pointers O(n) O(1) Hash Table, Linked List 146 LRU Cache O(1) O(1) Hash Table, Linked List, Design, Doubly Linked List 200 Number Of Islands O(mn) O(min(m,n)) Array, BFS, DFS, Matrix, Union Find 295 Find Median From Data Stream O(logn) O(n) Two Pointers, Design, Sorting, Priority Queue, Data Stream 297 Serialize And Deserialize Binary Tree O(n) O(n) String, Tree, Dfs, Bfs, Design, Binary Tree 692 Top K Frequent Words O(nlogn) O(n) Hash Table, String, Trie, Sorting, Priority Queue, Bucket Sort, Counting 763 Partition Labels O(n) O(n) Hash Table, Two Pointers, String, Greedy 819 Most Common Word O(n+m) O(n+m) Hash Table, String 937 Reorder Data In Log Files O(nlogn) O(n) Array, String, Sorting 973 K Closest Points To Origin O(nlogn) O(n) Array, Math, Divide And Conquer, Geometry, Sorting, Priority Queue, Quick Select 994 Rotting Oranges O(mn) O(mn) Array, BFS, Matrix 1192 Critical Connections In A Network O(E+V) O(E+V) DFS, Graph, Biconnected Components