├── 2024 └── README.md ├── 2025 ├── 10.Sliding_window_2_pointer.md.txt ├── 11.Heaps.md.txt ├── 12.Greedy.md.txt ├── 13.Binary_tree.md.txt ├── 14.BST.md.txt ├── 15.Graphs.md ├── 16.DP.md.txt ├── 17.Tries.md.txt ├── 2.Sorting.md.txt ├── 3.Array.md.txt ├── 4.Binary_search.md.txt ├── 5.string.md.txt ├── 6.Linked_list.md.txt ├── 7.Recursion.md.txt ├── 8.Bit_manipulation.md.txt ├── 9.stack_queue.md.txt └── readme.md ├── .gitignore ├── 0.Embedded_Coding_Questions ├── 1. Question_2.md ├── 2.Question_3.md ├── 3.Question_4.md └── README.md ├── 2024-Interval └── README.md ├── 2024-Union-Find └── README.md ├── LICENSE ├── README.md └── google_alltime.csv /.gitignore: -------------------------------------------------------------------------------- 1 | # Prerequisites 2 | *.d 3 | 4 | # Compiled Object files 5 | *.slo 6 | *.lo 7 | *.o 8 | *.obj 9 | 10 | # Precompiled Headers 11 | *.gch 12 | *.pch 13 | 14 | # Compiled Dynamic libraries 15 | *.so 16 | *.dylib 17 | *.dll 18 | 19 | # Fortran module files 20 | *.mod 21 | *.smod 22 | 23 | # Compiled Static libraries 24 | *.lai 25 | *.la 26 | *.a 27 | *.lib 28 | 29 | # Executables 30 | *.exe 31 | *.out 32 | *.app 33 | -------------------------------------------------------------------------------- /0.Embedded_Coding_Questions/1. Question_2.md: -------------------------------------------------------------------------------- 1 | 2 | # Design aligned Malloc fucntion 3 | Designing an aligned malloc-like function in the Linux kernel involves allocating memory with a specified alignment. This is not the same as user-space malloc; instead, in the kernel, you typically use functions like kmalloc, kzalloc, vmalloc, etc., depending on your requirements. 4 | 5 | However, kmalloc() in the kernel does support power-of-two alignment up to the size of the allocation. For more control, especially if you need a specific alignment (e.g., 64-byte, 4KB, etc.), you’ll need to implement your own aligned allocator. 6 | 7 | ✅ Use Case: Custom aligned_malloc() in Linux Kernel 8 | 9 | 🎯 Goal: 10 | Implement a kernel function that: 11 | 12 | - Allocates a memory buffer of size size 13 | - Ensures the buffer is aligned to alignment bytes (must be a power of 2) 14 | - Returns the pointer 15 | - Frees properly when needed 16 | 17 | ## void *aligned_malloc(size_t size, size_t alignment); 18 | Example = aligned_malloc(100,7); 19 | - 1003=malloc(100); ❌ 20 | - 1007 / 1014/ 1021 ---> malloc(100); 21 | 22 | 23 | ```c++ 24 | #include 25 | #include 26 | #include 27 | 28 | // Aligned malloc implementation 29 | void *aligned_malloc(size_t size, size_t alignment) { 30 | if (alignment == 0 || (alignment & (alignment - 1)) != 0) { 31 | // Alignment must be a power of 2 32 | return NULL; 33 | } 34 | 35 | void *raw = malloc(size + alignment - 1 + sizeof(void*)); 36 | if (!raw) return NULL; 37 | 38 | uintptr_t raw_addr = (uintptr_t)raw + sizeof(void*); 39 | uintptr_t aligned_addr = (raw_addr + alignment - 1) & ~(uintptr_t)(alignment - 1); 40 | 41 | ((void**)aligned_addr)[-1] = raw; 42 | 43 | return (void*)aligned_addr; 44 | } 45 | 46 | // Free aligned memory 47 | void aligned_free(void *ptr) { 48 | if (ptr) { 49 | free(((void**)ptr)[-1]); 50 | } 51 | } 52 | ``` 53 | -------------------------------------------------------------------------------- /0.Embedded_Coding_Questions/2.Question_3.md: -------------------------------------------------------------------------------- 1 | ## Simulate how a DMA engine works by copying data from source to destination without CPU intervention. 2 | 3 | write a program that behaves like a DMA controller. 4 | 5 | That means: 6 | 7 | - The CPU triggers a DMA-like function (e.g., dma_transfer(src, dest, size)). 8 | - This function copies data from src to dest. 9 | - You can simulate it happening in the background using threads. 10 | 11 | ✅ Key Points for Simulation 12 | - Use a separate thread to perform the copy (simulate DMA engine). 13 | - Main thread can continue doing other work (simulate CPU working independently). 14 | - After the DMA thread finishes, you can verify the data was copied. 15 | 16 | 17 | - `src`: An array of data. 18 | - `dest`: Another array (initially empty). 19 | - `dma_transfer()`: Simulated function using a thread to copy data. 20 | - Main thread does something else (like printing messages) while the copy happens. 21 | 22 | 23 | ```c++ 24 | #include 25 | #include 26 | #include 27 | #include 28 | #include 29 | 30 | typedef struct { 31 | void *src; 32 | void *dest; 33 | size_t size; 34 | } DMA_Transfer; 35 | 36 | void* dma_thread(void* arg) { 37 | DMA_Transfer *dma = (DMA_Transfer*)arg; 38 | printf("DMA: Starting data transfer...\n"); 39 | memcpy(dma->dest, dma->src, dma->size); // Simulate DMA copying data 40 | printf("DMA: Data transfer complete!\n"); 41 | return NULL; 42 | } 43 | 44 | // Simulated DMA API 45 | void dma_transfer(void* src, void* dest, size_t size) { 46 | pthread_t tid; 47 | DMA_Transfer *dma = malloc(sizeof(DMA_Transfer)); 48 | dma->src = src; 49 | dma->dest = dest; 50 | dma->size = size; 51 | 52 | pthread_create(&tid, NULL, dma_thread, dma); 53 | pthread_detach(tid); // Let it run independently (simulate background work) 54 | } 55 | 56 | int main() { 57 | const int size = 10; 58 | int src[size], dest[size]; 59 | 60 | // Initialize source data 61 | for (int i = 0; i < size; ++i) 62 | src[i] = i * 10; 63 | 64 | // Clear destination 65 | memset(dest, 0, sizeof(dest)); 66 | 67 | printf("Main: Triggering DMA transfer...\n"); 68 | dma_transfer(src, dest, sizeof(src)); 69 | 70 | // Simulate CPU doing other work 71 | for (int i = 0; i < 5; ++i) { 72 | printf("Main: CPU doing other work (%d)...\n", i); 73 | sleep(1); 74 | } 75 | 76 | printf("Main: Destination data after DMA:\n"); 77 | for (int i = 0; i < size; ++i) 78 | printf("%d ", dest[i]); 79 | printf("\n"); 80 | 81 | return 0; 82 | } 83 | ``` 84 | -------------------------------------------------------------------------------- /0.Embedded_Coding_Questions/3.Question_4.md: -------------------------------------------------------------------------------- 1 | We have given two array 2 | ```c 3 | #define N 100000 4 | int map[N]; 5 | int list[N]; 6 | ``` 7 | we have given 5 APIs 8 | 9 | 1.**insert(int val);** expected time complexity=O(1) 10 | 11 | 2.**delete(int val) ;** expected time complexity=O(1) 12 | 13 | 3.**lookup(int val) ;** expected time complexity=O(1) 14 | 15 | 4.**clear() ;** expected time complexity=O(1) 16 | 17 | 5.**Iterate();** expected time complexity=O(x) where x=number of elements in the array may be map or list 18 | 19 | Generally x is very very smaller than N These are driver functions. Appllication will call these APIs. 20 | 21 | 22 | `Constraints/Assumptions` 23 | 24 | - All elements val are in range [0, N) (i.e., integers less than N) 25 | 26 | - You can reserve space in advance for map[N] and list[N] 27 | 28 | - map[val] == -1 means the value is not in the list 29 | 30 | ```c++ 31 | 32 | 33 | // Online C compiler to run C program online 34 | #include 35 | 36 | // Online C++ compiler to run C++ program online 37 | 38 | 39 | #define N 1000 40 | 41 | int Map[N]; 42 | int list[N]; 43 | int count; 44 | 45 | int lookup(int x){ 46 | int idx=Map[x]; 47 | if(idx\n",lookup(20)); 86 | Delete(20); 87 | insert(50); 88 | iterate(); 89 | // insert(50); 90 | // insert(70); 91 | // Delete(50); 92 | // insert(560); 93 | // insert(851); 94 | // Delete(70); 95 | // iterate(); // 20 560 851 96 | // clear(); 97 | // insert(1); 98 | // insert(2); 99 | // insert(560); 100 | // insert(3); 101 | // insert(4); 102 | // insert(851); 103 | // iterate(); // 1 2 3 4 560 851 104 | // Delete(3); 105 | // iterate(); // 1 2 4 560 851 106 | return 0; 107 | } 108 | 109 | ``` 110 | 111 | ```c++ 112 | #include 113 | 114 | #define N 100000 115 | 116 | int map[N]; // map[val] = index in list[], if present 117 | int list[N]; // list of active elements 118 | int count = 0; // number of active elements 119 | 120 | // 1. Insert in O(1) 121 | void insert(int val) { 122 | if (map[val] >= count || list[map[val]] != val) { 123 | map[val] = count; 124 | list[count++] = val; 125 | } 126 | } 127 | 128 | // 2. Delete in O(1) 129 | void delete_val(int val) { 130 | if (map[val] < count && list[map[val]] == val) { 131 | int idx = map[val]; 132 | int last_val = list[count - 1]; 133 | list[idx] = last_val; 134 | map[last_val] = idx; 135 | count--; 136 | } 137 | } 138 | 139 | // 3. Lookup in O(1) 140 | int lookup(int val) { 141 | return (map[val] < count && list[map[val]] == val); 142 | } 143 | 144 | // 4. Clear in O(1) 145 | void clear() { 146 | count = 0; 147 | // no need to clear map[] 148 | } 149 | 150 | // 5. Iterate in O(x) 151 | void iterate() { 152 | for (int i = 0; i < count; i++) { 153 | printf("%d ", list[i]); 154 | } 155 | printf("\n"); 156 | } 157 | ``` 158 | 159 | 160 | ```c++ 161 | #include 162 | 163 | #define N 100000 164 | 165 | typedef struct { 166 | int index; // index in list[] 167 | int generation; // generation this entry belongs to 168 | } MapEntry; 169 | 170 | MapEntry map[N]; // Stores index + generation info 171 | int list[N]; // Stores inserted values 172 | int count = 0; // Number of valid elements 173 | int current_generation = 1; // Incremented on every clear() 174 | 175 | // 1. Insert in O(1) 176 | void insert(int val) { 177 | if (map[val].generation != current_generation) { 178 | map[val].index = count; 179 | map[val].generation = current_generation; 180 | list[count++] = val; 181 | } 182 | } 183 | 184 | // 2. Delete in O(1) 185 | void delete_val(int val) { 186 | if (map[val].generation == current_generation) { 187 | int idx = map[val].index; 188 | int last_val = list[count - 1]; 189 | list[idx] = last_val; 190 | map[last_val].index = idx; 191 | map[last_val].generation = current_generation; 192 | map[val].generation = 0; // Mark val as invalid 193 | count--; 194 | } 195 | } 196 | 197 | // 3. Lookup in O(1) 198 | int lookup(int val) { 199 | return (map[val].generation == current_generation); 200 | } 201 | 202 | // 4. Clear in strict O(1) 203 | void clear() { 204 | count = 0; 205 | current_generation++; 206 | // No need to reset map[] explicitly 207 | } 208 | 209 | // 5. Iterate in O(x) 210 | void iterate() { 211 | for (int i = 0; i < count; i++) { 212 | printf("%d ", list[i]); 213 | } 214 | printf("\n"); 215 | } 216 | ``` 217 | -------------------------------------------------------------------------------- /0.Embedded_Coding_Questions/README.md: -------------------------------------------------------------------------------- 1 | # 0.JoiBabaSaiNath 2 | ## Question 1: 3 | 4 | In a resource-constrained embedded system (e.g., a microcontroller with limited RAM and no dynamic memory allocation), implement a fixed-size circular buffer to store incoming bytes from a UART peripheral. 5 | 6 | **The buffer must support:** 7 | - push(uint8_t byte): add a byte to the buffer (return error if full). 8 | - pop(uint8_t* byte): remove a byte from the buffer (return error if empty). 9 | - is_full(), is_empty() 10 | 11 | **The implementation should be:** 12 | 13 | - Interrupt-safe (assume push is called from ISR, and pop is called from main loop). 14 | 15 | - Lock-free and without dynamic memory allocation. 16 | 17 | **Constraints:** 18 | 19 | - Use a buffer size of 128 bytes. 20 | 21 | - Use only fixed-size types (uint8_t, uint16_t, etc.). 22 | 23 | - Must avoid buffer overflow or underflow. 24 | 25 | - No use of STL or malloc. 26 | 27 | **Follow-up:** 28 | 29 | - What happens if the producer is faster than the consumer? 30 | 31 | - How would you modify the design to support multiple producers or consumers? 32 | 33 | ```c++ 34 | #include 35 | #include 36 | 37 | #define BUFFER_SIZE 128 38 | 39 | typedef struct { 40 | uint8_t buffer[BUFFER_SIZE]; 41 | volatile uint16_t head; // Points to where to write next 42 | volatile uint16_t tail; // Points to where to read next 43 | } CircularBuffer; 44 | 45 | void cb_init(CircularBuffer *cb) { 46 | cb->head = 0; 47 | cb->tail = 0; 48 | } 49 | 50 | bool cb_is_full(CircularBuffer *cb) { 51 | return ((cb->head + 1) % BUFFER_SIZE) == cb->tail; 52 | } 53 | 54 | bool cb_is_empty(CircularBuffer *cb) { 55 | return cb->head == cb->tail; 56 | } 57 | 58 | // Called from ISR 59 | bool cb_push(CircularBuffer *cb, uint8_t byte) { 60 | uint16_t next = (cb->head + 1) % BUFFER_SIZE; 61 | if (next == cb->tail) { 62 | // Buffer is full 63 | return false; 64 | } 65 | cb->buffer[cb->head] = byte; 66 | cb->head = next; 67 | return true; 68 | } 69 | 70 | // Called from main loop 71 | bool cb_pop(CircularBuffer *cb, uint8_t *byte) { 72 | if (cb_is_empty(cb)) { 73 | return false; 74 | } 75 | *byte = cb->buffer[cb->tail]; 76 | cb->tail = (cb->tail + 1) % BUFFER_SIZE; 77 | return true; 78 | } 79 | ``` 80 | 81 | ### 1. What happens if the producer is faster than the consumer? 82 | The buffer fills up, and push() starts returning false (overflow condition). 83 | 84 | Possible consequences: data loss (e.g., UART RX bytes dropped). 85 | 86 | ### 3. How would you handle wraparound efficiently without modulo? 87 | Replace modulo with bitwise AND if BUFFER_SIZE is power of 2: 88 | 89 | ```c 90 | #define BUFFER_MASK (BUFFER_SIZE - 1) 91 | next = (cb->head + 1) & BUFFER_MASK; 92 | ``` 93 | ## Question 2: 94 | You're developing firmware for an ARM Cortex-M microcontroller running FreeRTOS. You need to handle high-speed UART input using DMA and store it in a lock-free circular buffer for the application layer to consume safely. 95 | 96 | ✅ C++ UART Circular Buffer with DMA Integration 97 | 98 | ```cpp 99 | #ifndef CIRCULARBUFFER_HPP 100 | #define CIRCULARBUFFER_HPP 101 | 102 | #include 103 | #include 104 | 105 | template 106 | class CircularBuffer { 107 | static_assert((Size & (Size - 1)) == 0, "Size must be power of 2"); 108 | 109 | public: 110 | CircularBuffer() : head(0), tail(0) {} 111 | 112 | bool push(uint8_t data) { 113 | size_t next = (head + 1) & (Size - 1); 114 | if (next == tail.load(std::memory_order_acquire)) { 115 | return false; // Buffer full 116 | } 117 | buffer[head] = data; 118 | head = next; 119 | return true; 120 | } 121 | 122 | bool pop(uint8_t& data) { 123 | size_t t = tail.load(std::memory_order_relaxed); 124 | if (head == t) return false; // Buffer empty 125 | data = buffer[t]; 126 | tail.store((t + 1) & (Size - 1), std::memory_order_release); 127 | return true; 128 | } 129 | 130 | bool is_empty() const { 131 | return head == tail.load(); 132 | } 133 | 134 | bool is_full() const { 135 | return ((head + 1) & (Size - 1)) == tail.load(); 136 | } 137 | 138 | private: 139 | uint8_t buffer[Size]; 140 | size_t head; 141 | std::atomic tail; 142 | }; 143 | #endif 144 | ``` 145 | 🧩 Integration with UART + DMA + FreeRTOS 146 | UART RX DMA Half/Full Callback 147 | In your stm32xx_hal_uart.c or similar: 148 | 149 | c 150 | Copy 151 | Edit 152 | void HAL_UART_RxCpltCallback(UART_HandleTypeDef *huart) { 153 | BaseType_t xHigherPriorityTaskWoken = pdFALSE; 154 | // Notify task to copy DMA buffer to circular buffer 155 | vTaskNotifyGiveFromISR(uartTaskHandle, &xHigherPriorityTaskWoken); 156 | portYIELD_FROM_ISR(xHigherPriorityTaskWoken); 157 | } 158 | FreeRTOS Task to Transfer from DMA Buffer to CircularBuffer 159 | cpp 160 | Copy 161 | Edit 162 | extern CircularBuffer<256> uartRxBuffer; 163 | extern uint8_t dmaRxBuffer[64]; // DMA buffer 164 | 165 | void UARTProcessingTask(void *pvParameters) { 166 | for (;;) { 167 | ulTaskNotifyTake(pdTRUE, portMAX_DELAY); // Wait for notification 168 | for (int i = 0; i < 64; ++i) { 169 | uartRxBuffer.push(dmaRxBuffer[i]); // Push into circular buffer 170 | } 171 | } 172 | } 173 | -------------------------------------------------------------------------------- /2024-Interval/README.md: -------------------------------------------------------------------------------- 1 | ![Screenshot from 2024-01-28 12-18-00](https://github.com/PranabNandy/Leetcode-Patterns/assets/34576104/1e20e934-cef7-4fb9-a3c5-5b04e00d394a) 2 | **1.https://leetcode.com/problems/merge-intervals/description/** 3 | 4 | ```cpp 5 | class Solution { 6 | public: 7 | 8 | static bool comp(vector &v1,vector &v2); 9 | ! ---------------------------------------------------------------- ! 10 | vector> merge(vector>& arr) { 11 | int n=arr.size(); 12 | sort(arr.begin(),arr.end(),comp); 13 | vector> ans; 14 | ans.push_back(arr[0]); 15 | for(int i=1;i &v1, vector &v2){ 25 | if(v1[0]> intervalIntersection(vector>& first, vector>& second) { 35 | int n=first.size(); 36 | int m=second.size(); 37 | int i=0,j=0; 38 | vector> merge; 39 | while(i>& arr) { 63 | // Considering end point during sorting 64 | /*sort(arr.begin(),arr.end(),[](vector &a,vector &b){ 65 | if(a[1]b[1]) return false; 67 | else return a[0] &a,vector &b){ 71 | if(a[0]b[0]) return false; 73 | else return a[1] DP ( Recursion + Memorization) 95 | 96 | ```cpp 97 | class Solution { 98 | private: 99 | vector dp; 100 | int solve(vector> &arr,int global_end, int index){ 101 | if(index>=arr.size()) 102 | return 0; 103 | 104 | int pick=0,not_pick; 105 | if(dp[index]!=-1) return dp[index]; 106 | if(global_end<=arr[index][0]){ 107 | pick=1+solve(arr,arr[index][1],index+1); 108 | } 109 | not_pick=solve(arr,global_end,index+1); 110 | return dp[index]=max(pick,not_pick); 111 | } 112 | public: 113 | int eraseOverlapIntervals(vector>& arr) { 114 | // Considering end point during sorting 115 | sort(arr.begin(),arr.end(),[](vector &a,vector &b){ 116 | if(a[1]b[1]) return false; 118 | else return a[0] Tabulation 130 | **Sorting based on start point did not work out for DP** 131 | ```cpp 132 | class Solution { 133 | private: 134 | vector dp; 135 | public: 136 | int eraseOverlapIntervals(vector>& arr) { 137 | // Considering end point during sorting 138 | sort(arr.begin(),arr.end(),[](vector &a,vector &b){ 139 | if(a[1]b[1]) return false; 141 | else return a[0]>& intervals) { 166 | sort(intervals.begin(), intervals.end()); 167 | int size_ = intervals.size(); 168 | vector dp(size_,1); 169 | 170 | // T=O(n2) 171 | for(int i=1;i> &arr,int index){ 189 | int n=arr.size(); 190 | int l=index+1, r=n; 191 | while(larr[mid][0]) 194 | l=mid+1; 195 | else 196 | r=mid; 197 | } 198 | return r; 199 | } 200 | public: 201 | int eraseOverlapIntervals(vector>& arr){ 202 | int n=arr.size(); 203 | sort(arr.begin(),arr.end()); 204 | // tabulation 205 | vector dp(n+1,0); 206 | dp[n-1]=1; 207 | for(int i=n-2;i>=0;i--){ 208 | int j=searchNextMin(arr,i); 209 | dp[i]=max(1+dp[j],dp[i+1]); 210 | } 211 | return n-dp[0]; 212 | } 213 | }; 214 | 215 | ``` 216 | **4.https://leetcode.com/problems/insert-interval/description/** 217 | 218 | Straight Forward, Heuristic Approach 219 | ![Screenshot from 2024-02-11 18-52-00](https://github.com/PranabNandy/Leetcode-Patterns/assets/34576104/05273f0e-fd27-4738-ba72-702bb3567dd4) 220 | ```cpp 221 | 222 | class Solution { 223 | public: 224 | vector> insert(vector>& arr, vector& brr) { 225 | int n=arr.size(); 226 | vector> ans; 227 | if(n==0){ 228 | return {brr}; 229 | } 230 | int i=0; 231 | while(i parent; 9 | int islands; 10 | vector> adj={{-1,0},{0,-1},{1,0},{0,1}}; 11 | int find(int node){ 12 | if(node==parent[node]) return parent[node]; 13 | else return find(parent[node]); 14 | } 15 | void Union(int a, int b){ 16 | int par_a=find(a); 17 | int par_b=find(b); 18 | if( par_b != par_a){ 19 | parent[par_a]=par_b; 20 | islands--; 21 | } 22 | } 23 | void init_union(vector>& grid){ 24 | int n=grid.size(); 25 | int m=grid[0].size(); 26 | for(int i=0;i>& grid) { 38 | islands=0; 39 | parent.clear(); 40 | int n=grid.size(); 41 | int m=grid[0].size(); 42 | parent.resize(n*m); 43 | init_union(grid); 44 | for(int i=0;i=0 && x=0 && y& nums) { 14 | int n=nums.size(); 15 | bitset<10001> arr; // it takes constant arguments 16 | for(int i=0;i& nums) { 33 | int n = nums.size(); 34 | int total_sum = (n*(n+1))/2; 35 | for(auto x: nums){ 36 | total_sum -=x; 37 | } 38 | return total_sum; 39 | } 40 | }; 41 | ``` 42 | - **Using x-or logic**: 43 | ```cpp 44 | class Solution { 45 | public: 46 | int missingNumber(vector& nums) { 47 | int ans=0; 48 | int n=nums.size(); 49 | for(int i=0;i<=n;i++) 50 | ans=ans^i; 51 | for(int i=0;i& nums) { 62 | unordered_set s; 63 | int n=nums.size(); 64 | for(int i=0;i& nums) { 86 | int n=nums.size(); 87 | if(n==1){ 88 | if(nums[0]==0) return 1; 89 | return 0; 90 | } 91 | for(int i=0;i=0) return i; 111 | // Why not nums[i]>0 .... [2,0] here no one changing the value of "0" so return value should be "1" 112 | } 113 | return n; 114 | } 115 | }; 116 | ``` 117 | **2. https://leetcode.com/problems/find-all-numbers-disappeared-in-an-array/description/** 118 | 119 | **Alternative of bitset is boolean array** 120 | ```cpp 121 | vector seen(size(nums)+1); 122 | ``` 123 | **Cyclic Sort Variations** 124 | 125 | ![Screenshot from 2024-01-12 21-09-46](https://github.com/PranabNandy/Leetcode-Patterns/assets/34576104/846e6285-3b5a-4c53-ae69-005e60b0080c) 126 | ```cpp 127 | class Solution { 128 | public: 129 | vector findDisappearedNumbers(vector& nums) { 130 | vector ans; 131 | int n=nums.size(); 132 | for(int i=0;i findDisappearedNumbers(vector& nums) { 150 | vector ans; 151 | int n=nums.size(); 152 | for(int i=0;i0) ans.push_back(i+1); 158 | } 159 | return ans; 160 | 161 | } 162 | }; 163 | ``` 164 | 165 | **3. https://leetcode.com/problems/single-number/** 166 | 167 | **Substract from set elements** 168 | ```cpp 169 | int singleNumber(vector& nums) { 170 | int sum_1=0,sum_2=0; 171 | unordered_set um; 172 | for(int &i: nums){ 173 | um.insert(i); 174 | sum_1+=i; 175 | } 176 | for(auto it: um){ 177 | sum_2+=2*(it); 178 | } 179 | return sum_2-sum_1; 180 | } 181 | ``` 182 | **4.https://leetcode.com/problems/move-zeroes/** 183 | 184 | **`Alternative`** `of two pointer `: Basically it is an old step of two pointer 185 | 186 | 187 | ``` cpp 188 | void moveZeroes(vector& nums) { 189 | ios_base::sync_with_stdio(false); 190 | cin.tie(0); 191 | cout.tie(0); 192 | int cnt=0; 193 | int j=0; 194 | int n=nums.size(); 195 | for(int i=0;i productExceptSelf(vector& nums) { 208 | int n=nums.size(); 209 | vector L(n); 210 | L[0]=1; 211 | for(int i=1;i=0;i--){ 214 | L[i]=L[i]*R; 215 | R=R*nums[i]; 216 | } 217 | return L; 218 | } 219 | }; 220 | ``` 221 | **6.https://leetcode.com/problems/find-the-duplicate-number/** 222 | 223 | ## Index Sort 224 | 225 | ```cpp 226 | class Solution { 227 | public: 228 | int findDuplicate(vector& nums) { 229 | int n=nums.size(); 230 | for(int i=0;i& nums) { 248 | int n=nums.size(); 249 | for(int i=0;i& nums) { 265 | int n=nums.size(); 266 | int fast=nums[0],slow=nums[0]; 267 | do{ 268 | slow=nums[slow]; 269 | fast=nums[nums[fast]]; 270 | }while(fast!=slow); 271 | fast=nums[0]; 272 | while(slow!=fast){ 273 | slow=nums[slow]; 274 | fast=nums[fast]; 275 | } 276 | return slow; 277 | } 278 | }; 279 | ``` 280 | ## Binary Search Variations 281 | ```cpp 282 | class Solution { 283 | public: 284 | int findDuplicate(vector& nums) { 285 | int n=nums.size(); 286 | int low=1; 287 | int high=n-1; 288 | int mid; 289 | int cnt; 290 | while(low& nums) { 310 | int n = nums.size(); 311 | int bits=31; 312 | while((n-1)>>bits==0) 313 | { 314 | bits--; 315 | } 316 | int x=0,y=0,ans=0; 317 | for(int bit=0;bit<=bits;bit++){ 318 | x=0,y=0; 319 | for(int i=0;iy) 326 | ans |=(1< findDuplicates(vector& nums) { 339 | ios_base::sync_with_stdio(false); 340 | cin.tie(NULL); 341 | cout.tie(NULL); 342 | int n=nums.size(); 343 | vector ans; 344 | for(int i=0;i>& matrix) { 361 | unordered_set R,C; 362 | int n=matrix.size(); 363 | int m=matrix[0].size(); 364 | for(int i=0;i>& matrix) { 392 | 393 | int n=matrix.size(); 394 | int m=matrix[0].size(); 395 | bool R=false,C=false; 396 | for(int i=0;i>& matrix) { 438 | int n=matrix.size(); 439 | int m=matrix[0].size(); 440 | for(int i=0;i &nums, int target){ 458 | int n=nums.size(); 459 | for(int i=0;i& nums) { 466 | int longestSeq=1; 467 | int n=nums.size(); 468 | for(int i=0;i& nums) { 494 | int longestSeq=0; 495 | int n=nums.size(); 496 | unordered_map Hash; 497 | for(int i=0;i0) 502 | Hash[nums[i]]=false; 503 | } 504 | for(int i=0;i0) 508 | j++; 509 | } 510 | longestSeq=max(longestSeq,j); 511 | } 512 | return longestSeq; 513 | 514 | } 515 | }; 516 | ``` 517 | ## set does not have count function 518 | - We can avoid the use of count in Hash Table if we follow this set technique 519 | - T=O(N) S=O(N) 520 | 521 | ```cpp 522 | class Solution { 523 | public: 524 | int longestConsecutive(vector& nums) { 525 | int longestSeq=0; 526 | int n=nums.size(); 527 | unordered_set set; 528 | for(int i=0;i parent, Rank; 552 | int find(int a){ 553 | if(parent[a]==a) return parent[a]; 554 | else return find(parent[a]); 555 | } 556 | void Union(int a,int b){ 557 | int par_a=find(a); 558 | int par_b=find(b); 559 | if(par_a==par_b) return; 560 | if(Rank[par_a]>Rank[par_b]){ 561 | parent[par_b]=par_a; 562 | Rank[par_a]+=Rank[par_b]; 563 | } 564 | else{ 565 | parent[par_a]=par_b; 566 | Rank[par_b]+=Rank[par_a]; 567 | } 568 | } 569 | public: 570 | int longestConsecutive(vector& nums) { 571 | int n=nums.size(); 572 | parent.clear(); parent.resize(n+1); 573 | Rank.clear(); Rank.resize(n+1); 574 | unordered_map Hash; 575 | Hash.clear(); 576 | int ans=0; 577 | 578 | for(int i=0;i& nums) { 599 | unordered_map vis; 600 | unordered_map> Hash; 601 | int ans=0; 602 | int n=nums.size(); 603 | for(int i=0;i 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | 635 | Copyright (C) 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | Copyright (C) 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . 675 | -------------------------------------------------------------------------------- /google_alltime.csv: -------------------------------------------------------------------------------- 1 | ID,Title,Acceptance,Difficulty,Frequency,Leetcode Question Link 2 | 388,Longest Absolute File Path,41.8%,Medium,5.913085890375435, https://leetcode.com/problems/longest-absolute-file-path 3 | 683,K Empty Slots,35.6%,Hard,5.780765145104477, https://leetcode.com/problems/k-empty-slots 4 | 681,Next Closest Time,45.0%,Medium,5.648444399833518, https://leetcode.com/problems/next-closest-time 5 | 1,Two Sum,45.6%,Easy,5.644982903520936, https://leetcode.com/problems/two-sum 6 | 929,Unique Email Addresses,67.4%,Easy,5.641251480795916, https://leetcode.com/problems/unique-email-addresses 7 | 904,Fruit Into Baskets,42.5%,Medium,5.622005350773675, https://leetcode.com/problems/fruit-into-baskets 8 | 482,License Key Formatting,43.1%,Easy,5.489684605502716, https://leetcode.com/problems/license-key-formatting 9 | 308,Range Sum Query 2D - Mutable,35.6%,Hard,5.479895265007681, https://leetcode.com/problems/range-sum-query-2d-mutable 10 | 1007,Minimum Domino Rotations For Equal Row,50.0%,Medium,5.347574519736722, https://leetcode.com/problems/minimum-domino-rotations-for-equal-row 11 | 843,Guess the Word,46.1%,Hard,5.215253774465763, https://leetcode.com/problems/guess-the-word 12 | 288,Unique Word Abbreviation,21.9%,Medium,5.0829330291948045, https://leetcode.com/problems/unique-word-abbreviation 13 | 489,Robot Room Cleaner,69.7%,Hard,4.950612283923846, https://leetcode.com/problems/robot-room-cleaner 14 | 399,Evaluate Division,51.6%,Medium,4.9331279496887595, https://leetcode.com/problems/evaluate-division 15 | 975,Odd Even Jump,42.2%,Hard,4.89330238409204, https://leetcode.com/problems/odd-even-jump 16 | 686,Repeated String Match,32.3%,Easy,4.836325284003677, https://leetcode.com/problems/repeated-string-match 17 | 418,Sentence Screen Fitting,32.6%,Medium,4.781933322576393, https://leetcode.com/problems/sentence-screen-fitting 18 | 753,Cracking the Safe,50.5%,Hard,4.6997868127589575, https://leetcode.com/problems/cracking-the-safe 19 | 271,Encode and Decode Strings,31.5%,Medium,4.677975295068608, https://leetcode.com/problems/encode-and-decode-strings 20 | 361,Bomb Enemy,46.0%,Medium,4.673664844440462, https://leetcode.com/problems/bomb-enemy 21 | 298,Binary Tree Longest Consecutive Sequence,47.1%,Medium,4.6017532155227885, https://leetcode.com/problems/binary-tree-longest-consecutive-sequence 22 | 281,Zigzag Iterator,58.4%,Medium,4.497936294818977, https://leetcode.com/problems/zigzag-iterator 23 | 1057,Campus Bikes,57.7%,Medium,4.447943228729954, https://leetcode.com/problems/campus-bikes 24 | 393,UTF-8 Validation,37.5%,Medium,4.444092227821192, https://leetcode.com/problems/utf-8-validation 25 | 163,Missing Ranges,24.3%,Medium,4.311771482550233, https://leetcode.com/problems/missing-ranges 26 | 159,Longest Substring with At Most Two Distinct Characters,49.4%,Medium,4.262457725720521, https://leetcode.com/problems/longest-substring-with-at-most-two-distinct-characters 27 | 844,Backspace String Compare,46.4%,Easy,4.130136980449563, https://leetcode.com/problems/backspace-string-compare 28 | 642,Design Search Autocomplete System,44.7%,Hard,4.121348378880914, https://leetcode.com/problems/design-search-autocomplete-system 29 | 340,Longest Substring with At Most K Distinct Characters,44.1%,Hard,4.118703458748877, https://leetcode.com/problems/longest-substring-with-at-most-k-distinct-characters 30 | 222,Count Complete Tree Nodes,46.8%,Medium,4.1048397532413095, https://leetcode.com/problems/count-complete-tree-nodes 31 | 568,Maximum Vacation Days,40.8%,Hard,4.053081248726602, https://leetcode.com/problems/maximum-vacation-days 32 | 947,Most Stones Removed with Same Row or Column,55.2%,Medium,4.02302290047393, https://leetcode.com/problems/most-stones-removed-with-same-row-or-column 33 | 410,Split Array Largest Sum,44.5%,Hard,4.009588512914069, https://leetcode.com/problems/split-array-largest-sum 34 | 857,Minimum Cost to Hire K Workers,49.6%,Hard,3.9718459789720417, https://leetcode.com/problems/minimum-cost-to-hire-k-workers 35 | 939,Minimum Area Rectangle,51.8%,Medium,3.9363752311087805, https://leetcode.com/problems/minimum-area-rectangle 36 | 42,Trapping Rain Water,48.9%,Hard,3.921059878261158, https://leetcode.com/problems/trapping-rain-water 37 | 218,The Skyline Problem,34.6%,Hard,3.886010166884179, https://leetcode.com/problems/the-skyline-problem 38 | 248,Strobogrammatic Number III,39.6%,Hard,3.8637103391787333, https://leetcode.com/problems/strobogrammatic-number-iii 39 | 56,Merge Intervals,39.3%,Medium,3.8503178295937968, https://leetcode.com/problems/merge-intervals 40 | 394,Decode String,50.0%,Medium,3.8265446136122376, https://leetcode.com/problems/decode-string 41 | 200,Number of Islands,46.8%,Medium,3.801814667432651, https://leetcode.com/problems/number-of-islands 42 | 296,Best Meeting Point,57.5%,Hard,3.780744266551272, https://leetcode.com/problems/best-meeting-point 43 | 346,Moving Average from Data Stream,70.9%,Easy,3.7595613321751515, https://leetcode.com/problems/moving-average-from-data-stream 44 | 774,Minimize Max Distance to Gas Station,46.9%,Hard,3.708055318619307, https://leetcode.com/problems/minimize-max-distance-to-gas-station 45 | 351,Android Unlock Patterns,48.4%,Medium,3.70074902966932, https://leetcode.com/problems/android-unlock-patterns 46 | 66,Plus One,43.0%,Easy,3.6933051958019916, https://leetcode.com/problems/plus-one 47 | 146,LRU Cache,33.2%,Medium,3.6895564583242564, https://leetcode.com/problems/lru-cache 48 | 734,Sentence Similarity,42.1%,Easy,3.6779039500629285, https://leetcode.com/problems/sentence-similarity 49 | 359,Logger Rate Limiter,70.8%,Easy,3.6745485318267703, https://leetcode.com/problems/logger-rate-limiter 50 | 425,Word Squares,47.7%,Hard,3.649664857149902, https://leetcode.com/problems/word-squares 51 | 809,Expressive Words,47.0%,Medium,3.640135049976496, https://leetcode.com/problems/expressive-words 52 | 471,Encode String with Shortest Length,47.1%,Hard,3.6265326222967382, https://leetcode.com/problems/encode-string-with-shortest-length 53 | 679,24 Game,46.4%,Hard,3.5637003073738915, https://leetcode.com/problems/24-game 54 | 737,Sentence Similarity II,45.8%,Medium,3.5565631284675816, https://leetcode.com/problems/sentence-similarity-ii 55 | 228,Summary Ranges,39.5%,Medium,3.551951303501267, https://leetcode.com/problems/summary-ranges 56 | 299,Bulls and Cows,42.4%,Easy,3.5516016425432797, https://leetcode.com/problems/bulls-and-cows 57 | 149,Max Points on a Line,16.9%,Hard,3.5414149671854895, https://leetcode.com/problems/max-points-on-a-line 58 | 305,Number of Islands II,40.1%,Hard,3.519140936483725, https://leetcode.com/problems/number-of-islands-ii 59 | 2,Add Two Numbers,33.9%,Medium,3.516113248427463, https://leetcode.com/problems/add-two-numbers 60 | 1096,Brace Expansion II,62.2%,Hard,3.5045558946493087, https://leetcode.com/problems/brace-expansion-ii 61 | 253,Meeting Rooms II,45.7%,Medium,3.5024386970042944, https://leetcode.com/problems/meeting-rooms-ii 62 | 1055,Shortest Way to Form String,56.9%,Medium,3.49457016302794, https://leetcode.com/problems/shortest-way-to-form-string 63 | 158,Read N Characters Given Read4 II - Call multiple times,33.8%,Hard,3.484084287410813, https://leetcode.com/problems/read-n-characters-given-read4-ii-call-multiple-times 64 | 465,Optimal Account Balancing,46.9%,Hard,3.462697997323015, https://leetcode.com/problems/optimal-account-balancing 65 | 4,Median of Two Sorted Arrays,29.6%,Hard,3.453368563356655, https://leetcode.com/problems/median-of-two-sorted-arrays 66 | 68,Text Justification,27.7%,Hard,3.450799220650298, https://leetcode.com/problems/text-justification 67 | 803,Bricks Falling When Hit,30.8%,Hard,3.426856541071048, https://leetcode.com/problems/bricks-falling-when-hit 68 | 1110,Delete Nodes And Return Forest,67.0%,Medium,3.4188856985119753, https://leetcode.com/problems/delete-nodes-and-return-forest 69 | 289,Game of Life,54.5%,Medium,3.413628890756041, https://leetcode.com/problems/game-of-life 70 | 317,Shortest Distance from All Buildings,41.4%,Hard,3.4096720086531276, https://leetcode.com/problems/shortest-distance-from-all-buildings 71 | 1153,String Transforms Into Another String,35.8%,Hard,3.3908912382416454, https://leetcode.com/problems/string-transforms-into-another-string 72 | 833,Find And Replace in String,50.4%,Medium,3.3859736859340166, https://leetcode.com/problems/find-and-replace-in-string 73 | 1088,Confusing Number II,44.0%,Hard,3.349904087274605, https://leetcode.com/problems/confusing-number-ii 74 | 750,Number Of Corner Rectangles,66.4%,Medium,3.2461546717211958, https://leetcode.com/problems/number-of-corner-rectangles 75 | 247,Strobogrammatic Number II,47.6%,Medium,3.2451298570643794, https://leetcode.com/problems/strobogrammatic-number-ii 76 | 315,Count of Smaller Numbers After Self,41.5%,Hard,3.2308315362449034, https://leetcode.com/problems/count-of-smaller-numbers-after-self 77 | 246,Strobogrammatic Number,45.0%,Easy,3.223628779652069, https://leetcode.com/problems/strobogrammatic-number 78 | 1231,Divide Chocolate,52.4%,Hard,3.208270334389882, https://leetcode.com/problems/divide-chocolate 79 | 304,Range Sum Query 2D - Immutable,38.6%,Medium,3.1772508226762235, https://leetcode.com/problems/range-sum-query-2d-immutable 80 | 818,Race Car,39.0%,Hard,3.164823517729811, https://leetcode.com/problems/race-car 81 | 562,Longest Line of Consecutive One in Matrix,45.9%,Medium,3.145109674628592, https://leetcode.com/problems/longest-line-of-consecutive-one-in-matrix 82 | 777,Swap Adjacent in LR String,34.8%,Medium,3.1073791682365477, https://leetcode.com/problems/swap-adjacent-in-lr-string 83 | 1168,Optimize Water Distribution in a Village,60.9%,Hard,3.1023420086122493, https://leetcode.com/problems/optimize-water-distribution-in-a-village 84 | 360,Sort Transformed Array,48.8%,Medium,3.0831372738512024, https://leetcode.com/problems/sort-transformed-array 85 | 10,Regular Expression Matching,26.8%,Hard,3.0747147505974577, https://leetcode.com/problems/regular-expression-matching 86 | 280,Wiggle Sort,63.8%,Medium,3.0733021552804116, https://leetcode.com/problems/wiggle-sort 87 | 524,Longest Word in Dictionary through Deleting,48.4%,Medium,3.072239528663067, https://leetcode.com/problems/longest-word-in-dictionary-through-deleting 88 | 417,Pacific Atlantic Water Flow,41.1%,Medium,3.0398121134232396, https://leetcode.com/problems/pacific-atlantic-water-flow 89 | 23,Merge k Sorted Lists,40.2%,Hard,3.0393863444881077, https://leetcode.com/problems/merge-k-sorted-lists 90 | 1087,Brace Expansion,62.7%,Medium,3.0249257901076283, https://leetcode.com/problems/brace-expansion 91 | 329,Longest Increasing Path in a Matrix,43.4%,Hard,3.0194784424385475, https://leetcode.com/problems/longest-increasing-path-in-a-matrix 92 | 284,Peeking Iterator,45.7%,Medium,2.9939930051892243, https://leetcode.com/problems/peeking-iterator 93 | 205,Isomorphic Strings,39.8%,Easy,2.974388546456021, https://leetcode.com/problems/isomorphic-strings 94 | 57,Insert Interval,33.5%,Hard,2.97402257970463, https://leetcode.com/problems/insert-interval 95 | 85,Maximal Rectangle,37.7%,Hard,2.9640268737174758, https://leetcode.com/problems/maximal-rectangle 96 | 259,3Sum Smaller,47.6%,Medium,2.961393027644509, https://leetcode.com/problems/3sum-smaller 97 | 736,Parse Lisp Expression,47.5%,Hard,2.959364629383116, https://leetcode.com/problems/parse-lisp-expression 98 | 727,Minimum Window Subsequence,41.8%,Hard,2.954526908298268, https://leetcode.com/problems/minimum-window-subsequence 99 | 544,Output Contest Matches,75.3%,Medium,2.9261234488600074, https://leetcode.com/problems/output-contest-matches 100 | 527,Word Abbreviation,54.3%,Hard,2.9261234488600074, https://leetcode.com/problems/word-abbreviation 101 | 279,Perfect Squares,47.4%,Medium,2.9188962246060135, https://leetcode.com/problems/perfect-squares 102 | 274,H-Index,36.1%,Medium,2.908129696099074, https://leetcode.com/problems/h-index 103 | 3,Longest Substring Without Repeating Characters,30.4%,Medium,2.8994530726547287, https://leetcode.com/problems/longest-substring-without-repeating-characters 104 | 731,My Calendar II,49.1%,Medium,2.894068619777491, https://leetcode.com/problems/my-calendar-ii 105 | 766,Toeplitz Matrix,65.1%,Easy,2.880131111933709, https://leetcode.com/problems/toeplitz-matrix 106 | 294,Flip Game II,50.0%,Medium,2.87957606515677, https://leetcode.com/problems/flip-game-ii 107 | 157,Read N Characters Given Read4,34.2%,Easy,2.8620515045754673, https://leetcode.com/problems/read-n-characters-given-read4 108 | 1146,Snapshot Array,37.0%,Medium,2.853997465518477, https://leetcode.com/problems/snapshot-array 109 | 345,Reverse Vowels of a String,44.2%,Easy,2.8469976121950618, https://leetcode.com/problems/reverse-vowels-of-a-string 110 | 295,Find Median from Data Stream,44.3%,Hard,2.8300178150737505, https://leetcode.com/problems/find-median-from-data-stream 111 | 846,Hand of Straights,54.2%,Medium,2.8166447091052693, https://leetcode.com/problems/hand-of-straights 112 | 913,Cat and Mouse,31.3%,Hard,2.812298987907346, https://leetcode.com/problems/cat-and-mouse 113 | 552,Student Attendance Record II,36.7%,Hard,2.76905139983893, https://leetcode.com/problems/student-attendance-record-ii 114 | 1066,Campus Bikes II,54.2%,Medium,2.7658351992240013, https://leetcode.com/problems/campus-bikes-ii 115 | 76,Minimum Window Substring,34.6%,Hard,2.753906540615101, https://leetcode.com/problems/minimum-window-substring 116 | 363,Max Sum of Rectangle No Larger Than K,37.3%,Hard,2.7093314312582586, https://leetcode.com/problems/max-sum-of-rectangle-no-larger-than-k 117 | 849,Maximize Distance to Closest Person,42.6%,Easy,2.70914942752668, https://leetcode.com/problems/maximize-distance-to-closest-person 118 | 54,Spiral Matrix,34.1%,Medium,2.7080060938333252, https://leetcode.com/problems/spiral-matrix 119 | 15,3Sum,26.8%,Medium,2.702273135010205, https://leetcode.com/problems/3sum 120 | 221,Maximal Square,37.7%,Medium,2.681130404099715, https://leetcode.com/problems/maximal-square 121 | 17,Letter Combinations of a Phone Number,46.8%,Medium,2.68025676002709, https://leetcode.com/problems/letter-combinations-of-a-phone-number 122 | 616,Add Bold Tag in String,43.1%,Medium,2.6661443634782542, https://leetcode.com/problems/add-bold-tag-in-string 123 | 297,Serialize and Deserialize Binary Tree,47.5%,Hard,2.6484489664313173, https://leetcode.com/problems/serialize-and-deserialize-binary-tree 124 | 362,Design Hit Counter,63.7%,Medium,2.598395990569684, https://leetcode.com/problems/design-hit-counter 125 | 981,Time Based Key-Value Store,53.1%,Medium,2.5975702025088925, https://leetcode.com/problems/time-based-key-value-store 126 | 276,Paint Fence,38.3%,Easy,2.595102395632224, https://leetcode.com/problems/paint-fence 127 | 837,New 21 Game,34.6%,Medium,2.5842363584035155, https://leetcode.com/problems/new-21-game 128 | 224,Basic Calculator,36.8%,Hard,2.580473601965029, https://leetcode.com/problems/basic-calculator 129 | 911,Online Election,50.4%,Medium,2.5785176483169177, https://leetcode.com/problems/online-election 130 | 558,Logical OR of Two Binary Grids Represented as Quad-Trees,44.6%,Medium,2.571814372981217, https://leetcode.com/problems/logical-or-of-two-binary-grids-represented-as-quad-trees 131 | 687,Longest Univalue Path,36.2%,Easy,2.567963195991046, https://leetcode.com/problems/longest-univalue-path 132 | 490,The Maze,51.4%,Medium,2.5593731348341007, https://leetcode.com/problems/the-maze 133 | 659,Split Array into Consecutive Subsequences,43.7%,Medium,2.5268382051369156, https://leetcode.com/problems/split-array-into-consecutive-subsequences 134 | 380,Insert Delete GetRandom O(1),47.5%,Medium,2.5184085547652333, https://leetcode.com/problems/insert-delete-getrandom-o1 135 | 715,Range Module,38.5%,Hard,2.515902750156964, https://leetcode.com/problems/range-module 136 | 528,Random Pick with Weight,43.9%,Medium,2.509596225361694, https://leetcode.com/problems/random-pick-with-weight 137 | 166,Fraction to Recurring Decimal,21.6%,Medium,2.5048506298301927, https://leetcode.com/problems/fraction-to-recurring-decimal 138 | 139,Word Break,40.1%,Medium,2.498864325939262, https://leetcode.com/problems/word-break 139 | 403,Frog Jump,39.7%,Hard,2.4880206406678633, https://leetcode.com/problems/frog-jump 140 | 135,Candy,31.6%,Hard,2.4770714018179407, https://leetcode.com/problems/candy 141 | 406,Queue Reconstruction by Height,66.9%,Medium,2.463643690835622, https://leetcode.com/problems/queue-reconstruction-by-height 142 | 20,Valid Parentheses,39.0%,Easy,2.4553133466538077, https://leetcode.com/problems/valid-parentheses 143 | 505,The Maze II,47.7%,Medium,2.455044351095574, https://leetcode.com/problems/the-maze-ii 144 | 226,Invert Binary Tree,65.0%,Easy,2.438123583553808, https://leetcode.com/problems/invert-binary-tree 145 | 723,Candy Crush,69.2%,Medium,2.413829325662411, https://leetcode.com/problems/candy-crush 146 | 900,RLE Iterator,53.5%,Medium,2.412451570572578, https://leetcode.com/problems/rle-iterator 147 | 375,Guess Number Higher or Lower II,40.3%,Medium,2.412208895973755, https://leetcode.com/problems/guess-number-higher-or-lower-ii 148 | 457,Circular Array Loop,29.4%,Medium,2.4087237489359508, https://leetcode.com/problems/circular-array-loop 149 | 269,Alien Dictionary,33.3%,Hard,2.401963626660419, https://leetcode.com/problems/alien-dictionary 150 | 722,Remove Comments,34.6%,Medium,2.391299564349348, https://leetcode.com/problems/remove-comments 151 | 850,Rectangle Area II,47.5%,Hard,2.389853412007957, https://leetcode.com/problems/rectangle-area-ii 152 | 128,Longest Consecutive Sequence,45.1%,Hard,2.3889692368664277, https://leetcode.com/problems/longest-consecutive-sequence 153 | 31,Next Permutation,32.6%,Medium,2.3845622917588476, https://leetcode.com/problems/next-permutation 154 | 1170,Compare Strings by Frequency of the Smallest Character,58.7%,Easy,2.380621199972535, https://leetcode.com/problems/compare-strings-by-frequency-of-the-smallest-character 155 | 5,Longest Palindromic Substring,29.5%,Medium,2.378625542244051, https://leetcode.com/problems/longest-palindromic-substring 156 | 318,Maximum Product of Word Lengths,51.2%,Medium,2.377626415518863, https://leetcode.com/problems/maximum-product-of-word-lengths 157 | 353,Design Snake Game,34.2%,Medium,2.374942034436538, https://leetcode.com/problems/design-snake-game 158 | 391,Perfect Rectangle,30.5%,Hard,2.3609543573828455, https://leetcode.com/problems/perfect-rectangle 159 | 249,Group Shifted Strings,55.1%,Medium,2.3589773320503338, https://leetcode.com/problems/group-shifted-strings 160 | 729,My Calendar I,51.8%,Medium,2.351286906233527, https://leetcode.com/problems/my-calendar-i 161 | 341,Flatten Nested List Iterator,52.9%,Medium,2.3349516629496914, https://leetcode.com/problems/flatten-nested-list-iterator 162 | 951,Flip Equivalent Binary Trees,65.8%,Medium,2.3261691532245137, https://leetcode.com/problems/flip-equivalent-binary-trees 163 | 72,Edit Distance,44.8%,Hard,2.308682749366407, https://leetcode.com/problems/edit-distance 164 | 320,Generalized Abbreviation,52.1%,Medium,2.287272370970718, https://leetcode.com/problems/generalized-abbreviation 165 | 332,Reconstruct Itinerary,36.7%,Medium,2.2676322677470853, https://leetcode.com/problems/reconstruct-itinerary 166 | 835,Image Overlap,58.5%,Medium,2.2640988039628858, https://leetcode.com/problems/image-overlap 167 | 401,Binary Watch,47.5%,Easy,2.246794842528927, https://leetcode.com/problems/binary-watch 168 | 354,Russian Doll Envelopes,35.6%,Hard,2.236076201124014, https://leetcode.com/problems/russian-doll-envelopes 169 | 124,Binary Tree Maximum Path Sum,34.3%,Hard,2.2216093472081075, https://leetcode.com/problems/binary-tree-maximum-path-sum 170 | 444,Sequence Reconstruction,22.2%,Medium,2.217786049374021, https://leetcode.com/problems/sequence-reconstruction 171 | 239,Sliding Window Maximum,43.0%,Hard,2.2105289311276617, https://leetcode.com/problems/sliding-window-maximum 172 | 943,Find the Shortest Superstring,42.9%,Hard,2.183127427581185, https://leetcode.com/problems/find-the-shortest-superstring 173 | 400,Nth Digit,31.7%,Medium,2.1683677508742374, https://leetcode.com/problems/nth-digit 174 | 285,Inorder Successor in BST,40.4%,Medium,2.166776365319761, https://leetcode.com/problems/inorder-successor-in-bst 175 | 43,Multiply Strings,33.9%,Medium,2.1663332897105017, https://leetcode.com/problems/multiply-strings 176 | 208,Implement Trie (Prefix Tree),49.4%,Medium,2.1624789340540973, https://leetcode.com/problems/implement-trie-prefix-tree 177 | 745,Prefix and Suffix Search,34.1%,Hard,2.161230974688314, https://leetcode.com/problems/prefix-and-suffix-search 178 | 963,Minimum Area Rectangle II,50.9%,Medium,2.1572192427225203, https://leetcode.com/problems/minimum-area-rectangle-ii 179 | 788,Rotated Digits,57.1%,Easy,2.128352559073175, https://leetcode.com/problems/rotated-digits 180 | 484,Find Permutation,60.5%,Medium,2.1230183588789355, https://leetcode.com/problems/find-permutation 181 | 369,Plus One Linked List,58.2%,Medium,2.103037362276518, https://leetcode.com/problems/plus-one-linked-list 182 | 162,Find Peak Element,43.3%,Medium,2.097923147793266, https://leetcode.com/problems/find-peak-element 183 | 133,Clone Graph,34.8%,Medium,2.093083764564862, https://leetcode.com/problems/clone-graph 184 | 38,Count and Say,44.6%,Easy,2.0886590981708664, https://leetcode.com/problems/count-and-say 185 | 34,Find First and Last Position of Element in Sorted Array,36.2%,Medium,2.077190953113431, https://leetcode.com/problems/find-first-and-last-position-of-element-in-sorted-array 186 | 447,Number of Boomerangs,51.8%,Easy,2.070710491182991, https://leetcode.com/problems/number-of-boomerangs 187 | 336,Palindrome Pairs,33.7%,Hard,2.068730116946457, https://leetcode.com/problems/palindrome-pairs 188 | 127,Word Ladder,29.6%,Medium,2.0451263181434545, https://leetcode.com/problems/word-ladder 189 | 91,Decode Ways,24.7%,Medium,2.0435615456140264, https://leetcode.com/problems/decode-ways 190 | 215,Kth Largest Element in an Array,55.4%,Medium,2.024566184680276, https://leetcode.com/problems/kth-largest-element-in-an-array 191 | 946,Validate Stack Sequences,61.9%,Medium,2.0189151696320264, https://leetcode.com/problems/validate-stack-sequences 192 | 293,Flip Game,60.7%,Easy,2.0049678986989146, https://leetcode.com/problems/flip-game 193 | 33,Search in Rotated Sorted Array,34.5%,Medium,1.982840493476099, https://leetcode.com/problems/search-in-rotated-sorted-array 194 | 459,Repeated Substring Pattern,42.2%,Easy,1.9812811708925173, https://leetcode.com/problems/repeated-substring-pattern 195 | 11,Container With Most Water,50.8%,Medium,1.9770870605892752, https://leetcode.com/problems/container-with-most-water 196 | 1032,Stream of Characters,48.3%,Hard,1.9744627782694404, https://leetcode.com/problems/stream-of-characters 197 | 334,Increasing Triplet Subsequence,40.0%,Medium,1.9678676896894793, https://leetcode.com/problems/increasing-triplet-subsequence 198 | 44,Wildcard Matching,24.7%,Hard,1.9579596678839932, https://leetcode.com/problems/wildcard-matching 199 | 325,Maximum Size Subarray Sum Equals k,46.8%,Medium,1.9573388448789362, https://leetcode.com/problems/maximum-size-subarray-sum-equals-k 200 | 497,Random Point in Non-overlapping Rectangles,37.8%,Medium,1.9573306871741878, https://leetcode.com/problems/random-point-in-non-overlapping-rectangles 201 | 817,Linked List Components,57.3%,Medium,1.9517638243067739, https://leetcode.com/problems/linked-list-components 202 | 286,Walls and Gates,54.5%,Medium,1.948761543137523, https://leetcode.com/problems/walls-and-gates 203 | 1048,Longest String Chain,54.7%,Medium,1.9440931103276922, https://leetcode.com/problems/longest-string-chain 204 | 138,Copy List with Random Pointer,36.4%,Medium,1.941330735041384, https://leetcode.com/problems/copy-list-with-random-pointer 205 | 815,Bus Routes,42.5%,Hard,1.9383504626870616, https://leetcode.com/problems/bus-routes 206 | 772,Basic Calculator III,41.3%,Hard,1.93133194589594, https://leetcode.com/problems/basic-calculator-iii 207 | 173,Binary Search Tree Iterator,56.6%,Medium,1.9114667046485274, https://leetcode.com/problems/binary-search-tree-iterator 208 | 150,Evaluate Reverse Polish Notation,36.3%,Medium,1.9012041599672846, https://leetcode.com/problems/evaluate-reverse-polish-notation 209 | 743,Network Delay Time,45.0%,Medium,1.8954674499549913, https://leetcode.com/problems/network-delay-time 210 | 53,Maximum Subarray,46.5%,Easy,1.8935176696430995, https://leetcode.com/problems/maximum-subarray 211 | 752,Open the Lock,51.8%,Medium,1.8871450737679576, https://leetcode.com/problems/open-the-lock 212 | 130,Surrounded Regions,28.1%,Medium,1.8816381329635723, https://leetcode.com/problems/surrounded-regions 213 | 871,Minimum Number of Refueling Stops,31.4%,Hard,1.8726289648775856, https://leetcode.com/problems/minimum-number-of-refueling-stops 214 | 155,Min Stack,44.5%,Easy,1.8722323336408635, https://leetcode.com/problems/min-stack 215 | 685,Redundant Connection II,32.4%,Hard,1.8709822647033896, https://leetcode.com/problems/redundant-connection-ii 216 | 529,Minesweeper,59.1%,Medium,1.8679660780386982, https://leetcode.com/problems/minesweeper 217 | 800,Similar RGB Color,61.4%,Easy,1.8647846042429448, https://leetcode.com/problems/similar-rgb-color 218 | 1240,Tiling a Rectangle with the Fewest Squares,50.1%,Hard,1.8643301620628905, https://leetcode.com/problems/tiling-a-rectangle-with-the-fewest-squares 219 | 407,Trapping Rain Water II,42.4%,Hard,1.8590583049537268, https://leetcode.com/problems/trapping-rain-water-ii 220 | 168,Excel Sheet Column Title,31.1%,Easy,1.8498247657212512, https://leetcode.com/problems/excel-sheet-column-title 221 | 411,Minimum Unique Word Abbreviation,36.3%,Hard,1.843584537092641, https://leetcode.com/problems/minimum-unique-word-abbreviation 222 | 161,One Edit Distance,32.3%,Medium,1.843491263951507, https://leetcode.com/problems/one-edit-distance 223 | 427,Construct Quad Tree,61.4%,Medium,1.830397261933469, https://leetcode.com/problems/construct-quad-tree 224 | 41,First Missing Positive,32.0%,Hard,1.8284630090160665, https://leetcode.com/problems/first-missing-positive 225 | 801,Minimum Swaps To Make Sequences Increasing,38.9%,Medium,1.8139622880364348, https://leetcode.com/problems/minimum-swaps-to-make-sequences-increasing 226 | 428,Serialize and Deserialize N-ary Tree,59.4%,Hard,1.8126370542496102, https://leetcode.com/problems/serialize-and-deserialize-n-ary-tree 227 | 498,Diagonal Traverse,48.2%,Medium,1.8073604096705347, https://leetcode.com/problems/diagonal-traverse 228 | 307,Range Sum Query - Mutable,34.6%,Medium,1.8015483881157932, https://leetcode.com/problems/range-sum-query-mutable 229 | 37,Sudoku Solver,43.6%,Hard,1.7925251074248625, https://leetcode.com/problems/sudoku-solver 230 | 324,Wiggle Sort II,29.9%,Medium,1.786845454425626, https://leetcode.com/problems/wiggle-sort-ii 231 | 22,Generate Parentheses,62.7%,Medium,1.7757890873922186, https://leetcode.com/problems/generate-parentheses 232 | 853,Car Fleet,42.3%,Medium,1.7747066808453358, https://leetcode.com/problems/car-fleet 233 | 475,Heaters,33.1%,Easy,1.7664928396260275, https://leetcode.com/problems/heaters 234 | 463,Island Perimeter,65.7%,Easy,1.7662395949982437, https://leetcode.com/problems/island-perimeter 235 | 486,Predict the Winner,47.9%,Medium,1.7621745307382468, https://leetcode.com/problems/predict-the-winner 236 | 708,Insert into a Sorted Circular Linked List,31.6%,Medium,1.7513771317823694, https://leetcode.com/problems/insert-into-a-sorted-circular-linked-list 237 | 855,Exam Room,43.1%,Medium,1.7497717736123803, https://leetcode.com/problems/exam-room 238 | 591,Tag Validator,34.3%,Hard,1.7469089030627032, https://leetcode.com/problems/tag-validator 239 | 1197,Minimum Knight Moves,36.1%,Medium,1.7421965875991658, https://leetcode.com/problems/minimum-knight-moves 240 | 212,Word Search II,34.9%,Hard,1.7179939107133506, https://leetcode.com/problems/word-search-ii 241 | 684,Redundant Connection,57.4%,Medium,1.7020400393387942, https://leetcode.com/problems/redundant-connection 242 | 370,Range Addition,62.8%,Medium,1.7002175030641622, https://leetcode.com/problems/range-addition 243 | 250,Count Univalue Subtrees,52.0%,Medium,1.698353993388098, https://leetcode.com/problems/count-univalue-subtrees 244 | 337,House Robber III,50.6%,Medium,1.6931799416825786, https://leetcode.com/problems/house-robber-iii 245 | 241,Different Ways to Add Parentheses,55.2%,Medium,1.6793403602398669, https://leetcode.com/problems/different-ways-to-add-parentheses 246 | 1145,Binary Tree Coloring Game,51.2%,Medium,1.6791800772363104, https://leetcode.com/problems/binary-tree-coloring-game 247 | 769,Max Chunks To Make Sorted,54.8%,Medium,1.6641034408649555, https://leetcode.com/problems/max-chunks-to-make-sorted 248 | 266,Palindrome Permutation,61.9%,Easy,1.6575201119721923, https://leetcode.com/problems/palindrome-permutation 249 | 392,Is Subsequence,49.2%,Easy,1.6525927236514608, https://leetcode.com/problems/is-subsequence 250 | 302,Smallest Rectangle Enclosing Black Pixels,51.6%,Hard,1.6453853002424126, https://leetcode.com/problems/smallest-rectangle-enclosing-black-pixels 251 | 792,Number of Matching Subsequences,47.4%,Medium,1.6356226914291674, https://leetcode.com/problems/number-of-matching-subsequences 252 | 710,Random Pick with Blacklist,32.5%,Hard,1.6355405363367377, https://leetcode.com/problems/random-pick-with-blacklist 253 | 767,Reorganize String,48.7%,Medium,1.629188040780247, https://leetcode.com/problems/reorganize-string 254 | 510,Inorder Successor in BST II,58.0%,Medium,1.627672582741667, https://leetcode.com/problems/inorder-successor-in-bst-ii 255 | 845,Longest Mountain in Array,37.2%,Medium,1.596720695310657, https://leetcode.com/problems/longest-mountain-in-array 256 | 358,Rearrange String k Distance Apart,34.9%,Hard,1.59538615897845, https://leetcode.com/problems/rearrange-string-k-distance-apart 257 | 84,Largest Rectangle in Histogram,35.2%,Hard,1.5830569771448972, https://leetcode.com/problems/largest-rectangle-in-histogram 258 | 48,Rotate Image,56.7%,Medium,1.581726699920453, https://leetcode.com/problems/rotate-image 259 | 171,Excel Sheet Column Number,55.9%,Easy,1.5796139469791046, https://leetcode.com/problems/excel-sheet-column-number 260 | 229,Majority Element II,35.6%,Medium,1.5625651008879808, https://leetcode.com/problems/majority-element-ii 261 | 62,Unique Paths,54.1%,Medium,1.5607010122467657, https://leetcode.com/problems/unique-paths 262 | 776,Split BST,55.8%,Medium,1.5548904661348721, https://leetcode.com/problems/split-bst 263 | 115,Distinct Subsequences,38.3%,Hard,1.5534975104028454, https://leetcode.com/problems/distinct-subsequences 264 | 1438,Longest Continuous Subarray With Absolute Diff Less Than or Equal to Limit,42.1%,Medium,1.5515720803196904, https://leetcode.com/problems/longest-continuous-subarray-with-absolute-diff-less-than-or-equal-to-limit 265 | 499,The Maze III,41.0%,Hard,1.5441973905656994, https://leetcode.com/problems/the-maze-iii 266 | 935,Knight Dialer,45.2%,Medium,1.5436865348713198, https://leetcode.com/problems/knight-dialer 267 | 55,Jump Game,34.6%,Medium,1.5413078537703044, https://leetcode.com/problems/jump-game 268 | 852,Peak Index in a Mountain Array,71.6%,Easy,1.5411250817758044, https://leetcode.com/problems/peak-index-in-a-mountain-array 269 | 49,Group Anagrams,56.9%,Medium,1.5395939336051865, https://leetcode.com/problems/group-anagrams 270 | 121,Best Time to Buy and Sell Stock,50.5%,Easy,1.5394079860897354, https://leetcode.com/problems/best-time-to-buy-and-sell-stock 271 | 1074,Number of Submatrices That Sum to Target,60.4%,Hard,1.5295796895872102, https://leetcode.com/problems/number-of-submatrices-that-sum-to-target 272 | 894,All Possible Full Binary Trees,75.2%,Medium,1.4918903806730306, https://leetcode.com/problems/all-possible-full-binary-trees 273 | 1011,Capacity To Ship Packages Within D Days,58.1%,Medium,1.4745304780054163, https://leetcode.com/problems/capacity-to-ship-packages-within-d-days 274 | 21,Merge Two Sorted Lists,53.5%,Easy,1.4693716961943117, https://leetcode.com/problems/merge-two-sorted-lists 275 | 549,Binary Tree Longest Consecutive Sequence II,47.0%,Medium,1.4627859286979625, https://leetcode.com/problems/binary-tree-longest-consecutive-sequence-ii 276 | 126,Word Ladder II,22.1%,Hard,1.4607346170794553, https://leetcode.com/problems/word-ladder-ii 277 | 198,House Robber,42.0%,Easy,1.4530730183368297, https://leetcode.com/problems/house-robber 278 | 840,Magic Squares In Grid,37.3%,Easy,1.4487804380676268, https://leetcode.com/problems/magic-squares-in-grid 279 | 379,Design Phone Directory,46.8%,Medium,1.4414136603409702, https://leetcode.com/problems/design-phone-directory 280 | 36,Valid Sudoku,48.7%,Medium,1.4380633209074283, https://leetcode.com/problems/valid-sudoku 281 | 187,Repeated DNA Sequences,38.9%,Medium,1.434475303170948, https://leetcode.com/problems/repeated-dna-sequences 282 | 1376,Time Needed to Inform All Employees,55.4%,Medium,1.4230632089069797, https://leetcode.com/problems/time-needed-to-inform-all-employees 283 | 460,LFU Cache,34.2%,Hard,1.4218193322822756, https://leetcode.com/problems/lfu-cache 284 | 206,Reverse Linked List,62.5%,Easy,1.4160805749916772, https://leetcode.com/problems/reverse-linked-list 285 | 635,Design Log Storage System,58.6%,Medium,1.4065285144838586, https://leetcode.com/problems/design-log-storage-system 286 | 676,Implement Magic Dictionary,54.5%,Medium,1.40157555735501, https://leetcode.com/problems/implement-magic-dictionary 287 | 240,Search a 2D Matrix II,43.2%,Medium,1.397412157481839, https://leetcode.com/problems/search-a-2d-matrix-ii 288 | 277,Find the Celebrity,41.8%,Medium,1.3898674725847917, https://leetcode.com/problems/find-the-celebrity 289 | 236,Lowest Common Ancestor of a Binary Tree,45.7%,Medium,1.374560100967507, https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-tree 290 | 373,Find K Pairs with Smallest Sums,36.7%,Medium,1.3696902060678553, https://leetcode.com/problems/find-k-pairs-with-smallest-sums 291 | 469,Convex Polygon,37.0%,Medium,1.3618033411115948, https://leetcode.com/problems/convex-polygon 292 | 389,Find the Difference,55.3%,Easy,1.3593946914822543, https://leetcode.com/problems/find-the-difference 293 | 8,String to Integer (atoi),15.4%,Medium,1.3541748116977779, https://leetcode.com/problems/string-to-integer-atoi 294 | 134,Gas Station,38.5%,Medium,1.3515647395923693, https://leetcode.com/problems/gas-station 295 | 1056,Confusing Number,48.6%,Easy,1.3352447017682632, https://leetcode.com/problems/confusing-number 296 | 604,Design Compressed String Iterator,37.5%,Easy,1.33500106673234, https://leetcode.com/problems/design-compressed-string-iterator 297 | 65,Valid Number,15.3%,Hard,1.3343924239868317, https://leetcode.com/problems/valid-number 298 | 540,Single Element in a Sorted Array,57.9%,Medium,1.3332638907385543, https://leetcode.com/problems/single-element-in-a-sorted-array 299 | 327,Count of Range Sum,35.2%,Hard,1.3151273131514118, https://leetcode.com/problems/count-of-range-sum 300 | 64,Minimum Path Sum,54.5%,Medium,1.3111693715773884, https://leetcode.com/problems/minimum-path-sum 301 | 1293,Shortest Path in a Grid with Obstacles Elimination,42.8%,Hard,1.3085741032802551, https://leetcode.com/problems/shortest-path-in-a-grid-with-obstacles-elimination 302 | 63,Unique Paths II,34.6%,Medium,1.3028961064600377, https://leetcode.com/problems/unique-paths-ii 303 | 287,Find the Duplicate Number,55.5%,Medium,1.3001852737512336, https://leetcode.com/problems/find-the-duplicate-number 304 | 238,Product of Array Except Self,60.1%,Medium,1.2980649899084507, https://leetcode.com/problems/product-of-array-except-self 305 | 582,Kill Process,60.8%,Medium,1.29092971360129, https://leetcode.com/problems/kill-process 306 | 760,Find Anagram Mappings,81.1%,Easy,1.28919687074147, https://leetcode.com/problems/find-anagram-mappings 307 | 283,Move Zeroes,57.8%,Easy,1.2810983755784693, https://leetcode.com/problems/move-zeroes 308 | 300,Longest Increasing Subsequence,42.6%,Medium,1.268288616580214, https://leetcode.com/problems/longest-increasing-subsequence 309 | 282,Expression Add Operators,35.5%,Hard,1.2560118342510336, https://leetcode.com/problems/expression-add-operators 310 | 1423,Maximum Points You Can Obtain from Cards,42.6%,Medium,1.2507878542842488, https://leetcode.com/problems/maximum-points-you-can-obtain-from-cards 311 | 688,Knight Probability in Chessboard,48.9%,Medium,1.2499797771635763, https://leetcode.com/problems/knight-probability-in-chessboard 312 | 251,Flatten 2D Vector,45.7%,Medium,1.2441496508172531, https://leetcode.com/problems/flatten-2d-vector 313 | 543,Diameter of Binary Tree,48.4%,Easy,1.2410094815743256, https://leetcode.com/problems/diameter-of-binary-tree 314 | 419,Battleships in a Board,70.0%,Medium,1.235401421299467, https://leetcode.com/problems/battleships-in-a-board 315 | 46,Permutations,63.5%,Medium,1.2336433836123861, https://leetcode.com/problems/permutations 316 | 117,Populating Next Right Pointers in Each Node II,39.1%,Medium,1.2262318152453044, https://leetcode.com/problems/populating-next-right-pointers-in-each-node-ii 317 | 169,Majority Element,58.7%,Easy,1.2203145472414236, https://leetcode.com/problems/majority-element 318 | 381,Insert Delete GetRandom O(1) - Duplicates allowed,34.1%,Hard,1.218903162629457, https://leetcode.com/problems/insert-delete-getrandom-o1-duplicates-allowed 319 | 702,Search in a Sorted Array of Unknown Size,66.9%,Medium,1.2132888805290027, https://leetcode.com/problems/search-in-a-sorted-array-of-unknown-size 320 | 69,Sqrt(x),33.9%,Easy,1.2132645404949816, https://leetcode.com/problems/sqrtx 321 | 773,Sliding Puzzle,59.3%,Hard,1.2123711740247678, https://leetcode.com/problems/sliding-puzzle 322 | 1547,Minimum Cost to Cut a Stick,47.2%,Hard,1.209837923778334, https://leetcode.com/problems/minimum-cost-to-cut-a-stick 323 | 652,Find Duplicate Subtrees,50.2%,Medium,1.202729796086339, https://leetcode.com/problems/find-duplicate-subtrees 324 | 695,Max Area of Island,62.7%,Medium,1.2020238907871306, https://leetcode.com/problems/max-area-of-island 325 | 137,Single Number II,52.4%,Medium,1.1931677117978516, https://leetcode.com/problems/single-number-ii 326 | 97,Interleaving String,31.5%,Hard,1.1879190873014442, https://leetcode.com/problems/interleaving-string 327 | 14,Longest Common Prefix,35.4%,Easy,1.1781239985331302, https://leetcode.com/problems/longest-common-prefix 328 | 316,Remove Duplicate Letters,35.8%,Hard,1.1735295306839129, https://leetcode.com/problems/remove-duplicate-letters 329 | 96,Unique Binary Search Trees,52.9%,Medium,1.1727092071285163, https://leetcode.com/problems/unique-binary-search-trees 330 | 322,Coin Change,35.5%,Medium,1.1724702608205295, https://leetcode.com/problems/coin-change 331 | 214,Shortest Palindrome,29.8%,Hard,1.171269934244185, https://leetcode.com/problems/shortest-palindrome 332 | 188,Best Time to Buy and Sell Stock IV,28.0%,Hard,1.1638791040687415, https://leetcode.com/problems/best-time-to-buy-and-sell-stock-iv 333 | 230,Kth Smallest Element in a BST,60.2%,Medium,1.1554440075543555, https://leetcode.com/problems/kth-smallest-element-in-a-bst 334 | 807,Max Increase to Keep City Skyline,83.7%,Medium,1.1546614400537725, https://leetcode.com/problems/max-increase-to-keep-city-skyline 335 | 98,Validate Binary Search Tree,27.8%,Medium,1.1471403639879219, https://leetcode.com/problems/validate-binary-search-tree 336 | 378,Kth Smallest Element in a Sorted Matrix,54.3%,Medium,1.141935540964707, https://leetcode.com/problems/kth-smallest-element-in-a-sorted-matrix 337 | 356,Line Reflection,31.8%,Medium,1.1410897169352259, https://leetcode.com/problems/line-reflection 338 | 889,Construct Binary Tree from Preorder and Postorder Traversal,66.2%,Medium,1.1388310862262734, https://leetcode.com/problems/construct-binary-tree-from-preorder-and-postorder-traversal 339 | 261,Graph Valid Tree,42.2%,Medium,1.1348459115293956, https://leetcode.com/problems/graph-valid-tree 340 | 365,Water and Jug Problem,30.6%,Medium,1.1339839168203882, https://leetcode.com/problems/water-and-jug-problem 341 | 242,Valid Anagram,56.9%,Easy,1.1337861426369056, https://leetcode.com/problems/valid-anagram 342 | 535,Encode and Decode TinyURL,79.9%,Medium,1.1316441041287915, https://leetcode.com/problems/encode-and-decode-tinyurl 343 | 920,Number of Music Playlists,46.5%,Hard,1.1260112628562242, https://leetcode.com/problems/number-of-music-playlists 344 | 560,Subarray Sum Equals K,43.9%,Medium,1.1235306387302475, https://leetcode.com/problems/subarray-sum-equals-k 345 | 32,Longest Valid Parentheses,28.4%,Hard,1.118250382006353, https://leetcode.com/problems/longest-valid-parentheses 346 | 660,Remove 9,53.3%,Hard,1.11365016603265, https://leetcode.com/problems/remove-9 347 | 986,Interval List Intersections,67.3%,Medium,1.110184644469336, https://leetcode.com/problems/interval-list-intersections 348 | 7,Reverse Integer,25.8%,Easy,1.108160891856326, https://leetcode.com/problems/reverse-integer 349 | 50,Pow(x;n),30.3%,Medium,1.1070626497293488, https://leetcode.com/problems/powx-n 350 | 310,Minimum Height Trees,32.3%,Medium,1.1006741450686683, https://leetcode.com/problems/minimum-height-trees 351 | 116,Populating Next Right Pointers in Each Node,45.2%,Medium,1.100206500790656, https://leetcode.com/problems/populating-next-right-pointers-in-each-node 352 | 609,Find Duplicate File in System,59.5%,Medium,1.0830779957059256, https://leetcode.com/problems/find-duplicate-file-in-system 353 | 1284,Minimum Number of Flips to Convert Binary Matrix to Zero Matrix,69.5%,Hard,1.076872302031704, https://leetcode.com/problems/minimum-number-of-flips-to-convert-binary-matrix-to-zero-matrix 354 | 1320,Minimum Distance to Type a Word Using Two Fingers,62.3%,Hard,1.0722415922055613, https://leetcode.com/problems/minimum-distance-to-type-a-word-using-two-fingers 355 | 110,Balanced Binary Tree,43.5%,Easy,1.071569125381682, https://leetcode.com/problems/balanced-binary-tree 356 | 152,Maximum Product Subarray,31.7%,Medium,1.0711419371241067, https://leetcode.com/problems/maximum-product-subarray 357 | 636,Exclusive Time of Functions,51.9%,Medium,1.070608304685468, https://leetcode.com/problems/exclusive-time-of-functions 358 | 1406,Stone Game III,56.1%,Hard,1.0667370801376608, https://leetcode.com/problems/stone-game-iii 359 | 207,Course Schedule,43.1%,Medium,1.0620388108009178, https://leetcode.com/problems/course-schedule 360 | 973,K Closest Points to Origin,63.8%,Medium,1.056430236960672, https://leetcode.com/problems/k-closest-points-to-origin 361 | 382,Linked List Random Node,52.1%,Medium,1.0518252914636277, https://leetcode.com/problems/linked-list-random-node 362 | 518,Coin Change 2,50.2%,Medium,1.0350747721186435, https://leetcode.com/problems/coin-change-2 363 | 108,Convert Sorted Array to Binary Search Tree,57.9%,Easy,1.0312292914220618, https://leetcode.com/problems/convert-sorted-array-to-binary-search-tree 364 | 593,Valid Square,43.1%,Medium,1.0280149957655906, https://leetcode.com/problems/valid-square 365 | 132,Palindrome Partitioning II,30.2%,Hard,1.0250591631135415, https://leetcode.com/problems/palindrome-partitioning-ii 366 | 209,Minimum Size Subarray Sum,38.2%,Medium,1.0211948696431747, https://leetcode.com/problems/minimum-size-subarray-sum 367 | 890,Find and Replace Pattern,73.4%,Medium,1.018488356123473, https://leetcode.com/problems/find-and-replace-pattern 368 | 932,Beautiful Array,58.3%,Medium,1.016168619457035, https://leetcode.com/problems/beautiful-array 369 | 165,Compare Version Numbers,27.4%,Medium,1.0133719431344332, https://leetcode.com/problems/compare-version-numbers 370 | 551,Student Attendance Record I,46.0%,Easy,1.013125564623525, https://leetcode.com/problems/student-attendance-record-i 371 | 273,Integer to English Words,27.1%,Hard,1.0116837788838309, https://leetcode.com/problems/integer-to-english-words 372 | 156,Binary Tree Upside Down,55.0%,Medium,1.002597635428521, https://leetcode.com/problems/binary-tree-upside-down 373 | 384,Shuffle an Array,52.8%,Medium,0.991100943542345, https://leetcode.com/problems/shuffle-an-array 374 | 254,Factor Combinations,46.7%,Medium,0.9907010014908804, https://leetcode.com/problems/factor-combinations 375 | 480,Sliding Window Median,37.2%,Hard,0.9861751440709843, https://leetcode.com/problems/sliding-window-median 376 | 140,Word Break II,32.6%,Hard,0.9658937940696543, https://leetcode.com/problems/word-break-ii 377 | 220,Contains Duplicate III,20.9%,Medium,0.960150927542337, https://leetcode.com/problems/contains-duplicate-iii 378 | 202,Happy Number,50.4%,Easy,0.9590834376749943, https://leetcode.com/problems/happy-number 379 | 770,Basic Calculator IV,48.1%,Hard,0.9582549309731873, https://leetcode.com/problems/basic-calculator-iv 380 | 422,Valid Word Square,37.7%,Easy,0.9560140838920023, https://leetcode.com/problems/valid-word-square 381 | 1292,Maximum Side Length of a Square with Sum Less than or Equal to Threshold,48.6%,Medium,0.9555114450274365, https://leetcode.com/problems/maximum-side-length-of-a-square-with-sum-less-than-or-equal-to-threshold 382 | 836,Rectangle Overlap,48.6%,Easy,0.9437460453040576, https://leetcode.com/problems/rectangle-overlap 383 | 348,Design Tic-Tac-Toe,54.3%,Medium,0.9433716904768258, https://leetcode.com/problems/design-tic-tac-toe 384 | 12,Integer to Roman,55.1%,Medium,0.940669796034403, https://leetcode.com/problems/integer-to-roman 385 | 721,Accounts Merge,48.8%,Medium,0.933866541008227, https://leetcode.com/problems/accounts-merge 386 | 105,Construct Binary Tree from Preorder and Inorder Traversal,48.8%,Medium,0.93083104323616, https://leetcode.com/problems/construct-binary-tree-from-preorder-and-inorder-traversal 387 | 335,Self Crossing,28.0%,Hard,0.921320080279157, https://leetcode.com/problems/self-crossing 388 | 227,Basic Calculator II,36.9%,Medium,0.9201510193402352, https://leetcode.com/problems/basic-calculator-ii 389 | 167,Two Sum II - Input array is sorted,54.1%,Easy,0.9176979974586995, https://leetcode.com/problems/two-sum-ii-input-array-is-sorted 390 | 1352,Product of the Last K Numbers,43.6%,Medium,0.9062105990867559, https://leetcode.com/problems/product-of-the-last-k-numbers 391 | 120,Triangle,44.2%,Medium,0.9038215752118431, https://leetcode.com/problems/triangle 392 | 1121,Divide Array Into Increasing Sequences,56.9%,Hard,0.8873031950009028, https://leetcode.com/problems/divide-array-into-increasing-sequences 393 | 94,Binary Tree Inorder Traversal,63.3%,Medium,0.8806087006226458, https://leetcode.com/problems/binary-tree-inorder-traversal 394 | 412,Fizz Buzz,62.3%,Easy,0.879446193739206, https://leetcode.com/problems/fizz-buzz 395 | 213,House Robber II,36.5%,Medium,0.8771387842647791, https://leetcode.com/problems/house-robber-ii 396 | 270,Closest Binary Search Tree Value,48.5%,Easy,0.8750368651813485, https://leetcode.com/problems/closest-binary-search-tree-value 397 | 235,Lowest Common Ancestor of a Binary Search Tree,49.9%,Easy,0.8731282668148734, https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-search-tree 398 | 415,Add Strings,47.5%,Easy,0.8704740556802794, https://leetcode.com/problems/add-strings 399 | 347,Top K Frequent Elements,61.2%,Medium,0.8683877743772896, https://leetcode.com/problems/top-k-frequent-elements 400 | 311,Sparse Matrix Multiplication,61.9%,Medium,0.8655886287541927, https://leetcode.com/problems/sparse-matrix-multiplication 401 | 25,Reverse Nodes in k-Group,42.1%,Hard,0.8575824149327572, https://leetcode.com/problems/reverse-nodes-in-k-group 402 | 1000,Minimum Cost to Merge Stones,39.8%,Hard,0.8480760705432095, https://leetcode.com/problems/minimum-cost-to-merge-stones 403 | 739,Daily Temperatures,63.3%,Medium,0.8473698805528811, https://leetcode.com/problems/daily-temperatures 404 | 408,Valid Word Abbreviation,30.6%,Easy,0.8465211613190313, https://leetcode.com/problems/valid-word-abbreviation 405 | 252,Meeting Rooms,54.6%,Easy,0.844766213465424, https://leetcode.com/problems/meeting-rooms 406 | 99,Recover Binary Search Tree,39.7%,Hard,0.8394185237297231, https://leetcode.com/problems/recover-binary-search-tree 407 | 640,Solve the Equation,42.0%,Medium,0.8389208480491557, https://leetcode.com/problems/solve-the-equation 408 | 79,Word Search,35.6%,Medium,0.8356147014014963, https://leetcode.com/problems/word-search 409 | 732,My Calendar III,60.0%,Hard,0.8286926725561692, https://leetcode.com/problems/my-calendar-iii 410 | 1024,Video Stitching,49.2%,Medium,0.8252998676956634, https://leetcode.com/problems/video-stitching 411 | 1036,Escape a Large Maze,35.4%,Hard,0.8241754429663495, https://leetcode.com/problems/escape-a-large-maze 412 | 692,Top K Frequent Words,51.8%,Medium,0.8219759071619612, https://leetcode.com/problems/top-k-frequent-words 413 | 1219,Path with Maximum Gold,65.1%,Medium,0.8196365222988566, https://leetcode.com/problems/path-with-maximum-gold 414 | 724,Find Pivot Index,44.0%,Easy,0.8147968980117636, https://leetcode.com/problems/find-pivot-index 415 | 914,X of a Kind in a Deck of Cards,35.1%,Easy,0.8142316388253827, https://leetcode.com/problems/x-of-a-kind-in-a-deck-of-cards 416 | 398,Random Pick Index,56.0%,Medium,0.8134073044286906, https://leetcode.com/problems/random-pick-index 417 | 148,Sort List,42.3%,Medium,0.8074813963689672, https://leetcode.com/problems/sort-list 418 | 118,Pascal's Triangle,52.5%,Easy,0.803944970044604, https://leetcode.com/problems/pascals-triangle 419 | 104,Maximum Depth of Binary Tree,66.0%,Easy,0.8025197377077323, https://leetcode.com/problems/maximum-depth-of-binary-tree 420 | 658,Find K Closest Elements,40.9%,Medium,0.7930910425507767, https://leetcode.com/problems/find-k-closest-elements 421 | 1296,Divide Array in Sets of K Consecutive Numbers,53.8%,Medium,0.7907369966098516, https://leetcode.com/problems/divide-array-in-sets-of-k-consecutive-numbers 422 | 303,Range Sum Query - Immutable,44.7%,Easy,0.789789361893211, https://leetcode.com/problems/range-sum-query-immutable 423 | 395,Longest Substring with At Least K Repeating Characters,41.4%,Medium,0.789237391605069, https://leetcode.com/problems/longest-substring-with-at-least-k-repeating-characters 424 | 1277,Count Square Submatrices with All Ones,73.3%,Medium,0.786569729335201, https://leetcode.com/problems/count-square-submatrices-with-all-ones 425 | 802,Find Eventual Safe States,48.9%,Medium,0.7827313001631441, https://leetcode.com/problems/find-eventual-safe-states 426 | 231,Power of Two,43.7%,Easy,0.7811365527375519, https://leetcode.com/problems/power-of-two 427 | 909,Snakes and Ladders,38.4%,Medium,0.7779674428567601, https://leetcode.com/problems/snakes-and-ladders 428 | 13,Roman to Integer,55.7%,Easy,0.7772635358214104, https://leetcode.com/problems/roman-to-integer 429 | 268,Missing Number,51.7%,Easy,0.7772085975160996, https://leetcode.com/problems/missing-number 430 | 632,Smallest Range Covering Elements from K Lists,52.4%,Hard,0.7767122589059875, https://leetcode.com/problems/smallest-range-covering-elements-from-k-lists 431 | 343,Integer Break,50.4%,Medium,0.7715473732272846, https://leetcode.com/problems/integer-break 432 | 424,Longest Repeating Character Replacement,47.0%,Medium,0.7713993774596936, https://leetcode.com/problems/longest-repeating-character-replacement 433 | 45,Jump Game II,30.6%,Hard,0.7704190358095364, https://leetcode.com/problems/jump-game-ii 434 | 421,Maximum XOR of Two Numbers in an Array,53.5%,Medium,0.7687845947655654, https://leetcode.com/problems/maximum-xor-of-two-numbers-in-an-array 435 | 153,Find Minimum in Rotated Sorted Array,45.1%,Medium,0.7665829741577406, https://leetcode.com/problems/find-minimum-in-rotated-sorted-array 436 | 432,All O`one Data Structure,32.4%,Hard,0.7611889165572873, https://leetcode.com/problems/all-oone-data-structure 437 | 887,Super Egg Drop,27.1%,Hard,0.7550319038990971, https://leetcode.com/problems/super-egg-drop 438 | 979,Distribute Coins in Binary Tree,68.9%,Medium,0.752091950433346, https://leetcode.com/problems/distribute-coins-in-binary-tree 439 | 344,Reverse String,68.5%,Easy,0.7518145621343363, https://leetcode.com/problems/reverse-string 440 | 941,Valid Mountain Array,33.2%,Easy,0.7514794905088582, https://leetcode.com/problems/valid-mountain-array 441 | 1125,Smallest Sufficient Team,46.6%,Hard,0.7472144018302211, https://leetcode.com/problems/smallest-sufficient-team 442 | 312,Burst Balloons,51.8%,Hard,0.7383294033531782, https://leetcode.com/problems/burst-balloons 443 | 720,Longest Word in Dictionary,48.2%,Easy,0.7374092707891796, https://leetcode.com/problems/longest-word-in-dictionary 444 | 30,Substring with Concatenation of All Words,25.4%,Hard,0.7244336103079323, https://leetcode.com/problems/substring-with-concatenation-of-all-words 445 | 430,Flatten a Multilevel Doubly Linked List,55.1%,Medium,0.7229221667439826, https://leetcode.com/problems/flatten-a-multilevel-doubly-linked-list 446 | 70,Climbing Stairs,47.8%,Easy,0.7227642401270442, https://leetcode.com/problems/climbing-stairs 447 | 1444,Number of Ways of Cutting a Pizza,52.8%,Hard,0.7225130753643099, https://leetcode.com/problems/number-of-ways-of-cutting-a-pizza 448 | 210,Course Schedule II,40.7%,Medium,0.7203098969160788, https://leetcode.com/problems/course-schedule-ii 449 | 771,Jewels and Stones,86.4%,Easy,0.7192163968992101, https://leetcode.com/problems/jewels-and-stones 450 | 742,Closest Leaf in a Binary Tree,43.6%,Medium,0.7191226669632059, https://leetcode.com/problems/closest-leaf-in-a-binary-tree 451 | 450,Delete Node in a BST,43.1%,Medium,0.7190027298101302, https://leetcode.com/problems/delete-node-in-a-bst 452 | 109,Convert Sorted List to Binary Search Tree,47.7%,Medium,0.7182831538314877, https://leetcode.com/problems/convert-sorted-list-to-binary-search-tree 453 | 211,Add and Search Word - Data structure design,38.1%,Medium,0.7175070272224768, https://leetcode.com/problems/add-and-search-word-data-structure-design 454 | 804,Unique Morse Code Words,77.0%,Easy,0.7132636772648849, https://leetcode.com/problems/unique-morse-code-words 455 | 265,Paint House II,44.6%,Hard,0.7102416139192455, https://leetcode.com/problems/paint-house-ii 456 | 759,Employee Free Time,66.3%,Hard,0.6974963641784472, https://leetcode.com/problems/employee-free-time 457 | 16,3Sum Closest,46.0%,Medium,0.6926749255334587, https://leetcode.com/problems/3sum-closest 458 | 333,Largest BST Subtree,35.8%,Medium,0.6923668449760643, https://leetcode.com/problems/largest-bst-subtree 459 | 102,Binary Tree Level Order Traversal,54.6%,Medium,0.6894033967962869, https://leetcode.com/problems/binary-tree-level-order-traversal 460 | 18,4Sum,33.7%,Medium,0.6876921707521807, https://leetcode.com/problems/4sum 461 | 101,Symmetric Tree,46.8%,Easy,0.6860860621019975, https://leetcode.com/problems/symmetric-tree 462 | 9,Palindrome Number,48.4%,Easy,0.6860098818889118, https://leetcode.com/problems/palindrome-number 463 | 1326,Minimum Number of Taps to Open to Water a Garden,43.6%,Hard,0.6850826207232149, https://leetcode.com/problems/minimum-number-of-taps-to-open-to-water-a-garden 464 | 75,Sort Colors,47.3%,Medium,0.6835921669540121, https://leetcode.com/problems/sort-colors 465 | 1477,Find Two Non-overlapping Sub-arrays Each With Target Sum,30.0%,Medium,0.6817741903876753, https://leetcode.com/problems/find-two-non-overlapping-sub-arrays-each-with-target-sum 466 | 630,Course Schedule III,33.5%,Hard,0.6756495869389826, https://leetcode.com/problems/course-schedule-iii 467 | 1368,Minimum Cost to Make at Least One Valid Path in a Grid,54.3%,Hard,0.6742532311999836, https://leetcode.com/problems/minimum-cost-to-make-at-least-one-valid-path-in-a-grid 468 | 968,Binary Tree Cameras,37.5%,Hard,0.669776346792018, https://leetcode.com/problems/binary-tree-cameras 469 | 748,Shortest Completing Word,56.7%,Easy,0.6677617158657754, https://leetcode.com/problems/shortest-completing-word 470 | 1031,Maximum Sum of Two Non-Overlapping Subarrays,57.9%,Medium,0.6653543039757502, https://leetcode.com/problems/maximum-sum-of-two-non-overlapping-subarrays 471 | 143,Reorder List,37.1%,Medium,0.6644936178538985, https://leetcode.com/problems/reorder-list 472 | 1023,Camelcase Matching,57.0%,Medium,0.65888823073893, https://leetcode.com/problems/camelcase-matching 473 | 219,Contains Duplicate II,37.7%,Easy,0.6566724528102349, https://leetcode.com/problems/contains-duplicate-ii 474 | 1165,Single-Row Keyboard,84.8%,Easy,0.6537757969227267, https://leetcode.com/problems/single-row-keyboard 475 | 1136,Parallel Courses,61.1%,Hard,0.6518655215866413, https://leetcode.com/problems/parallel-courses 476 | 1265,Print Immutable Linked List in Reverse,94.6%,Medium,0.6510759666392583, https://leetcode.com/problems/print-immutable-linked-list-in-reverse 477 | 191,Number of 1 Bits,49.8%,Easy,0.6458232201931461, https://leetcode.com/problems/number-of-1-bits 478 | 830,Positions of Large Groups,49.6%,Easy,0.6410496663405119, https://leetcode.com/problems/positions-of-large-groups 479 | 174,Dungeon Game,32.3%,Hard,0.6333211805928959, https://leetcode.com/problems/dungeon-game 480 | 794,Valid Tic-Tac-Toe State,32.6%,Medium,0.6257058997644127, https://leetcode.com/problems/valid-tic-tac-toe-state 481 | 587,Erect the Fence,35.9%,Hard,0.6234672599219555, https://leetcode.com/problems/erect-the-fence 482 | 647,Palindromic Substrings,60.6%,Medium,0.6134746779188923, https://leetcode.com/problems/palindromic-substrings 483 | 278,First Bad Version,35.7%,Easy,0.6123214029306445, https://leetcode.com/problems/first-bad-version 484 | 243,Shortest Word Distance,61.0%,Easy,0.611325228812541, https://leetcode.com/problems/shortest-word-distance 485 | 864,Shortest Path to Get All Keys,40.1%,Hard,0.6061358035703156, https://leetcode.com/problems/shortest-path-to-get-all-keys 486 | 78,Subsets,62.0%,Medium,0.6050016308276642, https://leetcode.com/problems/subsets 487 | 160,Intersection of Two Linked Lists,40.6%,Easy,0.6045153022014824, https://leetcode.com/problems/intersection-of-two-linked-lists 488 | 1312,Minimum Insertion Steps to Make a String Palindrome,58.1%,Hard,0.6014387540704463, https://leetcode.com/problems/minimum-insertion-steps-to-make-a-string-palindrome 489 | 29,Divide Two Integers,16.4%,Medium,0.6000940507494524, https://leetcode.com/problems/divide-two-integers 490 | 433,Minimum Genetic Mutation,41.8%,Medium,0.5978370007556205, https://leetcode.com/problems/minimum-genetic-mutation 491 | 449,Serialize and Deserialize BST,52.0%,Medium,0.5975814314736569, https://leetcode.com/problems/serialize-and-deserialize-bst 492 | 785,Is Graph Bipartite?,47.5%,Medium,0.5968478111038449, https://leetcode.com/problems/is-graph-bipartite 493 | 438,Find All Anagrams in a String,43.3%,Medium,0.5966326854877417, https://leetcode.com/problems/find-all-anagrams-in-a-string 494 | 799,Champagne Tower,35.8%,Medium,0.5900175637637866, https://leetcode.com/problems/champagne-tower 495 | 349,Intersection of Two Arrays,62.5%,Easy,0.5890390891123699, https://leetcode.com/problems/intersection-of-two-arrays 496 | 443,String Compression,41.3%,Easy,0.5809942743419542, https://leetcode.com/problems/string-compression 497 | 854,K-Similar Strings,38.2%,Hard,0.5809557039657982, https://leetcode.com/problems/k-similar-strings 498 | 416,Partition Equal Subset Sum,43.7%,Medium,0.5807341064873648, https://leetcode.com/problems/partition-equal-subset-sum 499 | 841,Keys and Rooms,64.3%,Medium,0.5764125934649795, https://leetcode.com/problems/keys-and-rooms 500 | 1140,Stone Game II,63.3%,Medium,0.5758202452535439, https://leetcode.com/problems/stone-game-ii 501 | 862,Shortest Subarray with Sum at Least K,24.6%,Hard,0.5755650893431007, https://leetcode.com/problems/shortest-subarray-with-sum-at-least-k 502 | 195,Tenth Line,33.0%,Easy,0.573288532594267, https://leetcode.com/problems/tenth-line 503 | 175,Combine Two Tables,60.8%,Easy,0.5724746159171118, https://leetcode.com/problems/combine-two-tables 504 | 933,Number of Recent Calls,71.9%,Easy,0.5684623920757161, https://leetcode.com/problems/number-of-recent-calls 505 | 464,Can I Win,28.8%,Medium,0.5678280191954505, https://leetcode.com/problems/can-i-win 506 | 409,Longest Palindrome,50.3%,Easy,0.5661573229787376, https://leetcode.com/problems/longest-palindrome 507 | 572,Subtree of Another Tree,44.1%,Easy,0.5649315643132164, https://leetcode.com/problems/subtree-of-another-tree 508 | 806,Number of Lines To Write String,64.9%,Easy,0.5626323814748484, https://leetcode.com/problems/number-of-lines-to-write-string 509 | 81,Search in Rotated Sorted Array II,33.0%,Medium,0.5610425012822097, https://leetcode.com/problems/search-in-rotated-sorted-array-ii 510 | 440,K-th Smallest in Lexicographical Order,29.1%,Hard,0.5602862539343905, https://leetcode.com/problems/k-th-smallest-in-lexicographical-order 511 | 982,Triples with Bitwise AND Equal To Zero,55.6%,Hard,0.5596157879354227, https://leetcode.com/problems/triples-with-bitwise-and-equal-to-zero 512 | 452,Minimum Number of Arrows to Burst Balloons,49.6%,Medium,0.5584397574369148, https://leetcode.com/problems/minimum-number-of-arrows-to-burst-balloons 513 | 60,Permutation Sequence,38.4%,Hard,0.556508587092674, https://leetcode.com/problems/permutation-sequence 514 | 136,Single Number,65.5%,Easy,0.5514021682362541, https://leetcode.com/problems/single-number 515 | 805,Split Array With Same Average,26.4%,Hard,0.5446366736089481, https://leetcode.com/problems/split-array-with-same-average 516 | 733,Flood Fill,55.3%,Easy,0.5434516866606699, https://leetcode.com/problems/flood-fill 517 | 778,Swim in Rising Water,53.1%,Hard,0.5398245209836887, https://leetcode.com/problems/swim-in-rising-water 518 | 321,Create Maximum Number,27.0%,Hard,0.538996500732687, https://leetcode.com/problems/create-maximum-number 519 | 301,Remove Invalid Parentheses,43.3%,Hard,0.538844698075849, https://leetcode.com/problems/remove-invalid-parentheses 520 | 895,Maximum Frequency Stack,60.6%,Hard,0.535302370192545, https://leetcode.com/problems/maximum-frequency-stack 521 | 493,Reverse Pairs,25.2%,Hard,0.5334746755483791, https://leetcode.com/problems/reverse-pairs 522 | 51,N-Queens,46.6%,Hard,0.5296554883395482, https://leetcode.com/problems/n-queens 523 | 39,Combination Sum,56.1%,Medium,0.5268614501589004, https://leetcode.com/problems/combination-sum 524 | 267,Palindrome Permutation II,36.4%,Medium,0.5195071758508175, https://leetcode.com/problems/palindrome-permutation-ii 525 | 694,Number of Distinct Islands,56.0%,Medium,0.5158131652770298, https://leetcode.com/problems/number-of-distinct-islands 526 | 59,Spiral Matrix II,53.9%,Medium,0.5143212974615246, https://leetcode.com/problems/spiral-matrix-ii 527 | 122,Best Time to Buy and Sell Stock II,57.0%,Easy,0.5059751696322412, https://leetcode.com/problems/best-time-to-buy-and-sell-stock-ii 528 | 387,First Unique Character in a String,53.4%,Easy,0.5040078459528144, https://leetcode.com/problems/first-unique-character-in-a-string 529 | 374,Guess Number Higher or Lower,43.1%,Easy,0.5030585944283311, https://leetcode.com/problems/guess-number-higher-or-lower 530 | 542,01 Matrix,39.8%,Medium,0.5024497554251606, https://leetcode.com/problems/01-matrix 531 | 386,Lexicographical Numbers,51.6%,Medium,0.49504337366290274, https://leetcode.com/problems/lexicographical-numbers 532 | 232,Implement Queue using Stacks,49.6%,Easy,0.4922252130316439, https://leetcode.com/problems/implement-queue-using-stacks 533 | 531,Lonely Pixel I,59.0%,Medium,0.49091031406504926, https://leetcode.com/problems/lonely-pixel-i 534 | 1060,Missing Element in Sorted Array,54.5%,Medium,0.4903986257668087, https://leetcode.com/problems/missing-element-in-sorted-array 535 | 77,Combinations,54.7%,Medium,0.48173592524506076, https://leetcode.com/problems/combinations 536 | 1157,Online Majority Element In Subarray,39.0%,Hard,0.4776275543563949, https://leetcode.com/problems/online-majority-element-in-subarray 537 | 977,Squares of a Sorted Array,72.1%,Easy,0.47571341818941315, https://leetcode.com/problems/squares-of-a-sorted-array 538 | 352,Data Stream as Disjoint Intervals,47.3%,Hard,0.47516062535545167, https://leetcode.com/problems/data-stream-as-disjoint-intervals 539 | 690,Employee Importance,57.3%,Easy,0.47447147204946094, https://leetcode.com/problems/employee-importance 540 | 456,132 Pattern,28.9%,Medium,0.4713967105019087, https://leetcode.com/problems/132-pattern 541 | 26,Remove Duplicates from Sorted Array,45.1%,Easy,0.46886156418268965, https://leetcode.com/problems/remove-duplicates-from-sorted-array 542 | 1131,Maximum of Absolute Value Expression,53.0%,Medium,0.46525302648713773, https://leetcode.com/problems/maximum-of-absolute-value-expression 543 | 787,Cheapest Flights Within K Stops,39.3%,Medium,0.4541421565034811, https://leetcode.com/problems/cheapest-flights-within-k-stops 544 | 420,Strong Password Checker,14.0%,Hard,0.4491177382659011, https://leetcode.com/problems/strong-password-checker 545 | 385,Mini Parser,33.8%,Medium,0.44685032427101873, https://leetcode.com/problems/mini-parser 546 | 290,Word Pattern,37.0%,Easy,0.4458041633765048, https://leetcode.com/problems/word-pattern 547 | 1047,Remove All Adjacent Duplicates In String,68.6%,Easy,0.4417153800092769, https://leetcode.com/problems/remove-all-adjacent-duplicates-in-string 548 | 958,Check Completeness of a Binary Tree,52.1%,Medium,0.4382904177212014, https://leetcode.com/problems/check-completeness-of-a-binary-tree 549 | 1244,Design A Leaderboard,60.7%,Medium,0.43175436632806186, https://leetcode.com/problems/design-a-leaderboard 550 | 716,Max Stack,42.6%,Easy,0.4281075848579242, https://leetcode.com/problems/max-stack 551 | 698,Partition to K Equal Sum Subsets,45.0%,Medium,0.42725858927476734, https://leetcode.com/problems/partition-to-k-equal-sum-subsets 552 | 125,Valid Palindrome,36.7%,Easy,0.4236129919244878, https://leetcode.com/problems/valid-palindrome 553 | 950,Reveal Cards In Increasing Order,74.6%,Medium,0.4213499186481875, https://leetcode.com/problems/reveal-cards-in-increasing-order 554 | 741,Cherry Pickup,33.9%,Hard,0.42085002694764384, https://leetcode.com/problems/cherry-pickup 555 | 19,Remove Nth Node From End of List,35.2%,Medium,0.41918456338441945, https://leetcode.com/problems/remove-nth-node-from-end-of-list 556 | 1091,Shortest Path in Binary Matrix,38.2%,Medium,0.4150651818371836, https://leetcode.com/problems/shortest-path-in-binary-matrix 557 | 366,Find Leaves of Binary Tree,70.6%,Medium,0.4130123137435473, https://leetcode.com/problems/find-leaves-of-binary-tree 558 | 1504,Count Submatrices With All Ones,61.7%,Medium,0.41262219631325453, https://leetcode.com/problems/count-submatrices-with-all-ones 559 | 926,Flip String to Monotone Increasing,52.3%,Medium,0.40755934971127916, https://leetcode.com/problems/flip-string-to-monotone-increasing 560 | 719,Find K-th Smallest Pair Distance,31.5%,Hard,0.40316361111988513, https://leetcode.com/problems/find-k-th-smallest-pair-distance 561 | 442,Find All Duplicates in an Array,67.8%,Medium,0.4029173360293657, https://leetcode.com/problems/find-all-duplicates-in-an-array 562 | 6,ZigZag Conversion,36.3%,Medium,0.4024284396463993, https://leetcode.com/problems/zigzag-conversion 563 | 435,Non-overlapping Intervals,42.9%,Medium,0.3995537608451072, https://leetcode.com/problems/non-overlapping-intervals 564 | 350,Intersection of Two Arrays II,51.4%,Easy,0.3862578370510425, https://leetcode.com/problems/intersection-of-two-arrays-ii 565 | 790,Domino and Tromino Tiling,39.2%,Medium,0.3856624808119847, https://leetcode.com/problems/domino-and-tromino-tiling 566 | 1188,Design Bounded Blocking Queue,70.5%,Medium,0.3828597229337993, https://leetcode.com/problems/design-bounded-blocking-queue 567 | 216,Combination Sum III,56.6%,Medium,0.38057236114118675, https://leetcode.com/problems/combination-sum-iii 568 | 141,Linked List Cycle,41.1%,Easy,0.3803918123400481, https://leetcode.com/problems/linked-list-cycle 569 | 834,Sum of Distances in Tree,43.7%,Hard,0.37918622364432397, https://leetcode.com/problems/sum-of-distances-in-tree 570 | 662,Maximum Width of Binary Tree,41.0%,Medium,0.37731747857553355, https://leetcode.com/problems/maximum-width-of-binary-tree 571 | 924,Minimize Malware Spread,42.0%,Hard,0.3764775712349121, https://leetcode.com/problems/minimize-malware-spread 572 | 24,Swap Nodes in Pairs,50.4%,Medium,0.3722036149739704, https://leetcode.com/problems/swap-nodes-in-pairs 573 | 445,Add Two Numbers II,54.5%,Medium,0.3692506244038094, https://leetcode.com/problems/add-two-numbers-ii 574 | 1463,Cherry Pickup II,65.7%,Hard,0.36745148140812023, https://leetcode.com/problems/cherry-pickup-ii 575 | 1345,Jump Game IV,38.0%,Hard,0.363133899796418, https://leetcode.com/problems/jump-game-iv 576 | 504,Base 7,46.2%,Easy,0.36260140367638205, https://leetcode.com/problems/base-7 577 | 28,Implement strStr(),34.5%,Easy,0.36158188951156656, https://leetcode.com/problems/implement-strstr 578 | 1223,Dice Roll Simulation,45.6%,Medium,0.35774963506849783, https://leetcode.com/problems/dice-roll-simulation 579 | 689,Maximum Sum of 3 Non-Overlapping Subarrays,46.3%,Hard,0.3548982185675815, https://leetcode.com/problems/maximum-sum-of-3-non-overlapping-subarrays 580 | 859,Buddy Strings,27.4%,Easy,0.34855697583628487, https://leetcode.com/problems/buddy-strings 581 | 726,Number of Atoms,49.0%,Hard,0.34442921752179523, https://leetcode.com/problems/number-of-atoms 582 | 483,Smallest Good Base,35.7%,Hard,0.3393540829961018, https://leetcode.com/problems/smallest-good-base 583 | 451,Sort Characters By Frequency,63.0%,Medium,0.33685046933339546, https://leetcode.com/problems/sort-characters-by-frequency 584 | 821,Shortest Distance to a Character,66.9%,Easy,0.33395175639587793, https://leetcode.com/problems/shortest-distance-to-a-character 585 | 960,Delete Columns to Make Sorted III,53.6%,Hard,0.33363937353690887, https://leetcode.com/problems/delete-columns-to-make-sorted-iii 586 | 426,Convert Binary Search Tree to Sorted Doubly Linked List,59.1%,Medium,0.3308542443169896, https://leetcode.com/problems/convert-binary-search-tree-to-sorted-doubly-linked-list 587 | 323,Number of Connected Components in an Undirected Graph,56.0%,Medium,0.32984288327605893, https://leetcode.com/problems/number-of-connected-components-in-an-undirected-graph 588 | 448,Find All Numbers Disappeared in an Array,55.9%,Easy,0.3274291092466606, https://leetcode.com/problems/find-all-numbers-disappeared-in-an-array 589 | 1062,Longest Repeating Substring,57.2%,Medium,0.32609152056665214, https://leetcode.com/problems/longest-repeating-substring 590 | 368,Largest Divisible Subset,38.0%,Medium,0.32027305846942417, https://leetcode.com/problems/largest-divisible-subset 591 | 272,Closest Binary Search Tree Value II,50.5%,Hard,0.3195226783074397, https://leetcode.com/problems/closest-binary-search-tree-value-ii 592 | 237,Delete Node in a Linked List,63.8%,Easy,0.31675250171694064, https://leetcode.com/problems/delete-node-in-a-linked-list 593 | 88,Merge Sorted Array,39.4%,Easy,0.31099870848890615, https://leetcode.com/problems/merge-sorted-array 594 | 119,Pascal's Triangle II,49.0%,Easy,0.3089177489146835, https://leetcode.com/problems/pascals-triangle-ii 595 | 706,Design HashMap,61.3%,Easy,0.30607943759149703, https://leetcode.com/problems/design-hashmap 596 | 113,Path Sum II,46.7%,Medium,0.3030501026800949, https://leetcode.com/problems/path-sum-ii 597 | 987,Vertical Order Traversal of a Binary Tree,36.6%,Medium,0.30230623809780655, https://leetcode.com/problems/vertical-order-traversal-of-a-binary-tree 598 | 564,Find the Closest Palindrome,19.7%,Hard,0.3007541540191337, https://leetcode.com/problems/find-the-closest-palindrome 599 | 131,Palindrome Partitioning,47.5%,Medium,0.3001175559774547, https://leetcode.com/problems/palindrome-partitioning 600 | 703,Kth Largest Element in a Stream,49.7%,Easy,0.3000268349758617, https://leetcode.com/problems/kth-largest-element-in-a-stream 601 | 204,Count Primes,31.5%,Easy,0.29844719891360566, https://leetcode.com/problems/count-primes 602 | 1229,Meeting Scheduler,52.7%,Medium,0.2955601745092634, https://leetcode.com/problems/meeting-scheduler 603 | 992,Subarrays with K Different Integers,48.6%,Hard,0.2921489894831175, https://leetcode.com/problems/subarrays-with-k-different-integers 604 | 74,Search a 2D Matrix,36.5%,Medium,0.29107845681405486, https://leetcode.com/problems/search-a-2d-matrix 605 | 1021,Remove Outermost Parentheses,78.0%,Easy,0.2893377019690421, https://leetcode.com/problems/remove-outermost-parentheses 606 | 758,Bold Words in String,46.0%,Easy,0.2835752904991275, https://leetcode.com/problems/bold-words-in-string 607 | 82,Remove Duplicates from Sorted List II,36.8%,Medium,0.28244645839783594, https://leetcode.com/problems/remove-duplicates-from-sorted-list-ii 608 | 328,Odd Even Linked List,55.7%,Medium,0.28080059393536966, https://leetcode.com/problems/odd-even-linked-list 609 | 1206,Design Skiplist,57.3%,Hard,0.27958486221916157, https://leetcode.com/problems/design-skiplist 610 | 525,Contiguous Array,42.8%,Medium,0.2770270045517302, https://leetcode.com/problems/contiguous-array 611 | 730,Count Different Palindromic Subsequences,41.8%,Hard,0.2744368457017603, https://leetcode.com/problems/count-different-palindromic-subsequences 612 | 765,Couples Holding Hands,54.3%,Hard,0.27380672595816385, https://leetcode.com/problems/couples-holding-hands 613 | 1237,Find Positive Integer Solution for a Given Equation,69.7%,Easy,0.27239954676797734, https://leetcode.com/problems/find-positive-integer-solution-for-a-given-equation 614 | 886,Possible Bipartition,44.2%,Medium,0.2717271935192969, https://leetcode.com/problems/possible-bipartition 615 | 1203,Sort Items by Groups Respecting Dependencies,47.6%,Hard,0.2711095169699942, https://leetcode.com/problems/sort-items-by-groups-respecting-dependencies 616 | 949,Largest Time for Given Digits,35.8%,Easy,0.2686990844985702, https://leetcode.com/problems/largest-time-for-given-digits 617 | 1155,Number of Dice Rolls With Target Sum,49.0%,Medium,0.2664662333015083, https://leetcode.com/problems/number-of-dice-rolls-with-target-sum 618 | 567,Permutation in String,44.4%,Medium,0.2661799596792269, https://leetcode.com/problems/permutation-in-string 619 | 764,Largest Plus Sign,46.0%,Medium,0.26159729523649006, https://leetcode.com/problems/largest-plus-sign 620 | 35,Search Insert Position,42.6%,Easy,0.2608942296031672, https://leetcode.com/problems/search-insert-position 621 | 1114,Print in Order,65.7%,Easy,0.2548922496287901, https://leetcode.com/problems/print-in-order 622 | 371,Sum of Two Integers,50.7%,Medium,0.2521796503429838, https://leetcode.com/problems/sum-of-two-integers 623 | 621,Task Scheduler,50.1%,Medium,0.24973714088765747, https://leetcode.com/problems/task-scheduler 624 | 530,Minimum Absolute Difference in BST,53.8%,Easy,0.24715209136621874, https://leetcode.com/problems/minimum-absolute-difference-in-bst 625 | 622,Design Circular Queue,43.8%,Medium,0.2454927324105261, https://leetcode.com/problems/design-circular-queue 626 | 980,Unique Paths III,73.3%,Hard,0.245122458032985, https://leetcode.com/problems/unique-paths-iii 627 | 185,Department Top Three Salaries,34.5%,Hard,0.2428032059894028, https://leetcode.com/problems/department-top-three-salaries 628 | 501,Find Mode in Binary Search Tree,42.4%,Easy,0.24083782012126176, https://leetcode.com/problems/find-mode-in-binary-search-tree 629 | 402,Remove K Digits,28.4%,Medium,0.24067603007585034, https://leetcode.com/problems/remove-k-digits 630 | 87,Scramble String,33.7%,Hard,0.24038535774871578, https://leetcode.com/problems/scramble-string 631 | 496,Next Greater Element I,63.8%,Easy,0.23831034385769945, https://leetcode.com/problems/next-greater-element-i 632 | 747,Largest Number At Least Twice of Others,42.0%,Easy,0.23732818630616617, https://leetcode.com/problems/largest-number-at-least-twice-of-others 633 | 176,Second Highest Salary,31.6%,Easy,0.2367792886617929, https://leetcode.com/problems/second-highest-salary 634 | 665,Non-decreasing Array,19.5%,Easy,0.23531936993140348, https://leetcode.com/problems/non-decreasing-array 635 | 925,Long Pressed Name,40.5%,Easy,0.2342881158672749, https://leetcode.com/problems/long-pressed-name 636 | 397,Integer Replacement,32.9%,Medium,0.2322522675124501, https://leetcode.com/problems/integer-replacement 637 | 129,Sum Root to Leaf Numbers,49.1%,Medium,0.2308064240597789, https://leetcode.com/problems/sum-root-to-leaf-numbers 638 | 377,Combination Sum IV,45.3%,Medium,0.22987191984289432, https://leetcode.com/problems/combination-sum-iv 639 | 1044,Longest Duplicate Substring,31.9%,Hard,0.22891464780613163, https://leetcode.com/problems/longest-duplicate-substring 640 | 768,Max Chunks To Make Sorted II,48.7%,Hard,0.22767870647960103, https://leetcode.com/problems/max-chunks-to-make-sorted-ii 641 | 313,Super Ugly Number,45.0%,Medium,0.22252030417655333, https://leetcode.com/problems/super-ugly-number 642 | 942,DI String Match,72.6%,Easy,0.22018350968573291, https://leetcode.com/problems/di-string-match 643 | 931,Minimum Falling Path Sum,62.5%,Medium,0.21812080268374587, https://leetcode.com/problems/minimum-falling-path-sum 644 | 192,Word Frequency,25.8%,Medium,0.21614863444241852, https://leetcode.com/problems/word-frequency 645 | 832,Flipping an Image,76.2%,Easy,0.21201171094536553, https://leetcode.com/problems/flipping-an-image 646 | 503,Next Greater Element II,56.5%,Medium,0.20963047971710957, https://leetcode.com/problems/next-greater-element-ii 647 | 952,Largest Component Size by Common Factor,30.3%,Hard,0.20692071580732246, https://leetcode.com/problems/largest-component-size-by-common-factor 648 | 875,Koko Eating Bananas,52.1%,Medium,0.20615016122677673, https://leetcode.com/problems/koko-eating-bananas 649 | 145,Binary Tree Postorder Traversal,55.0%,Hard,0.20552748140927155, https://leetcode.com/problems/binary-tree-postorder-traversal 650 | 1138,Alphabet Board Path,48.4%,Medium,0.20526312603636132, https://leetcode.com/problems/alphabet-board-path 651 | 839,Similar String Groups,38.6%,Hard,0.2032282416132683, https://leetcode.com/problems/similar-string-groups 652 | 1254,Number of Closed Islands,60.5%,Medium,0.20312468442371787, https://leetcode.com/problems/number-of-closed-islands 653 | 179,Largest Number,28.8%,Medium,0.20162217031985052, https://leetcode.com/problems/largest-number 654 | 234,Palindrome Linked List,39.3%,Easy,0.2010217538033921, https://leetcode.com/problems/palindrome-linked-list 655 | 190,Reverse Bits,39.8%,Easy,0.2003539760062614, https://leetcode.com/problems/reverse-bits 656 | 714,Best Time to Buy and Sell Stock with Transaction Fee,54.7%,Medium,0.19966567025192705, https://leetcode.com/problems/best-time-to-buy-and-sell-stock-with-transaction-fee 657 | 477,Total Hamming Distance,50.4%,Medium,0.19966567025192705, https://leetcode.com/problems/total-hamming-distance 658 | 1095,Find in Mountain Array,35.8%,Hard,0.1989185047760601, https://leetcode.com/problems/find-in-mountain-array 659 | 827,Making A Large Island,45.7%,Hard,0.1980128865886302, https://leetcode.com/problems/making-a-large-island 660 | 705,Design HashSet,64.3%,Easy,0.19578302313828744, https://leetcode.com/problems/design-hashset 661 | 1286,Iterator for Combination,68.2%,Medium,0.1950000150537256, https://leetcode.com/problems/iterator-for-combination 662 | 791,Custom Sort String,65.7%,Medium,0.1922835495227023, https://leetcode.com/problems/custom-sort-string 663 | 1161,Maximum Level Sum of a Binary Tree,72.2%,Medium,0.19218058535585741, https://leetcode.com/problems/maximum-level-sum-of-a-binary-tree 664 | 1209,Remove All Adjacent Duplicates in String II,56.9%,Medium,0.19197498849459727, https://leetcode.com/problems/remove-all-adjacent-duplicates-in-string-ii 665 | 863,All Nodes Distance K in Binary Tree,55.4%,Medium,0.19019980471738818, https://leetcode.com/problems/all-nodes-distance-k-in-binary-tree 666 | 114,Flatten Binary Tree to Linked List,49.3%,Medium,0.19007687356143277, https://leetcode.com/problems/flatten-binary-tree-to-linked-list 667 | 678,Valid Parenthesis String,31.0%,Medium,0.1879537610768114, https://leetcode.com/problems/valid-parenthesis-string 668 | 100,Same Tree,53.4%,Easy,0.18473155681698394, https://leetcode.com/problems/same-tree 669 | 1466,Reorder Routes to Make All Paths Lead to the City Zero,63.5%,Medium,0.18400364297693944, https://leetcode.com/problems/reorder-routes-to-make-all-paths-lead-to-the-city-zero 670 | 27,Remove Element,48.2%,Easy,0.1824698257541195, https://leetcode.com/problems/remove-element 671 | 547,Friend Circles,58.6%,Medium,0.17970355268064825, https://leetcode.com/problems/friend-circles 672 | 83,Remove Duplicates from Sorted List,45.4%,Easy,0.17630177461145108, https://leetcode.com/problems/remove-duplicates-from-sorted-list 673 | 331,Verify Preorder Serialization of a Binary Tree,40.4%,Medium,0.17152193955024905, https://leetcode.com/problems/verify-preorder-serialization-of-a-binary-tree 674 | 144,Binary Tree Preorder Traversal,55.7%,Medium,0.1697556778961483, https://leetcode.com/problems/binary-tree-preorder-traversal 675 | 940,Distinct Subsequences II,41.5%,Hard,0.16917873135476025, https://leetcode.com/problems/distinct-subsequences-ii 676 | 309,Best Time to Buy and Sell Stock with Cooldown,47.4%,Medium,0.16775633188303693, https://leetcode.com/problems/best-time-to-buy-and-sell-stock-with-cooldown 677 | 330,Patching Array,34.5%,Hard,0.1670540846631662, https://leetcode.com/problems/patching-array 678 | 1143,Longest Common Subsequence,58.4%,Medium,0.1652774908136902, https://leetcode.com/problems/longest-common-subsequence 679 | 639,Decode Ways II,26.6%,Hard,0.1599143845440084, https://leetcode.com/problems/decode-ways-ii 680 | 404,Sum of Left Leaves,50.9%,Easy,0.15911645633949173, https://leetcode.com/problems/sum-of-left-leaves 681 | 151,Reverse Words in a String,21.9%,Medium,0.15669727732654176, https://leetcode.com/problems/reverse-words-in-a-string 682 | 965,Univalued Binary Tree,67.7%,Easy,0.15663732380491052, https://leetcode.com/problems/univalued-binary-tree 683 | 1366,Rank Teams by Votes,53.8%,Medium,0.15575452940923282, https://leetcode.com/problems/rank-teams-by-votes 684 | 326,Power of Three,42.1%,Easy,0.15523716814199412, https://leetcode.com/problems/power-of-three 685 | 414,Third Maximum Number,30.5%,Easy,0.15407631103237035, https://leetcode.com/problems/third-maximum-number 686 | 314,Binary Tree Vertical Order Traversal,45.3%,Medium,0.15148600467306356, https://leetcode.com/problems/binary-tree-vertical-order-traversal 687 | 1483,Kth Ancestor of a Tree Node,27.6%,Hard,0.14588927347112293, https://leetcode.com/problems/kth-ancestor-of-a-tree-node 688 | 713,Subarray Product Less Than K,39.1%,Medium,0.14543583198422752, https://leetcode.com/problems/subarray-product-less-than-k 689 | 181,Employees Earning More Than Their Managers,56.9%,Easy,0.1445812288111076, https://leetcode.com/problems/employees-earning-more-than-their-managers 690 | 1102,Path With Maximum Minimum Value,49.2%,Medium,0.1444815825552332, https://leetcode.com/problems/path-with-maximum-minimum-value 691 | 936,Stamping The Sequence,42.8%,Hard,0.14310084364067333, https://leetcode.com/problems/stamping-the-sequence 692 | 67,Add Binary,45.2%,Easy,0.13986861183823335, https://leetcode.com/problems/add-binary 693 | 554,Brick Wall,50.0%,Medium,0.1384696742651052, https://leetcode.com/problems/brick-wall 694 | 1029,Two City Scheduling,56.1%,Easy,0.13804422079620546, https://leetcode.com/problems/two-city-scheduling 695 | 934,Shortest Bridge,48.2%,Medium,0.1370833871926172, https://leetcode.com/problems/shortest-bridge 696 | 938,Range Sum of BST,81.3%,Easy,0.13320152292006351, https://leetcode.com/problems/range-sum-of-bst 697 | 199,Binary Tree Right Side View,54.1%,Medium,0.13319296807660722, https://leetcode.com/problems/binary-tree-right-side-view 698 | 668,Kth Smallest Number in Multiplication Table,45.6%,Hard,0.1330864537962701, https://leetcode.com/problems/kth-smallest-number-in-multiplication-table 699 | 123,Best Time to Buy and Sell Stock III,37.5%,Hard,0.12991500860874672, https://leetcode.com/problems/best-time-to-buy-and-sell-stock-iii 700 | 1025,Divisor Game,66.3%,Easy,0.12765181191244845, https://leetcode.com/problems/divisor-game 701 | 80,Remove Duplicates from Sorted Array II,44.0%,Medium,0.12604072089536503, https://leetcode.com/problems/remove-duplicates-from-sorted-array-ii 702 | 1218,Longest Arithmetic Subsequence of Given Difference,44.6%,Medium,0.12344419109112172, https://leetcode.com/problems/longest-arithmetic-subsequence-of-given-difference 703 | 177,Nth Highest Salary,31.4%,Medium,0.12247703235966204, https://leetcode.com/problems/nth-highest-salary 704 | 92,Reverse Linked List II,38.8%,Medium,0.12080664535613118, https://leetcode.com/problems/reverse-linked-list-ii 705 | 1123,Lowest Common Ancestor of Deepest Leaves,66.8%,Medium,0.12035544138590286, https://leetcode.com/problems/lowest-common-ancestor-of-deepest-leaves 706 | 1122,Relative Sort Array,67.7%,Easy,0.11712012545643594, https://leetcode.com/problems/relative-sort-array 707 | 948,Bag of Tokens,40.8%,Medium,0.1157359520346586, https://leetcode.com/problems/bag-of-tokens 708 | 812,Largest Triangle Area,58.3%,Easy,0.11506932978478719, https://leetcode.com/problems/largest-triangle-area 709 | 487,Max Consecutive Ones II,48.5%,Medium,0.11477551459242817, https://leetcode.com/problems/max-consecutive-ones-ii 710 | 669,Trim a Binary Search Tree,63.0%,Easy,0.11401857840094087, https://leetcode.com/problems/trim-a-binary-search-tree 711 | 674,Longest Continuous Increasing Subsequence,45.9%,Easy,0.11324303587009586, https://leetcode.com/problems/longest-continuous-increasing-subsequence 712 | 780,Reaching Points,29.4%,Hard,0.11233744121460561, https://leetcode.com/problems/reaching-points 713 | 40,Combination Sum II,48.2%,Medium,0.11145356111123644, https://leetcode.com/problems/combination-sum-ii 714 | 1447,Simplified Fractions,61.0%,Medium,0.1090999130829226, https://leetcode.com/problems/simplified-fractions 715 | 467,Unique Substrings in Wraparound String,35.6%,Medium,0.10734155493596446, https://leetcode.com/problems/unique-substrings-in-wraparound-string 716 | 872,Leaf-Similar Trees,64.5%,Easy,0.1047858919100548, https://leetcode.com/problems/leaf-similar-trees 717 | 142,Linked List Cycle II,37.3%,Medium,0.10019322804117618, https://leetcode.com/problems/linked-list-cycle-ii 718 | 717,1-bit and 2-bit Characters,48.8%,Easy,0.09745990610645301, https://leetcode.com/problems/1-bit-and-2-bit-characters 719 | 735,Asteroid Collision,41.0%,Medium,0.09542395191890234, https://leetcode.com/problems/asteroid-collision 720 | 983,Minimum Cost For Tickets,60.5%,Medium,0.09525339549949145, https://leetcode.com/problems/minimum-cost-for-tickets 721 | 583,Delete Operation for Two Strings,48.6%,Medium,0.09510858722224913, https://leetcode.com/problems/delete-operation-for-two-strings 722 | 559,Maximum Depth of N-ary Tree,68.7%,Easy,0.09468302393554026, https://leetcode.com/problems/maximum-depth-of-n-ary-tree 723 | 881,Boats to Save People,46.8%,Medium,0.09450889771017068, https://leetcode.com/problems/boats-to-save-people 724 | 701,Insert into a Binary Search Tree,77.7%,Medium,0.09328160107069587, https://leetcode.com/problems/insert-into-a-binary-search-tree 725 | 257,Binary Tree Paths,51.5%,Easy,0.09040028430515686, https://leetcode.com/problems/binary-tree-paths 726 | 367,Valid Perfect Square,41.7%,Easy,0.09021620582372886, https://leetcode.com/problems/valid-perfect-square 727 | 474,Ones and Zeroes,42.8%,Medium,0.08829260714567831, https://leetcode.com/problems/ones-and-zeroes 728 | 1108,Defanging an IP Address,87.5%,Easy,0.08632116644802212, https://leetcode.com/problems/defanging-an-ip-address 729 | 682,Baseball Game,63.7%,Easy,0.0851175150048191, https://leetcode.com/problems/baseball-game 730 | 1245,Tree Diameter,60.1%,Medium,0.08338160893905106, https://leetcode.com/problems/tree-diameter 731 | 1192,Critical Connections in a Network,48.6%,Hard,0.08169138321871633, https://leetcode.com/problems/critical-connections-in-a-network 732 | 581,Shortest Unsorted Continuous Subarray,31.1%,Easy,0.08061081614588511, https://leetcode.com/problems/shortest-unsorted-continuous-subarray 733 | 103,Binary Tree Zigzag Level Order Traversal,48.3%,Medium,0.08046023391882479, https://leetcode.com/problems/binary-tree-zigzag-level-order-traversal 734 | 1325,Delete Leaves With a Given Value,73.0%,Medium,0.07663322602091599, https://leetcode.com/problems/delete-leaves-with-a-given-value 735 | 203,Remove Linked List Elements,38.6%,Easy,0.07661491101784772, https://leetcode.com/problems/remove-linked-list-elements 736 | 989,Add to Array-Form of Integer,44.2%,Easy,0.07208884919207953, https://leetcode.com/problems/add-to-array-form-of-integer 737 | 523,Continuous Subarray Sum,24.6%,Medium,0.07166389251403688, https://leetcode.com/problems/continuous-subarray-sum 738 | 1300,Sum of Mutated Array Closest to Target,44.2%,Medium,0.07008120825318372, https://leetcode.com/problems/sum-of-mutated-array-closest-to-target 739 | 657,Robot Return to Origin,73.5%,Easy,0.06825676545444917, https://leetcode.com/problems/robot-return-to-origin 740 | 494,Target Sum,46.3%,Medium,0.06721153055721414, https://leetcode.com/problems/target-sum 741 | 1027,Longest Arithmetic Sequence,53.4%,Medium,0.06693948267510934, https://leetcode.com/problems/longest-arithmetic-sequence 742 | 997,Find the Town Judge,50.1%,Easy,0.06548984513511495, https://leetcode.com/problems/find-the-town-judge 743 | 1105,Filling Bookcase Shelves,58.1%,Medium,0.06464285626208545, https://leetcode.com/problems/filling-bookcase-shelves 744 | 485,Max Consecutive Ones,54.6%,Easy,0.06323871592532454, https://leetcode.com/problems/max-consecutive-ones 745 | 154,Find Minimum in Rotated Sorted Array II,41.6%,Hard,0.0624300068584125, https://leetcode.com/problems/find-minimum-in-rotated-sorted-array-ii 746 | 811,Subdomain Visit Count,69.9%,Easy,0.06132711569850354, https://leetcode.com/problems/subdomain-visit-count 747 | 472,Concatenated Words,43.7%,Hard,0.06120196522807572, https://leetcode.com/problems/concatenated-words 748 | 905,Sort Array By Parity,74.1%,Easy,0.058564742549882025, https://leetcode.com/problems/sort-array-by-parity 749 | 1233,Remove Sub-Folders from the Filesystem,59.5%,Medium,0.057076831135436705, https://leetcode.com/problems/remove-sub-folders-from-the-filesystem 750 | 1424,Diagonal Traverse II,42.4%,Medium,0.051227589206673384, https://leetcode.com/problems/diagonal-traverse-ii 751 | 1267,Count Servers that Communicate,57.9%,Medium,0.04902942724031861, https://leetcode.com/problems/count-servers-that-communicate 752 | 357,Count Numbers with Unique Digits,48.4%,Medium,0.04593229889743518, https://leetcode.com/problems/count-numbers-with-unique-digits 753 | 654,Maximum Binary Tree,79.9%,Medium,0.045786227004095396, https://leetcode.com/problems/maximum-binary-tree 754 | 1099,Two Sum Less Than K,60.6%,Easy,0.04510347333459475, https://leetcode.com/problems/two-sum-less-than-k 755 | 680,Valid Palindrome II,36.6%,Easy,0.04470617503841694, https://leetcode.com/problems/valid-palindrome-ii 756 | 1026,Maximum Difference Between Node and Ancestor,66.0%,Medium,0.04467244005159257, https://leetcode.com/problems/maximum-difference-between-node-and-ancestor 757 | 901,Online Stock Span,60.2%,Medium,0.041423317448777336, https://leetcode.com/problems/online-stock-span 758 | 1235,Maximum Profit in Job Scheduling,44.0%,Hard,0.040573516447166516, https://leetcode.com/problems/maximum-profit-in-job-scheduling 759 | 819,Most Common Word,44.8%,Easy,0.0404606389166018, https://leetcode.com/problems/most-common-word 760 | 1167,Minimum Cost to Connect Sticks,62.8%,Medium,0.03937516523483013, https://leetcode.com/problems/minimum-cost-to-connect-sticks 761 | 643,Maximum Average Subarray I,41.5%,Easy,0.03683657735649026, https://leetcode.com/problems/maximum-average-subarray-i 762 | 468,Validate IP Address,24.1%,Medium,0.0344861760711693, https://leetcode.com/problems/validate-ip-address 763 | 1079,Letter Tile Possibilities,75.4%,Medium,0.0333364202675918, https://leetcode.com/problems/letter-tile-possibilities 764 | 814,Binary Tree Pruning,74.5%,Medium,0.03113091859517317, https://leetcode.com/problems/binary-tree-pruning 765 | 1179,Reformat Department Table,80.6%,Easy,0.030653741091002412, https://leetcode.com/problems/reformat-department-table 766 | 779,K-th Symbol in Grammar,37.2%,Medium,0.029050699422092676, https://leetcode.com/problems/k-th-symbol-in-grammar 767 | 917,Reverse Only Letters,58.0%,Easy,0.0286552557603761, https://leetcode.com/problems/reverse-only-letters 768 | 709,To Lower Case,79.3%,Easy,0.02780531308033682, https://leetcode.com/problems/to-lower-case 769 | 1342,Number of Steps to Reduce a Number to Zero,86.3%,Easy,0.027616528967847002, https://leetcode.com/problems/number-of-steps-to-reduce-a-number-to-zero 770 | 783,Minimum Distance Between BST Nodes,52.6%,Easy,0.026196651946570663, https://leetcode.com/problems/minimum-distance-between-bst-nodes 771 | 1051,Height Checker,71.1%,Easy,0.02562053032534798, https://leetcode.com/problems/height-checker 772 | 541,Reverse String II,48.4%,Easy,0.025349899895526405, https://leetcode.com/problems/reverse-string-ii 773 | 1089,Duplicate Zeros,52.9%,Easy,0.019397159882735136, https://leetcode.com/problems/duplicate-zeros 774 | 1365,How Many Numbers Are Smaller Than the Current Number,85.6%,Easy,0.015926721367078105, https://leetcode.com/problems/how-many-numbers-are-smaller-than-the-current-number 775 | 1313,Decompress Run-Length Encoded List,85.1%,Easy,0.012088391385967972, https://leetcode.com/problems/decompress-run-length-encoded-list 776 | 1281,Subtract the Product and Sum of Digits of an Integer,85.2%,Easy,0.01090820742546429, https://leetcode.com/problems/subtract-the-product-and-sum-of-digits-of-an-integer 777 | 1480,Running Sum of 1d Array,90.5%,Easy,0.010437827166841182, https://leetcode.com/problems/running-sum-of-1d-array 778 | 700,Search in a Binary Search Tree,73.1%,Easy,0.008512500860171227, https://leetcode.com/problems/search-in-a-binary-search-tree 779 | 1530,Number of Good Leaf Nodes Pairs,53.6%,Medium,0.005780362915499436, https://leetcode.com/problems/number-of-good-leaf-nodes-pairs 780 | 545,Boundary of Binary Tree,38.9%,Medium,0, https://leetcode.com/problems/boundary-of-binary-tree 781 | 644,Maximum Average Subarray II,32.0%,Hard,0, https://leetcode.com/problems/maximum-average-subarray-ii 782 | 481,Magical String,47.5%,Medium,0, https://leetcode.com/problems/magical-string 783 | 506,Relative Ranks,50.5%,Easy,0, https://leetcode.com/problems/relative-ranks 784 | 514,Freedom Trail,43.0%,Hard,0, https://leetcode.com/problems/freedom-trail 785 | 520,Detect Capital,54.2%,Easy,0, https://leetcode.com/problems/detect-capital 786 | 521,Longest Uncommon Subsequence I ,57.6%,Easy,0, https://leetcode.com/problems/longest-uncommon-subsequence-i 787 | 522,Longest Uncommon Subsequence II,34.0%,Medium,0, https://leetcode.com/problems/longest-uncommon-subsequence-ii 788 | 526,Beautiful Arrangement,57.8%,Medium,0, https://leetcode.com/problems/beautiful-arrangement 789 | 533,Lonely Pixel II,47.9%,Medium,0, https://leetcode.com/problems/lonely-pixel-ii 790 | 569,Median Employee Salary,57.7%,Hard,0, https://leetcode.com/problems/median-employee-salary 791 | 638,Shopping Offers,51.5%,Medium,0, https://leetcode.com/problems/shopping-offers 792 | 651,4 Keys Keyboard,52.5%,Medium,0, https://leetcode.com/problems/4-keys-keyboard 793 | 656,Coin Path,29.0%,Hard,0, https://leetcode.com/problems/coin-path 794 | 667,Beautiful Arrangement II,54.3%,Medium,0, https://leetcode.com/problems/beautiful-arrangement-ii 795 | 756,Pyramid Transition Matrix,54.6%,Medium,0, https://leetcode.com/problems/pyramid-transition-matrix 796 | 782,Transform to Chessboard,46.5%,Hard,0, https://leetcode.com/problems/transform-to-chessboard 797 | 789,Escape The Ghosts,57.4%,Medium,0, https://leetcode.com/problems/escape-the-ghosts 798 | 808,Soup Servings,39.9%,Medium,0, https://leetcode.com/problems/soup-servings 799 | 813,Largest Sum of Averages,49.9%,Medium,0, https://leetcode.com/problems/largest-sum-of-averages 800 | 816,Ambiguous Coordinates,47.2%,Medium,0, https://leetcode.com/problems/ambiguous-coordinates 801 | 838,Push Dominoes,48.5%,Medium,0, https://leetcode.com/problems/push-dominoes 802 | 847,Shortest Path Visiting All Nodes,52.0%,Hard,0, https://leetcode.com/problems/shortest-path-visiting-all-nodes 803 | 879,Profitable Schemes,39.8%,Hard,0, https://leetcode.com/problems/profitable-schemes 804 | 519,Random Flip Matrix,36.7%,Medium,0, https://leetcode.com/problems/random-flip-matrix 805 | 906,Super Palindromes,32.7%,Hard,0, https://leetcode.com/problems/super-palindromes 806 | 916,Word Subsets,47.8%,Medium,0, https://leetcode.com/problems/word-subsets 807 | 944,Delete Columns to Make Sorted,70.3%,Easy,0, https://leetcode.com/problems/delete-columns-to-make-sorted 808 | 919,Complete Binary Tree Inserter,57.3%,Medium,0, https://leetcode.com/problems/complete-binary-tree-inserter 809 | 954,Array of Doubled Pairs,35.6%,Medium,0, https://leetcode.com/problems/array-of-doubled-pairs 810 | 955,Delete Columns to Make Sorted II,33.2%,Medium,0, https://leetcode.com/problems/delete-columns-to-make-sorted-ii 811 | 962,Maximum Width Ramp,45.4%,Medium,0, https://leetcode.com/problems/maximum-width-ramp 812 | 988,Smallest String Starting From Leaf,46.1%,Medium,0, https://leetcode.com/problems/smallest-string-starting-from-leaf 813 | 1059,All Paths from Source Lead to Destination,44.7%,Medium,0, https://leetcode.com/problems/all-paths-from-source-lead-to-destination 814 | 1012,Numbers With Repeated Digits,37.5%,Hard,0, https://leetcode.com/problems/numbers-with-repeated-digits 815 | 1015,Smallest Integer Divisible by K,32.1%,Medium,0, https://leetcode.com/problems/smallest-integer-divisible-by-k 816 | 1016,Binary String With Substrings Representing 1 To N,58.8%,Medium,0, https://leetcode.com/problems/binary-string-with-substrings-representing-1-to-n 817 | 1020,Number of Enclaves,57.8%,Medium,0, https://leetcode.com/problems/number-of-enclaves 818 | 1037,Valid Boomerang,37.9%,Easy,0, https://leetcode.com/problems/valid-boomerang 819 | 1182,Shortest Distance to Target Color,52.8%,Medium,0, https://leetcode.com/problems/shortest-distance-to-target-color 820 | 1199,Minimum Time to Build Blocks,37.4%,Hard,0, https://leetcode.com/problems/minimum-time-to-build-blocks 821 | 1078,Occurrences After Bigram,64.7%,Easy,0, https://leetcode.com/problems/occurrences-after-bigram 822 | 1090,Largest Values From Labels,58.9%,Medium,0, https://leetcode.com/problems/largest-values-from-labels 823 | 1272,Remove Interval,58.6%,Medium,0, https://leetcode.com/problems/remove-interval 824 | 1287,Element Appearing More Than 25% In Sorted Array,60.2%,Easy,0, https://leetcode.com/problems/element-appearing-more-than-25-in-sorted-array 825 | 1289,Minimum Falling Path Sum II,60.9%,Hard,0, https://leetcode.com/problems/minimum-falling-path-sum-ii 826 | 1314,Matrix Block Sum,73.7%,Medium,0, https://leetcode.com/problems/matrix-block-sum 827 | 1316,Distinct Echo Substrings,46.4%,Hard,0, https://leetcode.com/problems/distinct-echo-substrings 828 | 1144,Decrease Elements To Make Array Zigzag,45.4%,Medium,0, https://leetcode.com/problems/decrease-elements-to-make-array-zigzag 829 | 1147,Longest Chunked Palindrome Decomposition,58.6%,Hard,0, https://leetcode.com/problems/longest-chunked-palindrome-decomposition 830 | 1302,Deepest Leaves Sum,83.6%,Medium,0, https://leetcode.com/problems/deepest-leaves-sum 831 | 1331,Rank Transform of an Array,58.0%,Easy,0, https://leetcode.com/problems/rank-transform-of-an-array 832 | 1184,Distance Between Bus Stops,54.5%,Easy,0, https://leetcode.com/problems/distance-between-bus-stops 833 | 1207,Unique Number of Occurrences,71.6%,Easy,0, https://leetcode.com/problems/unique-number-of-occurrences 834 | 1514,Path with Maximum Probability,36.5%,Medium,0, https://leetcode.com/problems/path-with-maximum-probability 835 | 1261,Find Elements in a Contaminated Binary Tree,74.3%,Medium,0, https://leetcode.com/problems/find-elements-in-a-contaminated-binary-tree 836 | 1269,Number of Ways to Stay in the Same Place After Some Steps,43.2%,Hard,0, https://leetcode.com/problems/number-of-ways-to-stay-in-the-same-place-after-some-steps 837 | 1270,All People Report to the Given Manager,87.1%,Medium,0, https://leetcode.com/problems/all-people-report-to-the-given-manager 838 | 1346,Check If N and Its Double Exist,37.9%,Easy,0, https://leetcode.com/problems/check-if-n-and-its-double-exist 839 | 1387,Sort Integers by The Power Value,70.2%,Medium,0, https://leetcode.com/problems/sort-integers-by-the-power-value 840 | 1388,Pizza With 3n Slices,44.7%,Hard,0, https://leetcode.com/problems/pizza-with-3n-slices 841 | 1377,Frog Position After T Seconds,33.6%,Hard,0, https://leetcode.com/problems/frog-position-after-t-seconds 842 | 1401,Circle and Rectangle Overlapping,41.8%,Medium,0, https://leetcode.com/problems/circle-and-rectangle-overlapping 843 | 1392,Longest Happy Prefix,40.1%,Hard,0, https://leetcode.com/problems/longest-happy-prefix 844 | 1414,Find the Minimum Number of Fibonacci Numbers Whose Sum Is K,63.2%,Medium,0, https://leetcode.com/problems/find-the-minimum-number-of-fibonacci-numbers-whose-sum-is-k 845 | 1422,Maximum Score After Splitting a String,54.7%,Easy,0, https://leetcode.com/problems/maximum-score-after-splitting-a-string 846 | 1449,Form Largest Integer With Digits That Add up to Target,41.8%,Hard,0, https://leetcode.com/problems/form-largest-integer-with-digits-that-add-up-to-target 847 | 1441,Build an Array With Stack Operations,68.7%,Easy,0, https://leetcode.com/problems/build-an-array-with-stack-operations 848 | 1461,Check If a String Contains All Binary Codes of Size K,44.6%,Medium,0, https://leetcode.com/problems/check-if-a-string-contains-all-binary-codes-of-size-k 849 | 1452,People Whose List of Favorite Companies Is Not a Subset of Another List,53.3%,Medium,0, https://leetcode.com/problems/people-whose-list-of-favorite-companies-is-not-a-subset-of-another-list 850 | 1471,The k Strongest Values in an Array,57.0%,Medium,0, https://leetcode.com/problems/the-k-strongest-values-in-an-array 851 | 1494,Parallel Courses II,32.0%,Hard,0, https://leetcode.com/problems/parallel-courses-ii 852 | 1482,Minimum Number of Days to Make m Bouquets,45.8%,Medium,0, https://leetcode.com/problems/minimum-number-of-days-to-make-m-bouquets 853 | 1488,Avoid Flood in The City,25.3%,Medium,0, https://leetcode.com/problems/avoid-flood-in-the-city 854 | 1508,Range Sum of Sorted Subarray Sums,68.3%,Medium,0, https://leetcode.com/problems/range-sum-of-sorted-subarray-sums 855 | 1509,Minimum Difference Between Largest and Smallest Value in Three Moves,51.0%,Medium,0, https://leetcode.com/problems/minimum-difference-between-largest-and-smallest-value-in-three-moves 856 | 1498,Number of Subsequences That Satisfy the Given Sum Condition,36.7%,Medium,0, https://leetcode.com/problems/number-of-subsequences-that-satisfy-the-given-sum-condition 857 | 1499,Max Value of Equation,44.4%,Hard,0, https://leetcode.com/problems/max-value-of-equation 858 | 1503,Last Moment Before All Ants Fall Out of a Plank,51.5%,Medium,0, https://leetcode.com/problems/last-moment-before-all-ants-fall-out-of-a-plank 859 | 1525,Number of Good Ways to Split a String,69.8%,Medium,0, https://leetcode.com/problems/number-of-good-ways-to-split-a-string 860 | 1526,Minimum Number of Increments on Subarrays to Form a Target Array,57.7%,Hard,0, https://leetcode.com/problems/minimum-number-of-increments-on-subarrays-to-form-a-target-array 861 | 1513,Number of Substrings With Only 1s,40.3%,Medium,0, https://leetcode.com/problems/number-of-substrings-with-only-1s 862 | 1546,Maximum Number of Non-Overlapping Subarrays With Sum Equals Target,40.6%,Medium,0, https://leetcode.com/problems/maximum-number-of-non-overlapping-subarrays-with-sum-equals-target 863 | 1506,Find Root of N-Ary Tree,80.0%,Medium,0, https://leetcode.com/problems/find-root-of-n-ary-tree 864 | 1516,Move Sub-Tree of N-Ary Tree,60.1%,Hard,0, https://leetcode.com/problems/move-sub-tree-of-n-ary-tree 865 | 1544,Make The String Great,54.4%,Easy,0, https://leetcode.com/problems/make-the-string-great 866 | 1538,Guess the Majority in a Hidden Array,63.2%,Medium,0, https://leetcode.com/problems/guess-the-majority-in-a-hidden-array 867 | --------------------------------------------------------------------------------