LeetCode 01xx
LeetCode problems 100–199
LeetCode 01xx
| # | Problem | Difficulty | Time | Notes |
|---|---|---|---|---|
| 100 | Same Tree | 🟢 Easy | 1m 39s | The problem asks us to determine whether two binary trees are exact… |
| 101 | Symmetric Tree | 🟢 Easy | 1m 25s | The problem asks us to determine whether a binary tree is symmetric… |
| 102 | Binary Tree Level Order Traversal | 🟡 Medium | 1m 30s | The problem asks us to perform a level order traversal on a binary … |
| 103 | Binary Tree Zigzag Level Order Traversal | 🟡 Medium | 1h 33m | The problem asks us to perform a level order traversal of a binary … |
| 104 | Maximum Depth of Binary Tree | 🟢 Easy | 2m 53s | The problem asks us to determine the maximum depth of a binary tree… |
| 105 | Construct Binary Tree from Preorder and Inorder Traversal | 🟡 Medium | 59s | The problem is asking us to reconstruct a binary tree given two tra… |
| 106 | Construct Binary Tree from Inorder and Postorder Traversal | 🟡 Medium | 1m 9s | The problem provides two traversal orders of the same binary tree: … |
| 107 | Binary Tree Level Order Traversal II | 🟡 Medium | 36s | The problem asks us to traverse a binary tree and return the node v… |
| 108 | Convert Sorted Array to Binary Search Tree | 🟢 Easy | 1m 22s | The problem gives us a sorted integer array nums in strictly increa… |
| 109 | Convert Sorted List to Binary Search Tree | 🟡 Medium | 1m 20s | The problem gives us the head of a singly linked list whose values … |
| 110 | Balanced Binary Tree | 🟢 Easy | 1m 11s | This problem asks us to determine whether a given binary tree is he… |
| 111 | Minimum Depth of Binary Tree | 🟢 Easy | 37s | The problem asks us to determine the minimum depth of a binary tree… |
| 112 | Path Sum | 🟢 Easy | 1m 9s | This problem asks us to determine whether a binary tree contains at… |
| 113 | Path Sum II | 🟡 Medium | 1m 17s | This problem asks us to find all root-to-leaf paths in a binary tre… |
| 114 | Flatten Binary Tree to Linked List | 🟡 Medium | 1m 11s | The problem asks us to transform a binary tree into a flattened str… |
| 115 | Distinct Subsequences | 🔴 Hard | 1m 30s | This problem asks us to count how many distinct subsequences of a s… |
| 116 | Populating Next Right Pointers in Each Node | 🟡 Medium | 53s | This problem asks us to populate the next pointers of nodes in a pe… |
| 117 | Populating Next Right Pointers in Each Node II | 🟡 Medium | 1m 8s | The problem asks us to populate the next pointer for every node in … |
| 118 | Pascal's Triangle | 🟢 Easy | 40s | The problem is asking us to generate the first numRows of Pascal's … |
| 119 | Pascal's Triangle II | 🟢 Easy | 59s | This problem asks us to return a specific row from Pascal's Triangl… |
| 120 | Triangle | 🟡 Medium | 1m 24s | The problem gives us a triangular array of integers and asks us to … |
| 121 | Best Time to Buy and Sell Stock | 🟢 Easy | 56s | This problem asks us to determine the maximum profit that can be ma… |
| 122 | Best Time to Buy and Sell Stock II | 🟡 Medium | 1m 2s | This problem asks us to maximize profit from stock trading over a s… |
| 123 | Best Time to Buy and Sell Stock III | 🔴 Hard | 46s | The problem asks us to determine the maximum profit we can earn fro… |
| 124 | Binary Tree Maximum Path Sum | 🔴 Hard | 49s | The problem is asking us to find the maximum path sum in a binary t… |
| 125 | Valid Palindrome | 🟢 Easy | 53s | This problem asks us to determine whether a given string is a palin… |
| 126 | Word Ladder II | 🔴 Hard | 1m 22s | This problem asks us to find all shortest transformation sequences … |
| 127 | Word Ladder | 🔴 Hard | 1m 19s | This problem asks us to determine the length of the shortest transf… |
| 128 | Longest Consecutive Sequence | 🟡 Medium | 59s | The problem asks us to find the length of the longest sequence of c… |
| 129 | Sum Root to Leaf Numbers | 🟡 Medium | 1m 8s | The problem gives us the root of a binary tree where every node con… |
| 130 | Surrounded Regions | 🟡 Medium | 1m 13s | The problem gives us a two dimensional grid called board, where eac… |
| 131 | Palindrome Partitioning | 🟡 Medium | 1m 11s | The problem gives us a string s and asks us to divide it into subst… |
| 132 | Palindrome Partitioning II | 🔴 Hard | 1m 41s | The problem asks us to split a string into substrings such that eve… |
| 133 | Clone Graph | 🟡 Medium | 1m 27s | This problem asks us to create a deep copy of an undirected connect… |
| 134 | Gas Station | 🟡 Medium | 1m 14s | The problem describes a circular route containing n gas stations. A… |
| 135 | Candy | 🔴 Hard | 1m 16s | This problem asks us to distribute candies to children standing in … |
| 136 | Single Number | 🟢 Easy | 1m 2s | The problem gives an integer array nums where every value appears e… |
| 137 | Single Number II | 🟡 Medium | 34s | This problem asks us to find a unique number in an array where ever… |
| 138 | Copy List with Random Pointer | 🟡 Medium | 1m 25s | This problem asks us to create a completely independent copy of a l… |
| 139 | Word Break | 🟡 Medium | 39s | The problem asks us to determine whether a given string s can be br… |
| 140 | Word Break II | 🔴 Hard | 49s | The problem asks us to segment a given string s into all possible s… |
| 141 | Linked List Cycle | 🟢 Easy | 1m 12s | This problem asks us to determine whether a singly linked list cont… |
| 142 | Linked List Cycle II | 🟡 Medium | 1m 6s | This problem asks us to determine whether a singly linked list cont… |
| 143 | Reorder List | 🟡 Medium | 1m 34s | The problem gives us the head of a singly linked list and asks us t… |
| 144 | Binary Tree Preorder Traversal | 🟢 Easy | 1m 35s | This problem asks us to return the preorder traversal of a binary t… |
| 145 | Binary Tree Postorder Traversal | 🟢 Easy | 1m 26s | The problem asks us to return the postorder traversal of a binary t… |
| 146 | LRU Cache | 🟡 Medium | 1m 24s | The problem asks us to design an efficient cache that follows the L… |
| 147 | Insertion Sort List | 🟡 Medium | 1m 23s | The problem asks us to sort a singly linked list using the insertio… |
| 148 | Sort List | 🟡 Medium | 1m 11s | The problem asks us to sort a singly linked list in ascending order… |
| 149 | Max Points on a Line | 🔴 Hard | 1m 43s | The problem gives us a list of points on a 2D coordinate plane. Eac… |
| 150 | Evaluate Reverse Polish Notation | 🟡 Medium | 1m 18s | This problem asks us to evaluate an arithmetic expression written i… |
| 151 | Reverse Words in a String | 🟡 Medium | 33s | The problem asks us to take a string s containing words separated b… |
| 152 | Maximum Product Subarray | 🟡 Medium | 1m 12s | The problem asks us to find the contiguous subarray within an integ… |
| 153 | Find Minimum in Rotated Sorted Array | 🟡 Medium | 1m | This problem asks us to find the smallest element in a sorted array… |
| 154 | Find Minimum in Rotated Sorted Array II | 🔴 Hard | 1m 1s | This problem asks us to find the minimum value in a sorted array th… |
| 155 | Min Stack | 🟡 Medium | 1m 5s | The problem asks us to design a custom stack data structure that be… |
| 156 | Binary Tree Upside Down | 🟡 Medium | 32s | The problem asks us to transform a binary tree into its "upside-dow… |
| 157 | Read N Characters Given Read4 | 🟢 Easy | 1m 13s | This problem asks us to implement a read function using a restricte… |
| 158 | Read N Characters Given read4 II - Call Multiple Times | 🔴 Hard | 1m 1s | This problem asks us to implement a read(buf, n) function using a r… |
| 159 | Longest Substring with At Most Two Distinct Characters | 🟡 Medium | 1m 12s | The problem asks us to find the length of the longest contiguous su… |
| 160 | Intersection of Two Linked Lists | 🟢 Easy | 1m 21s | This problem asks us to determine whether two singly linked lists s… |
| 161 | One Edit Distance | 🟡 Medium | 1m 7s | The problem asks us to determine whether two strings are exactly on… |
| 162 | Find Peak Element | 🟡 Medium | 1m 10s | The problem gives us an integer array nums and asks us to find the … |
| 163 | Missing Ranges | 🟢 Easy | 1m 11s | This problem gives us three inputs: - A sorted array nums - A lower… |
| 164 | Maximum Gap | 🟡 Medium | 1m 11s | The problem asks us to compute the largest difference between two c… |
| 165 | Compare Version Numbers | 🟡 Medium | 59s | This problem asks us to compare two software version numbers repres… |
| 166 | Fraction to Recurring Decimal | 🟡 Medium | 1m 5s | This problem asks us to convert a fraction, represented by an integ… |
| 167 | Two Sum II - Input Array Is Sorted | 🟡 Medium | 1m 1s | This problem gives us a sorted, 1-indexed array of integers called … |
| 168 | Excel Sheet Column Title | 🟢 Easy | 1m 23s | The problem asks us to convert a positive integer into the column n… |
| 169 | Majority Element | 🟢 Easy | 30s | The problem asks us to identify the majority element in a given arr… |
| 170 | Two Sum III - Data structure design | 🟢 Easy | 1m 6s | The problem asks us to design a data structure that supports two op… |
| 171 | Excel Sheet Column Number | 🟢 Easy | 1m 3s | This problem asks us to convert an Excel-style column title into it… |
| 172 | Factorial Trailing Zeroes | 🟡 Medium | 1m 36s | The problem asks us to determine how many trailing zeroes appear at… |
| 173 | Binary Search Tree Iterator | 🟡 Medium | 56s | It looks like your prompt accidentally concatenated two problems. I… |
| 174 | Dungeon Game | 🔴 Hard | 1m 10s | This problem asks us to determine the minimum initial health a knig… |
| 175 | Combine Two Tables | 🟢 Easy | 46s | The problem is asking us to combine two relational database tables,… |
| 176 | Second Highest Salary | 🟡 Medium | 2m 36s | This problem asks us to retrieve the second highest distinct salary… |
| 177 | Nth Highest Salary | 🟡 Medium | 1m 12s | This problem asks us to write a SQL function that returns the nth h… |
| 178 | Rank Scores | 🟡 Medium | 1m 17s | The problem gives us a database table named Scores that contains tw… |
| 179 | Largest Number | 🟡 Medium | 1m 18s | This problem asks us to rearrange a list of non-negative integers s… |
| 180 | Consecutive Numbers | 🟡 Medium | 41s | This problem asks us to find numbers in a table that appear at leas… |
| 181 | Employees Earning More Than Their Managers | 🟢 Easy | 1m 15s | This problem gives us a single database table named Employee. Each … |
| 182 | Duplicate Emails | 🟢 Easy | 2m 51s | The problem gives us a database table named Person with two columns… |
| 183 | Customers Who Never Order | 🟢 Easy | 31s | This problem is asking us to identify all customers from a Customer… |
| 184 | Department Highest Salary | 🟡 Medium | 39s | The problem asks us to find employees with the highest salary in ea… |
| 185 | Department Top Three Salaries | 🔴 Hard | 1m 12s | This is a SQL database problem where we need to identify the employ… |
| 186 | Reverse Words in a String II | 🟡 Medium | 39s | The problem asks us to reverse the order of words in a character ar… |
| 187 | Repeated DNA Sequences | 🟡 Medium | 53s | This problem asks us to find all repeated DNA subsequences of a fix… |
| 188 | Best Time to Buy and Sell Stock IV | 🔴 Hard | 39s | This problem asks us to maximize the profit from stock trading unde… |
| 189 | Rotate Array | 🟡 Medium | 50s | The problem asks us to rotate a given integer array nums to the rig… |
| 190 | Reverse Bits | 🟢 Easy | 56s | The problem asks us to reverse the binary representation of a 32-bi… |
| 191 | Number of 1 Bits | 🟢 Easy | 53s | The problem asks us to count how many bits are set to 1 in the bina… |
| 192 | Word Frequency | 🟡 Medium | 2m 21s | This problem asks us to write a shell script that reads a text file… |
| 193 | Valid Phone Numbers | 🟢 Easy | 1m 27s | This problem asks us to process a text file named file.txt and prin… |
| 194 | Transpose File | 🟡 Medium | 1m 6s | This problem asks us to transpose the contents of a text file. Tran… |
| 195 | Tenth Line | 🟢 Easy | 52s | This problem asks us to print exactly the 10th line from a text fil… |
| 196 | Delete Duplicate Emails | 🟢 Easy | 52s | This problem provides a database table named Person with two column… |
| 197 | Rising Temperature | 🟢 Easy | 3m 42s | The problem gives us a database table named Weather that stores dai… |
| 198 | House Robber | 🟡 Medium | 3m 4s | The problem describes a row of houses, where each house contains so… |
| 199 | Binary Tree Right Side View | 🟡 Medium | 1m 34s | The problem gives us the root node of a binary tree and asks us to … |