├── 717 - 1-bit and 2-bit Characters.cpp ├── 724 find pivot point.cpp ├── majority element.cpp ├── 387 first unique character in a string.cpp ├── single number 2.cpp ├── invert the binary tree.cpp ├── 278 first and bad version.cpp ├── 198_house_robber.cpp ├── 704 - Binary Search.cpp ├── array 3 pointer.cpp ├── 219_contais_duplicate_2 ├── 832 flipping an image.cpp ├── 204_count_primes.cpp ├── Sum of pairwise Hamming Distance.cpp ├── Sliding Window Maximum.cpp ├── 38 count and say.cpp ├── 415 Add string.cpp ├── 475- heaters.cpp ├── 67 Add binary.cpp ├── Palindrome Partitioning II.cpp ├── 110. Balanced Binary Tree.cpp ├── 844-BackspaceStringCompare.cpp ├── 690-employee_importance.cpp ├── Sum Root to Leaf Numbers.cpp ├── Shortest Unique Prefix.cpp ├── 733. Flood Fill.cpp ├── 859_BuddyString.cpp ├── 374. Guess Number Higher or Lower.cpp ├── lowest common ancestor.cpp └── question_list.md /717 - 1-bit and 2-bit Characters.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | bool isOneBitCharacter(vector& bits) 4 | { 5 | bool flag=false; 6 | for(int i=0;i& nums) { 4 | int sum=0; 5 | for(int i:nums) 6 | { 7 | sum+=i; 8 | } 9 | int pre=0; 10 | for(int i=0;i &A) { 2 | 3 | int counter=0; 4 | int element=-1; 5 | for(int i=0;i 2 | int Solution::singleNumber(const vector &A) { 3 | 4 | vector ar(70,0); 5 | for(int i:A) 6 | { 7 | bitset<64> temp=i; 8 | for(int i=0;i<64;i++) 9 | { 10 | if(temp[i]==1) 11 | { 12 | ar[i]++; 13 | ar[i]%=3; 14 | } 15 | } 16 | } 17 | int64_t ans=0; 18 | for(int i=0;i<64;i++) 19 | { 20 | if(ar[i]==1) 21 | { 22 | ans+=pow(2,i); 23 | } 24 | } 25 | return ans; 26 | } 27 | -------------------------------------------------------------------------------- /invert the binary tree.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Definition for binary tree 3 | * struct TreeNode { 4 | * int val; 5 | * TreeNode *left; 6 | * TreeNode *right; 7 | * TreeNode(int x) : val(x), left(NULL), right(NULL) {} 8 | * }; 9 | */ 10 | void dfs(TreeNode* parent) 11 | { 12 | if(parent==NULL) 13 | { 14 | return; 15 | } 16 | dfs(parent->left); 17 | dfs(parent->right); 18 | TreeNode* temp=parent->left; 19 | parent->left=parent->right; 20 | parent->right=temp; 21 | } 22 | TreeNode* Solution::invertTree(TreeNode* A) { 23 | dfs(A); 24 | return A; 25 | } 26 | -------------------------------------------------------------------------------- /278 first and bad version.cpp: -------------------------------------------------------------------------------- 1 | // The API isBadVersion is defined for you. 2 | // bool isBadVersion(int version); 3 | 4 | class Solution { 5 | public: 6 | int firstBadVersion(int n) { 7 | int st=1; 8 | int en=n; 9 | int ans=1; 10 | while(en>=st) 11 | { 12 | int mid= st + (en-st)/2; 13 | if(isBadVersion(mid)) 14 | { 15 | ans=mid; 16 | en=mid-1; 17 | } 18 | else 19 | { 20 | st=mid+1; 21 | } 22 | } 23 | return ans; 24 | } 25 | }; -------------------------------------------------------------------------------- /198_house_robber.cpp: -------------------------------------------------------------------------------- 1 | 2 | map,int> dp; 3 | int dpsol(int pos,bool last,vector &nums) 4 | { 5 | if(pos>=nums.size()) 6 | { 7 | return 0; 8 | } 9 | if(dp.count(make_pair(pos,last))!=0) 10 | { 11 | return dp[make_pair(pos,last)]; 12 | } 13 | int t1=dpsol(pos+1,true,nums); 14 | if(last==true) 15 | { 16 | t1=max(t1,dpsol(pos+1,false,nums)+nums[pos]); 17 | } 18 | return dp[make_pair(pos,last)]=t1; 19 | } 20 | class Solution { 21 | public: 22 | int rob(vector& nums) { 23 | dp.clear(); 24 | return dpsol(0,true,nums); 25 | } 26 | }; 27 | -------------------------------------------------------------------------------- /704 - Binary Search.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | int search(vector& nums, int target) { 4 | int st=0; 5 | int en=nums.size()-1; 6 | int ans=-1; 7 | while(en>=st) 8 | { 9 | int mid=(st+en)/2; 10 | if(nums[mid]>target) 11 | { 12 | en=mid-1; 13 | } 14 | else if(nums[mid] &A, const vector &B, const vector &C) { 2 | 3 | 4 | int ans=INT_MAX; 5 | int p1=0,p2=0,p3=0; 6 | while(p1& nums, int k) { 4 | vector > vp; 5 | for(int i=0;i> flipAndInvertImage(vector>& A) { 4 | 5 | for(int i=0;i2) 7 | { 8 | ans++; 9 | for(int i=3;i 2 | int Solution::hammingDistance(const vector &A) { 3 | 4 | int mod = (int)1e9 + 7; 5 | int ans=0; 6 | vector ar(50,0); 7 | for(int i:A) 8 | { 9 | bitset<32> num=i; 10 | for(int j=0;j<32;j++) 11 | { 12 | if(num[j]==1) 13 | { 14 | ar[j]++; 15 | } 16 | } 17 | } 18 | for(int i=0;i<32;i++) 19 | { 20 | int64_t temp=ar[i]*(A.size()-ar[i]); 21 | temp%=mod; 22 | ans+=temp; 23 | ans%=mod; 24 | } 25 | ans*=2; 26 | ans%=mod; 27 | return ans; 28 | } 29 | -------------------------------------------------------------------------------- /Sliding Window Maximum.cpp: -------------------------------------------------------------------------------- 1 | vector Solution::slidingMaximum(const vector &A, int B) { 2 | 3 | deque dq; 4 | for(int i=0;i ans; 13 | ans.push_back(A[dq.front()]); 14 | for(int i=B;i-1 and la>-1) 9 | { 10 | ans+=((num1[la]+num2[lb]-'0'-'0'+carry)%10+'0'); 11 | carry=(num1[la]+num2[lb]-'0'-'0'+carry)/10; 12 | la--; 13 | lb--; 14 | } 15 | while(la>-1) 16 | { 17 | ans+=((num1[la]-'0'+carry)%10+'0'); 18 | carry=(num1[la]-'0'+carry)/10; 19 | la--; 20 | } 21 | while(lb>-1) 22 | { 23 | ans+=((num2[lb]-'0'+carry)%10+'0'); 24 | carry=(num2[lb]-'0'+carry)/10; 25 | lb--; 26 | } 27 | if(carry) 28 | { 29 | ans+='1'; 30 | } 31 | reverse(ans.begin(),ans.end()); 32 | return ans; 33 | } 34 | }; 35 | -------------------------------------------------------------------------------- /475- heaters.cpp: -------------------------------------------------------------------------------- 1 | int rheater[25010]; 2 | 3 | class Solution { 4 | public: 5 | int findRadius(vector& houses, vector& heaters) { 6 | 7 | sort(heaters.begin(),heaters.end()); 8 | for(int i=heaters.size()-1;i>-1;i--) 9 | { 10 | rheater[heaters.size()-1-i]=-heaters[i]; 11 | } 12 | rheater[heaters.size()]=2e9; 13 | heaters.push_back(2e9+1); 14 | int64_t max_radius=0; 15 | for(int i=0;i-1 and lb>-1) 9 | { 10 | ans+=((a[la]+b[lb]+carry-'0'-'0')%2 + '0'); 11 | carry=(a[la]+b[lb]+carry-'0'-'0')/2; 12 | la--; 13 | lb--; 14 | //cout<<"1\n"; 15 | } 16 | while(la>-1) 17 | { 18 | ans+=((a[la]+carry-'0')%2+'0'); 19 | carry=(a[la]+carry-'0')/2; 20 | la--; 21 | //cout<<2<<"\n"; 22 | } 23 | while(lb>-1) 24 | { 25 | ans+=((b[lb]+carry-'0')%2 + '0'); 26 | carry=(b[lb]+carry-'0')/2; 27 | lb--; 28 | } 29 | if(carry) 30 | { 31 | ans+='1'; 32 | } 33 | reverse(ans.begin(),ans.end()); 34 | return ans; 35 | } 36 | }; 37 | -------------------------------------------------------------------------------- /Palindrome Partitioning II.cpp: -------------------------------------------------------------------------------- 1 | bool check_palindrome(int st,int en,string A) 2 | { 3 | while(en>st) 4 | { 5 | if(A[en]!=A[st]) 6 | { 7 | return false; 8 | } 9 | st++; 10 | en--; 11 | } 12 | return true; 13 | } 14 | int dpsol(int st,string A,int dp[1000]) 15 | { 16 | int k=1000; 17 | if(dp[st]!=-1) 18 | { 19 | return dp[st]; 20 | } 21 | for(int i=st;ileft != NULL) 19 | { 20 | left += dfs(ch->left); 21 | } 22 | if(ch->right != NULL) 23 | { 24 | right += dfs(ch->right); 25 | } 26 | if(abs(left-right)>1) 27 | { 28 | ans=false; 29 | } 30 | return (max(left,right)+1); 31 | } 32 | 33 | class Solution { 34 | public: 35 | bool isBalanced(TreeNode* root) { 36 | ans=true; 37 | if(root != NULL) 38 | { 39 | dfs(root); 40 | } 41 | return ans; 42 | } 43 | }; -------------------------------------------------------------------------------- /844-BackspaceStringCompare.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | bool backspaceCompare(string S, string T) { 4 | stack s1,s2; 5 | for(char i:S) 6 | { 7 | if(i=='#' and s1.size()>0) 8 | { 9 | s1.pop(); 10 | } 11 | else 12 | { 13 | s1.push(i); 14 | } 15 | } 16 | for(char i:T) 17 | { 18 | if(i=='#' and s2.size()>0) 19 | { 20 | s2.pop(); 21 | } 22 | else 23 | { 24 | s2.push(i); 25 | } 26 | } 27 | bool flag=true; 28 | if(s1.size()==s2.size()) 29 | { 30 | while(s1.size()>0) 31 | { 32 | if(s1.top()!=s2.top()) 33 | { 34 | flag=false; 35 | } 36 | s1.pop(); 37 | s2.pop(); 38 | } 39 | } 40 | else 41 | { 42 | flag=false; 43 | } 44 | return flag; 45 | } 46 | }; -------------------------------------------------------------------------------- /690-employee_importance.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | // Definition for Employee. 3 | class Employee { 4 | public: 5 | int id; 6 | int importance; 7 | vector subordinates; 8 | }; 9 | */ 10 | 11 | class Solution { 12 | public: 13 | int getImportance(vector employees, int id) { 14 | vector childs; 15 | int pos=0; 16 | childs.push_back(id); 17 | while(posid==childs[pos]) 22 | { 23 | for(int j:i->subordinates) 24 | { 25 | childs.push_back(j); 26 | } 27 | break; 28 | } 29 | } 30 | pos++; 31 | } 32 | set ss; 33 | for(int i:childs) 34 | { 35 | ss.insert(i); 36 | } 37 | int ans=0; 38 | for(auto i:employees) 39 | { 40 | if(ss.find(i->id)!=ss.end()) 41 | { 42 | ans+=i->importance; 43 | } 44 | } 45 | return ans; 46 | } 47 | }; -------------------------------------------------------------------------------- /Sum Root to Leaf Numbers.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Definition for binary tree 3 | * struct TreeNode { 4 | * int val; 5 | * TreeNode *left; 6 | * TreeNode *right; 7 | * TreeNode(int x) : val(x), left(NULL), right(NULL) {} 8 | * }; 9 | */ 10 | int mod=1003; 11 | int ans=0; 12 | void dfs(TreeNode* parent,int value) 13 | { 14 | if(parent==NULL) 15 | { 16 | return; 17 | } 18 | else if(parent->left==NULL and parent->right==NULL) 19 | { 20 | value*=10; 21 | value%=mod; 22 | value+=parent->val; 23 | value%=mod; 24 | //cout<val; 33 | dfs(parent->left,value); 34 | dfs(parent->right,value); 35 | } 36 | } 37 | int Solution::sumNumbers(TreeNode* A) { 38 | ans=0; 39 | dfs(A,0); 40 | return ans; 41 | } 42 | 43 | 44 | 45 | 46 | 47 | // (a+b)%m = a%m + b%m 48 | 49 | // (a*b)%m =a%m * b%m 50 | 51 | 52 | 53 | 54 | 55 | // 123%m = (100%m + 20%m + 3%m)%m 56 | 57 | 58 | 59 | 60 | //1 -> 10 + 2=12 -> 4 =120 + 4==124 61 | 62 | // dfs() 63 | -------------------------------------------------------------------------------- /Shortest Unique Prefix.cpp: -------------------------------------------------------------------------------- 1 | class trie{ 2 | public: 3 | trie* leaf[26]; 4 | int val=0; 5 | }; 6 | vector Solution::prefix(vector &A) { 7 | trie* start=new trie; 8 | for(int i=0;i<26;i++) 9 | { 10 | start->leaf[i]=NULL; 11 | } 12 | for(string i:A) 13 | { 14 | trie* path=start; 15 | for(char j:i) 16 | { 17 | if(path->leaf[j-'a']==NULL) 18 | { 19 | trie* temp=new trie; 20 | for(int k=0;k<26;k++) 21 | { 22 | temp->leaf[k]=NULL; 23 | } 24 | temp->val=1; 25 | path->leaf[j-'a']=temp; 26 | path=temp; 27 | } 28 | else 29 | { 30 | path=path->leaf[j-'a']; 31 | path->val++; 32 | } 33 | } 34 | } 35 | vector ans; 36 | for(string i:A) 37 | { 38 | string prefix=""; 39 | trie* path=start; 40 | for(char j:i) 41 | { 42 | if(path->val==1) 43 | { 44 | break; 45 | } 46 | else 47 | { 48 | prefix+=j; 49 | path=path->leaf[j-'a']; 50 | } 51 | } 52 | ans.push_back(prefix); 53 | } 54 | return ans; 55 | } 56 | -------------------------------------------------------------------------------- /733. Flood Fill.cpp: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | vector> floodFill(vector>& image, int sr, int sc, int newColor) { 4 | 5 | if(image.size()==0 || newColor == image[sr][sc] ) 6 | { 7 | return image; 8 | } 9 | else 10 | { 11 | int oldcolor=image[sr][sc]; 12 | image[sr][sc]=newColor; 13 | if(sr>0) 14 | { 15 | if(image[sr-1][sc]==oldcolor) 16 | { 17 | floodFill(image,sr-1,sc,newColor); 18 | } 19 | } 20 | if(sc>0) 21 | { 22 | if(image[sr][sc-1]==oldcolor) 23 | { 24 | floodFill(image,sr,sc-1,newColor); 25 | } 26 | } 27 | if(sr l; 7 | int ar[30]; 8 | for(int i=0;i<28;i++) 9 | { 10 | ar[i]=0; 11 | } 12 | int maxx=0; 13 | for(int i=0;i4) 24 | { 25 | return false; 26 | } 27 | } 28 | if(l.size()==4) 29 | { 30 | if(l[0]==l[3] and l[1]==l[2]) 31 | { 32 | return true; 33 | } 34 | return false; 35 | } 36 | else if(l.size()==0) 37 | { 38 | if(maxx>1) 39 | { 40 | return true; 41 | } 42 | return false; 43 | } 44 | return false; 45 | } 46 | else 47 | { 48 | return false; 49 | } 50 | } 51 | }; 52 | -------------------------------------------------------------------------------- /374. Guess Number Higher or Lower.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Forward declaration of guess API. 3 | * @param num your guess 4 | * @return -1 if num is lower than the guess number 5 | * 1 if num is higher than the guess number 6 | * otherwise return 0 7 | * int guess(int num); 8 | */ 9 | 10 | class Solution { 11 | public: 12 | int guessNumber(int n) { 13 | int en=n; 14 | int st=1; 15 | while(en>=st) 16 | { 17 | int mid = st + (en-st)/2; 18 | if(guess(mid)==0) 19 | { 20 | return mid; 21 | } 22 | else if(guess(mid)==-1) 23 | { 24 | en=mid-1; 25 | } 26 | else 27 | { 28 | st=mid+1; 29 | } 30 | } 31 | return 1; 32 | } 33 | }; 34 | 35 | //O(log n) 36 | 37 | // 1 .. n 38 | 39 | 40 | // chosen =10 41 | 42 | // what is that number 43 | 44 | // k=10 45 | // guess(k) == actual :0 46 | 47 | 48 | // 7 49 | // guess(k) < actual : 1 50 | 51 | 52 | // 11 53 | // guess(k) > actual : -1 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | // chosen number =35 63 | // n=100 64 | 65 | 66 | 67 | 68 | // mid = 100/2 =50 69 | // guess(50) :-1 70 | // range reduced by a factor of 2 71 | // 1 - 100 72 | // 1 - 50 73 | 74 | // mid 25 75 | // guess(25) : +1 76 | // range 25-50 77 | 78 | 79 | // mid = 37 80 | // guess(37) : -1 81 | // range 25-36 82 | 83 | // mid 84 | 85 | 86 | -------------------------------------------------------------------------------- /lowest common ancestor.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Definition for binary tree 3 | * struct TreeNode { 4 | * int val; 5 | * TreeNode *left; 6 | * TreeNode *right; 7 | * TreeNode(int x) : val(x), left(NULL), right(NULL) {} 8 | * }; 9 | */ 10 | stack s1,s2; 11 | bool flag=false; 12 | void dfs(TreeNode* parent,bool type,int match) 13 | { 14 | if(parent==NULL || flag) 15 | { 16 | return ; 17 | } 18 | else 19 | { 20 | if(type) 21 | { 22 | s1.push(parent->val); 23 | } 24 | else 25 | { 26 | s2.push(parent->val); 27 | } 28 | if(parent->val==match) 29 | { 30 | flag=true; 31 | return; 32 | } 33 | else 34 | { 35 | dfs(parent->left,type,match); 36 | dfs(parent->right,type,match); 37 | } 38 | } 39 | if(!flag) 40 | { 41 | if(type) 42 | { 43 | s1.pop(); 44 | } 45 | else 46 | { 47 | s2.pop(); 48 | } 49 | } 50 | } 51 | int Solution::lca(TreeNode* A, int B, int C) { 52 | while(!s1.empty()) 53 | { 54 | s1.pop(); 55 | } 56 | while(!s2.empty()) 57 | { 58 | s2.pop(); 59 | } 60 | flag=false; 61 | dfs(A,true,B); 62 | flag=false; 63 | dfs(A,false,C); 64 | if(s1.size()==0 || s2.size()==0) 65 | { 66 | return -1; 67 | } 68 | while(!s1.empty() and !s2.empty()) 69 | { 70 | if(s1.top()==s2.top()) 71 | { 72 | return s1.top(); 73 | } 74 | else if(s1.size()>s2.size()) 75 | { 76 | s1.pop(); 77 | } 78 | else 79 | { 80 | s2.pop(); 81 | } 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /question_list.md: -------------------------------------------------------------------------------- 1 | # Leetcode Questions By Companies 2 | 3 | A list of LeetCode questions with the corresponding companies sorted by difficulty level. 4 | 5 | | **ID** | **Name** | **Difficulty.Level** | **Companies** | 6 | | --- | --- | --- | --- | 7 | 8 | 9 | 10 | 11 | 12 | | 717 | 1-bit and 2-bit Characters | Easy | Google | -done 13 | | 67 | Add Binary | Easy | Adobe, Amazon, Facebook, Google, Microsoft | -done 14 | | 258 | Add Digits | Easy | Adobe, Apple | 15 | | 415 | Add Strings | Easy | Apple, Facebook, Google, Microsoft | - done 16 | 17 | | 637 | Average of Levels in Binary Tree | Easy | Amazon, Facebook | 18 | | 844 | Backspace String Compare | Easy | Google | - done 19 | | 110 | Balanced Binary Tree | Easy | Amazon, Google | -done 20 | | 682 | Baseball Game | Easy | Amazon | 21 | | 121 | Best Time to Buy and Sell Stock | Easy | Facebook | 22 | | 122 | Best Time to Buy and Sell Stock II | Easy | Alibaba | 23 | | 595 | Big Countries | Easy | Adobe, Amazon, Google | -----sql -reject 24 | | 704 | Binary Search | Easy | Google | -- Done 25 | | 107 | Binary Tree Level Order Traversal II | Easy | Microsoft | 26 | | 257 | Binary Tree Paths | Easy | Amazon, Facebook, Microsoft | 27 | | 859 | Buddy Strings | Easy | Google | --done 28 | | 70 | Climbing Stairs | Easy | Adobe, Alibaba, Amazon, Apple, Facebook, Microsoft | 29 | | 270 | Closest Binary Search Tree Value | Easy | Google | -need sub 30 | | 175 | Combine Two Tables | Easy | Adobe, Amazon, Apple, Facebook, Google | -sql 31 | | 427 | Construct Quad Tree | Easy | Apple | 32 | | 217 | Contains Duplicate | Easy | Amazon | 33 | | 219 | Contains Duplicate II | Easy | Adobe, Google | -done 34 | | 405 | Convert a Number to Hexadecimal | Easy | Facebook | 35 | | 538 | Convert BST to Greater Tree | Easy | Amazon | 36 | | 108 | Convert Sorted Array to Binary Search Tree | Easy | Adobe, Apple | 37 | | 38 | Count and Say | Easy | Adobe, Amazon, Google, Microsoft | -done 38 | | 696 | Count Binary Substrings | Easy | Adobe | 39 | | 204 | Count Primes | Easy | Adobe, Amazon, Apple, Google, Microsoft | -done 40 | | 183 | Customers Who Never Order | Easy | Amazon | 41 | | 237 | Delete Node in a Linked List | Easy | Apple | 42 | | 706 | Design HashMap | Easy | Adobe, Amazon, Apple, Microsoft | 43 | | 707 | Design Linked List | Easy | Amazon | 44 | | 543 | Diameter of Binary Tree | Easy | Adobe | 45 | | 690 | Employee Importance | Easy | Google | -done 46 | | 181 | Employees Earning More Than Their Managers | Easy | Amazon, Facebook | 47 | | 171 | Excel Sheet Column Number | Easy | Akuna Capital | 48 | | 168 | Excel Sheet Column Title | Easy | Akuna Capital | 49 | | 172 | Factorial Trailing Zeroes | Easy | Adobe, Microsoft | 50 | | 509 | Fibonacci Number | Easy | Adobe, Amazon, Microsoft | 51 | | 438 | Find All Anagrams in a String | Easy | Amazon, Facebook, Google | 52 | | 448 | Find All Numbers Disappeared in an Array | Easy | Apple | 53 | | 760 | Find Anagram Mappings | Easy | Google | -require pre. 54 | | 724 | Find Pivot Index | Easy | Amazon, Apple, Facebook, Google, Microsoft | --done 55 | | 997 | Find the Town Judge | Easy | Amazon | 56 | | 278 | First Bad Version | Easy | Facebook, Google | -done 57 | | 387 | First Unique Character in a String | Easy | Amazon, Apple, Facebook, Google, Microsoft | -done 58 | | 412 | Fizz Buzz | Easy | Apple | 59 | | 832 | Flipping an Image | Easy | Google | --done 60 | | 733 | Flood Fill | Easy | Amazon, Google | -done 61 | 62 | | 597 | Friend Requests I: Overall Acceptance Rate | Easy | Facebook | 63 | | 824 | Goat Latin | Easy | Facebook | 64 | | 374 | Google - LeetCodeGuess Number Higher or Lower | Easy | Google | - done 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | | 202 | Happy Number | Easy | Amazon, Apple, Facebook | 73 | | 475 | Heaters | Easy | Google | --done 74 | 75 | | 198 | House Robber | Easy | Adobe, Amazon, Apple, Facebook, Google, Microsoft | -- done 76 | 77 | 78 | 79 | -----------------------------------------------------------------------------------completed 80 | 81 | | 661 | Image Smoother | Easy | Apple | 82 | | 232 | Implement Queue using Stacks | Easy | Apple, Microsoft | 83 | | 225 | Implement Stack using Queues | Easy | Microsoft | 84 | | 28 | Implement strStr | Easy | Adobe, Amazon, Apple, Facebook, Google, Microsoft | 85 | | 897 | Increasing Order Search Tree | Easy | Facebook | 86 | | 349 | Intersection of Two Arrays | Easy | Amazon, Apple, Facebook, Google, Microsoft | 87 | | 350 | Intersection of Two Arrays II | Easy | Amazon | 88 | | 160 | Intersection of Two Linked Lists | Easy | Amazon | 89 | | 226 | Invert Binary Tree | Easy | Adobe, Amazon, Facebook | 90 | | 751 | IP to CIDR | Easy | Airbnb | 91 | | 463 | Island Perimeter | Easy | Amazon, Apple, Facebook, Google | 92 | | 205 | Isomorphic Strings | Easy | Amazon, Google | 93 | | 771 | Jewels and Stones | Easy | Adobe, Alibaba, Amazon, Apple, Google | 94 | | 532 | K-diff Pairs in an Array | Easy | Amazon | 95 | | 703 | Kth Largest Element in a Stream | Easy | Amazon, Facebook, Google | 96 | | 872 | Leaf-Similar Trees | Easy | Facebook, Google | 97 | | 860 | Lemonade Change | Easy | Amazon | 98 | | 58 | Length of Last Word | Easy | Adobe | 99 | | 784 | Letter Case Permutation | Easy | Microsoft | 100 | | 482 | License Key Formatting | Easy | Amazon, Google | 101 | | 141 | Linked List Cycle | Easy | Adobe, Akuna Capital, Alibaba, Amazon, Apple, Facebook, Google, Microsoft | 102 | | 359 | Logger Rate Limiter | Easy | Facebook, Google | 103 | | 14 | Longest Common Prefix | Easy | Adobe, Apple, Google, Microsoft | 104 | | 674 | Longest Continuous Increasing Subsequence | Easy | Google | 105 | | 409 | Longest Palindrome | Easy | Amazon | 106 | | 687 | Longest Univalue Path | Easy | Amazon | 107 | | 720 | Longest Word in Dictionary | Easy | Amazon, Google | 108 | | 235 | Lowest Common Ancestor of a Binary Search Tree | Easy | Adobe | 109 | | 840 | Magic Squares In Grid | Easy | Google | 110 | | 169 | Majority Element | Easy | Adobe, Amazon, Apple, Google, Microsoft | 111 | | 485 | Max Consecutive Ones | Easy | Amazon | 112 | | 716 | Max Stack | Easy | Facebook | 113 | | 849 | Maximize Distance to Closest Person | Easy | Google | 114 | | 104 | Maximum Depth of Binary Tree | Easy | Apple, Facebook, Google | 115 | | 559 | Maximum Depth of N-ary Tree | Easy | Amazon, Google | 116 | | 628 | Maximum Product of Three Numbers | Easy | Amazon, Facebook | 117 | | 53 | Maximum Subarray | Easy | Adobe, Alibaba, Amazon, Apple, Facebook, Microsoft | 118 | | 252 | Meeting Rooms | Easy | Amazon, Facebook | 119 | | 88 | Merge Sorted Array | Easy | Adobe, Amazon, Facebook, Microsoft | 120 | 121 | ---break 122 | 123 | | 617 | Merge Two Binary Trees | Easy | Amazon | 124 | | 21 | Merge Two Sorted Lists | Easy | Airbnb, Alibaba | 125 | | 746 | Min Cost Climbing Stairs | Easy | Amazon | 126 | | 155 | Min Stack | Easy | Adobe, Amazon, Apple, Facebook, Google, Microsoft | 127 | | 111 | Minimum Depth of Binary Tree | Easy | Adobe, Amazon, Microsoft | 128 | | 783 | Minimum Distance Between BST Nodes | Easy | Amazon | 129 | | 599 | Minimum Index Sum of Two Lists | Easy | Amazon | 130 | | 268 | Missing Number | Easy | Adobe, Amazon, Apple | 131 | | 896 | Monotonic Array | Easy | Facebook | 132 | | 819 | Most Common Word | Easy | Amazon, Google, Microsoft | 133 | | 283 | Move Zeroes | Easy | Adobe, Apple, Facebook, Google, Microsoft | 134 | | 346 | Moving Average from Data Stream | Easy | Google | 135 | | 429 | N-ary Tree Level Order Traversal | Easy | Google | 136 | | 339 | Nested List Weight Sum | Easy | Amazon | 137 | | 496 | Next Greater Element I | Easy | Amazon, Google | 138 | | 665 | Non-decreasing Array | Easy | Google | 139 | | 400 | Nth Digit | Easy | Adobe, Google | 140 | | 476 | Number Complement | Easy | Google | 141 | | 191 | Number of 1 Bits | Easy | Amazon, Apple, Google, Microsoft | 142 | | 447 | Number of Boomerangs | Easy | Amazon, Google | 143 | | 806 | Number of Lines To Write String | Easy | Google | 144 | | 1013 | Pairs of Songs With Total Durations Divisible by 60 | Easy | Amazon | 145 | | 234 | Palindrome Linked List | Easy | Amazon, Google | 146 | | 9 | Palindrome Number | Easy | Adobe, Alibaba, Amazon, Apple, Facebook, Google, Microsoft | 147 | | 266 | Palindrome Permutation | Easy | Amazon, Facebook, Google, Microsoft | 148 | | 118 | Pascal's Triangle | Easy | Amazon, Facebook, Google, Microsoft | 149 | | 119 | Pascal's Triangle II | Easy | Adobe, Amazon, Google | 150 | | 112 | Path Sum | Easy | Amazon | 151 | | 437 | Path Sum III | Easy | Amazon, Facebook | 152 | | 852 | Peak Index in a Mountain Array | Easy | Amazon, Google | 153 | | 507 | Perfect Number | Easy | Amazon | 154 | | 66 | Plus One | Easy | Amazon, Facebook, Google, Microsoft | 155 | | 830 | Positions of Large Groups | Easy | Adobe, Google | 156 | | 326 | Power of Three | Easy | Apple | 157 | | 231 | Power of Two | Easy | Amazon | 158 | | 157 | Read N Characters Given Read4 | Easy | Facebook, Google | 159 | | 836 | Rectangle Overlap | Easy | Adobe, Amazon, Microsoft | 160 | | 26 | Remove Duplicates from Sorted Array | Easy | Amazon, Apple, Facebook, Google, Microsoft | 161 | | 83 | Remove Duplicates from Sorted List | Easy | Apple, Google | 162 | | 27 | Remove Element | Easy | Amazon, Google | 163 | | 203 | Remove Linked List Elements | Easy | Adobe, Amazon, Microsoft | 164 | | 937 | Reorder Log Files | Easy | Amazon | 165 | | 686 | Repeated String Match | Easy | Facebook, Google | 166 | | 190 | Reverse Bits | Easy | Amazon, Apple | 167 | | 7 | Reverse Integer | Easy | Adobe, Alibaba, Amazon, Facebook, Google, Microsoft | 168 | | 206 | Reverse Linked List | Easy | Adobe, Alibaba, Facebook, Google, Microsoft | 169 | | 917 | Reverse Only Letters | Easy | Microsoft | 170 | | 344 | Reverse String | Easy | Adobe, Amazon, Apple, Facebook, Google, Microsoft | 171 | | 541 | Reverse String II | Easy | Microsoft | 172 | | 557 | Reverse Words in a String III | Easy | Apple, Microsoft | 173 | | 657 | Robot Return to Origin | Easy | Adobe, Amazon | 174 | | 13 | Roman to Integer | Easy | Adobe, Amazon, Apple, Facebook, Google, Microsoft | 175 | | 189 | Rotate Array | Easy | Amazon | 176 | | 796 | Rotate String | Easy | Amazon | 177 | | 788 | Rotated Digits | Easy | Google | 178 | | 100 | Same Tree | Easy | Amazon, Apple, Facebook, Google | 179 | | 700 | Search in a Binary Search Tree | Easy | Google | 180 | | 35 | Search Insert Position | Easy | Adobe | 181 | | 176 | Second Highest Salary | Easy | Adobe, Apple | 182 | | 671 | Second Minimum Node In a Binary Tree | Easy | Microsoft | 183 | | 734 | Sentence Similarity | Easy | Google | 184 | | 821 | Shortest Distance to a Character | Easy | Google | 185 | | 243 | Shortest Word Distance | Easy | Amazon, Google | 186 | | 800 | Similar RGB Color | Easy | Google | 187 | | 136 | Single Number | Easy | Amazon | 188 | | 905 | Sort Array By Parity | Easy | Adobe, Amazon, Google, Microsoft | 189 | | 69 | Sqrt(x) | Easy | Amazon, Apple, Facebook, Google, Microsoft | 190 | | 977 | Squares of a Sorted Array | Easy | Adobe | 191 | | 443 | String Compression | Easy | Amazon | 192 | | 246 | Strobogrammatic Number | Easy | Facebook, Google | 193 | | 811 | Subdomain Visit Count | Easy | Google | 194 | | 404 | Sum of Left Leaves | Easy | Amazon | 195 | | 1022 | Sum of Root To Leaf Binary Numbers | Easy | Amazon | 196 | | 371 | Sum of Two Integers | Easy | Facebook, Microsoft | 197 | | 101 | Symmetric Tree | Easy | Amazon, Apple, Facebook, Google, Microsoft | 198 | | 195 | Tenth Line | Easy | Adobe, Apple, Google | 199 | | 414 | Third Maximum Number | Easy | Facebook, Google, Microsoft | 200 | | 709 | To Lower Case | Easy | Adobe, Amazon, Apple | 201 | | 766 | Toeplitz Matrix | Easy | Facebook, Google | 202 | | 669 | Trim a Binary Search Tree | Easy | Amazon | 203 | | 1 | Two Sum | Easy | Adobe, Aetion, Affirm, Airbnb, Alibaba, Amazon, Apple, Facebook, Google, Microsoft | 204 | | 167 | Two Sum II - Input array is sorted | Easy | Adobe, Amazon, Apple, Facebook, Google, Microsoft | 205 | | 170 | Two Sum III - Data structure design | Easy | Facebook | 206 | | 653 | Two Sum IV - Input is a BST | Easy | Google | 207 | | 263 | Ugly Number | Easy | Adobe | 208 | | 929 | Unique Email Addresses | Easy | Adobe, Amazon, Apple, Google, Microsoft | 209 | | 804 | Unique Morse Code Words | Easy | Apple | 210 | | 242 | Valid Anagram | Easy | Amazon, Apple, Facebook, Google, Microsoft | 211 | | 941 | Valid Mountain Array | Easy | Google | 212 | | 125 | Valid Palindrome | Easy | Amazon, Apple, Facebook, Google, Microsoft | 213 | | 680 | Valid Palindrome II | Easy | Facebook | 214 | | 20 | Valid Parentheses | Easy | Adobe, Akuna Capital, Amazon, Apple, Facebook, Google, Microsoft | 215 | | 193 | Valid Phone Numbers | Easy | Adobe | 216 | | 953 | Verifying an Alien Dictionary | Easy | Facebook | 217 | | 290 | Word Pattern | Easy | Google, Microsoft | 218 | | 914 | X of a Kind in a Deck of Cards | Easy | Google | 219 | | 542 | 01 Matrix | Medium | Google | 220 | | 15 | 3Sum | Medium | Adobe, Akuna Capital, Amazon, Apple, Google, Microsoft, Alibaba | 221 | | 16 | 3Sum Closest | Medium | Amazon, Apple, Google, Microsoft | 222 | | 259 | 3Sum Smaller | Medium | Google | 223 | | 18 | 4Sum | Medium | Adobe, Amazon, Apple, Facebook | 224 | | 454 | 4Sum II | Medium | Amazon | 225 | | 721 | Accounts Merge | Medium | Facebook, Google | 226 | | 211 | Add and Search Word - Data structure design | Medium | Facebook | 227 | | 616 | Add Bold Tag in String | Medium | Google | 228 | | 2 | Add Two Numbers | Medium | Adobe, Aetion, Airbnb, Alibaba, Amazon, Apple, Facebook, Google | 229 | | 445 | Add Two Numbers II | Medium | Facebook, Amazon | 230 | | 863 | All Nodes Distance K in Binary Tree | Medium | Amazon, Google, Microsoft | 231 | | 797 | All Paths From Source to Target | Medium | Amazon | 232 | | 894 | All Possible Full Binary Trees | Medium | Google | 233 | | 351 | Android Unlock Patterns | Medium | Google | 234 | | 227 | Basic Calculator II | Medium | Amazon, Apple, Facebook, Google, Microsoft | 235 | | 419 | Battleships in a Board | Medium | Facebook, Google, Microsoft | 236 | | 714 | Best Time to Buy and Sell Stock with Transaction Fee | Medium | Facebook | 237 | | 173 | Binary Search Tree Iterator | Medium | Google | 238 | | 94 | Binary Tree Inorder Traversal | Medium | Adobe, Google, Microsoft | 239 | | 102 | Binary Tree Level Order Traversal | Medium | Apple, Google | 240 | | 298 | Binary Tree Longest Consecutive Sequence | Medium | Facebook | 241 | | 549 | Binary Tree Longest Consecutive Sequence II | Medium | Google | 242 | | 144 | Binary Tree Preorder Traversal | Medium | Google | 243 | | 199 | Binary Tree Right Side View | Medium | Adobe, Google, Amazon | 244 | | 314 | Binary Tree Vertical Order Traversal | Medium | Microsoft | 245 | | 103 | Binary Tree Zigzag Level Order Traversal | Medium | Adobe, Google | 246 | | 201 | Bitwise AND of Numbers Range | Medium | Adobe | 247 | | 881 | Boats to Save People | Medium | Google | 248 | | 361 | Bomb Enemy | Medium | Amazon, Google | 249 | | 545 | Boundary of Binary Tree | Medium | Amazon | 250 | | 554 | Brick Wall | Medium | Facebook | 251 | | 319 | Bulb Switcher | Medium | Facebook | 252 | | 299 | Bulls and Cows | Medium | Amazon, Google | 253 | | 464 | Can I Win | Medium | Google | 254 | | 723 | Candy Crush | Medium | Google | 255 | | 1011 | Capacity To Ship Packages Within D Days | Medium | Google | 256 | | 853 | Car Fleet | Medium | Google | 257 | | 799 | Champagne Tower | Medium | Google | 258 | | 787 | Cheapest Flights Within K Stops | Medium | Airbnb, Microsoft | 259 | | 958 | Check Completeness of a Binary Tree | Medium | Facebook, Microsoft | 260 | | 457 | Circular Array Loop | Medium | Google | 261 | | 133 | Clone Graph | Medium | Amazon, Facebook | 262 | | 742 | Closest Leaf in a Binary Tree | Medium | Google | 263 | | 322 | Coin Change | Medium | Adobe, Airbnb, Amazon, Apple, Facebook, Microsoft | 264 | | 518 | Coin Change 2 | Medium | Amazon, Facebook, Google, Microsoft | 265 | | 39 | Combination Sum | Medium | Airbnb, Apple, Facebook, Google, Microsoft | 266 | | 40 | Combination Sum II | Medium | Microsoft | 267 | | 377 | Combination Sum IV | Medium | Facebook | 268 | | 77 | Combinations | Medium | Facebook, Google, Microsoft | 269 | | 165 | Compare Version Numbers | Medium | Amazon, Apple, Microsoft | 270 | | 180 | Consecutive Numbers | Medium | Facebook | 271 | | 1008 | Construct Binary Search Tree from Preorder | Medium | Facebook | 272 | | 106 | Construct Binary Tree from Inorder and Postorder | Medium | Microsoft | 273 | | 105 | Construct Binary Tree from Preorder and Inorder | Medium | Facebook | 274 | | 889 | Construct Binary Tree from Preorder and PostorderTraversal | Medium | Facebook, Google | 275 | | 536 | Construct Binary Tree from String | Medium | Facebook | 276 | | 11 | Container With Most Water | Medium | Airbnb, Alibaba | 277 | | 523 | Continuous Subarray Sum | Medium | Facebook, Microsoft | 278 | | 426 | Convert Binary Search Tree to Sorted Doubly LinkedList | Medium | Facebook, Google, Microsoft | 279 | | 109 | Convert Sorted List to Binary Search Tree | Medium | Facebook, Microsoft | 280 | | 138 | Copy List with Random Pointer | Medium | Alibaba, Facebook | 281 | | 222 | Count Complete Tree Nodes | Medium | Facebook, Google | 282 | | 250 | Count Univalue Subtrees | Medium | Amazon | 283 | | 338 | Counting Bits | Medium | Apple | 284 | | 207 | Course Schedule | Medium | Amazon, Facebook, Google, Microsoft | 285 | | 210 | Course Schedule II | Medium | Amazon, Facebook, Google, Microsoft | 286 | | 791 | Custom Sort String | Medium | Amazon, Facebook | 287 | | 739 | Daily Temperatures | Medium | Amazon, Google, Microsoft | 288 | | 394 | Decode String | Medium | Amazon, appdynamics, Apple, Facebook, Google, Microsoft | 289 | | 91 | Decode Ways | Medium | Adobe, Amazon, Apple, Facebook, Google, Microsoft | 290 | | 450 | Delete Node in a BST | Medium | Google | 291 | | 583 | Delete Operation for Two Strings | Medium | Amazon | 292 | | 184 | Department Highest Salary | Medium | Amazon | 293 | | 622 | Design Circular Queue | Medium | Amazon, Facebook | 294 | | 362 | Design Hit Counter | Medium | Amazon, Google, Microsoft | 295 | | 635 | Design Log Storage System | Medium | Google | 296 | | 379 | Design Phone Directory | Medium | Google | 297 | | 353 | Design Snake Game | Medium | Apple, Amazon, Google | 298 | | 348 | Design Tic-Tac-Toe | Medium | Apple, Facebook, Microsoft | 299 | | 498 | Diagonal Traverse | Medium | Facebook, Google | 300 | | 241 | Different Ways to Add Parentheses | Medium | Google | 301 | | 979 | Distribute Coins in Binary Tree | Medium | Amazon, Google, Microsoft | 302 | | 29 | Divide Two Integers | Medium | Adobe, Amazon, Facebook, Google, Microsoft | 303 | | 271 | Encode and Decode Strings | Medium | Google | 304 | | 535 | Encode and Decode TinyURL | Medium | Adobe | 305 | | 663 | Equal Tree Partition | Medium | Facebook | 306 | | 399 | Evaluate Division | Medium | Adobe, Amazon, Facebook, Google | 307 | | 150 | Evaluate Reverse Polish Notation | Medium | Microsoft | 308 | | 855 | Exam Room | Medium | Google | 309 | | 626 | Exchange Seats | Medium | Amazon | 310 | | 636 | Exclusive Time of Functions | Medium | Microsoft | 311 | | 809 | Expressive Words | Medium | Google | 312 | | 442 | Find All Duplicates in an Array | Medium | Amazon, Microsoft | 313 | | 833 | Find And Replace in String | Medium | Google | 314 | | 890 | Find and Replace Pattern | Medium | Apple | 315 | | 609 | Find Duplicate File in System | Medium | Amazon | 316 | | 652 | Find Duplicate Subtrees | Medium | Google | 317 | | 34 | Find First and Last Position of Element in Sorted | Medium | Facebook | 318 | | 658 | Find K Closest Elements | Medium | Facebook | 319 | | 373 | Find K Pairs with Smallest Sums | Medium | Amazon, Apple, Google, Microsoft | 320 | | 366 | Find Leaves of Binary Tree | Medium | Amazon, Google | 321 | | 153 | Find Minimum in Rotated Sorted Array | Medium | Google | 322 | | 162 | Find Peak Element | Medium | Amazon, Facebook, Microsoft, Google | 323 | | 277 | Find the Celebrity | Medium | Amazon, Facebook, Microsoft | 324 | | 287 | Find the Duplicate Number | Medium | Adobe, Amazon, Google, Microsoft | 325 | | 251 | Flatten 2D Vector | Medium | Airbnb | 326 | | 430 | Flatten a Multilevel Doubly Linked List | Medium | Amazon | 327 | | 114 | Flatten Binary Tree to Linked List | Medium | Adobe, Amazon, Microsoft | 328 | | 341 | Flatten Nested List Iterator | Medium | Airbnb | 329 | | 951 | Flip Equivalent Binary Trees | Medium | Google | 330 | | 294 | Flip Game II | Medium | Google | 331 | | 926 | Flip String to Monotone Increasing | Medium | Google | 332 | | 166 | Fraction to Recurring Decimal | Medium | Facebook | 333 | | 547 | Friend Circles | Medium | Amazon, Facebook, Microsoft | 334 | | 825 | Friends Of Appropriate Ages | Medium | Facebook | 335 | | 904 | Fruit Into Baskets | Medium | Amazon, Google | 336 | | 289 | Game of Life | Medium | Amazon, Microsoft | 337 | | 134 | Gas Station | Medium | Amazon, Google, Microsoft | 338 | | 320 | Generalized Abbreviation | Medium | Google | 339 | | 22 | Generate Parentheses | Medium | Adobe, Aetion | 340 | | 478 | Generate Random Point in a Circle | Medium | Facebook | 341 | | 129 | Google - LeetCodeSum Root to Leaf Numbers | Medium | Google | 342 | | 261 | Graph Valid Tree | Medium | Amazon, Google | 343 | | 89 | Gray Code | Medium | Google | 344 | | 49 | Group Anagrams | Medium | Adobe, Affirm, Alibaba, Amazon, Apple, Facebook, Google, Microsoft | 345 | | 249 | Group Shifted Strings | Medium | Apple | 346 | | 375 | Guess Number Higher or Lower II | Medium | Google | 347 | | 274 | H-Index | Medium | Google | 348 | | 846 | Hand of Straights | Medium | Google | 349 | | 337 | House Robber III | Medium | Amazon, Facebook, Google | 350 | | 835 | Image Overlap | Medium | Google | 351 | | 676 | Implement Magic Dictionary | Medium | Google | 352 | | 470 | Implement Rand10 Using Rand7 | Medium | Google | 353 | | 208 | Implement Trie (Prefix Tree) | Medium | Amazon | 354 | | 491 | Increasing Subsequences | Medium | Facebook | 355 | | 334 | Increasing Triplet Subsequence | Medium | Amazon, Google, Facebook | 356 | | 285 | Inorder Successor in BST | Medium | Facebook, Microsoft | 357 | | 510 | Inorder Successor in BST II | Medium | Google | 358 | | 380 | Insert Delete GetRandom O(1) | Medium | Microsoft | 359 | | 701 | Insert into a Binary Search Tree | Medium | Microsoft | 360 | | 708 | Insert into a Cyclic Sorted List | Medium | Amazon, Facebook, Google, Microsoft | 361 | | 343 | Integer Break | Medium | Google | 362 | | 397 | Integer Replacement | Medium | Amazon | 363 | | 12 | Integer to Roman | Medium | Adobe, Amazon, Apple, Google, Microsoft | 364 | | 986 | Interval List Intersections | Medium | Facebook, Google | 365 | | 785 | Is Graph Bipartite? | Medium | Amazon, Apple, Facebook, Google, Microsoft | 366 | | 392 | Is Subsequence | Medium | Facebook, Google | 367 | | 55 | Jump Game | Medium | Amazon, Apple, Facebook, Google, Microsoft | 368 | | 973 | K Closest Points to Origin | Medium | Amazon, Apple, Facebook, Google, Microsoft | 369 | | 841 | Keys and Rooms | Medium | Amazon | 370 | | 582 | Kill Process | Medium | Apple | 371 | | 935 | Knight Dialer | Medium | Facebook, Microsoft | 372 | | 688 | Knight Probability in Chessboard | Medium | Facebook, Google, Microsoft | 373 | | 215 | Kth Largest Element in an Array | Medium | Facebook | 374 | | 230 | Kth Smallest Element in a BST | Medium | Amazon | 375 | | 378 | Kth Smallest Element in a Sorted Matrix | Medium | Apple | 376 | | 333 | Largest BST Subtree | Medium | Amazon, Google, Microsoft | 377 | | 368 | Largest Divisible Subset | Medium | Adobe, Google | 378 | | 179 | Largest Number | Medium | Amazon, Apple | 379 | | 17 | Letter Combinations of a Phone Number | Medium | Airbnb, Apple, Facebook | 380 | | 386 | Lexicographical Numbers | Medium | Google | 381 | | 817 | Linked List Components | Medium | Google | 382 | | 142 | Linked List Cycle II | Medium | Apple, Google, Microsoft | 383 | | 382 | Linked List Random Node | Medium | Apple, Facebook | 384 | | 388 | Longest Absolute File Path | Medium | Google | 385 | | 300 | Longest Increasing Subsequence | Medium | Adobe, Airbnb, Amazon, Apple, Facebook, Google, Microsoft | 386 | | 562 | Longest Line of Consecutive One in Matrix | Medium | Google | 387 | | 845 | Longest Mountain in Array | Medium | Google | 388 | | 516 | Longest Palindromic Subsequence | Medium | Apple, Microsoft | 389 | | 5 | Longest Palindromic Substring | Medium | Alibaba | 390 | | 424 | Longest Repeating Character Replacement | Medium | Google | 391 | | 395 | Longest Substring with At Least K RepeatingCharacters | Medium | Facebook, Google | 392 | | 3 | Longest Substring Without Repeating Characters | Medium | Akuna Capital, Alibaba | 393 | | 978 | Longest Turbulent Subarray | Medium | Amazon | 394 | | 524 | Longest Word in Dictionary through Deleting | Medium | Google | 395 | | 236 | Lowest Common Ancestor of a Binary Tree | Medium | Google | 396 | | 229 | Majority Element II | Medium | Amazon | 397 | | 695 | Max Area of Island | Medium | Adobe, Affirm, Alibaba, Amazon, Facebook, Google, Microsoft | 398 | | 769 | Max Chunks To Make Sorted | Medium | Google | 399 | | 487 | Max Consecutive Ones II | Medium | Google | 400 | | 1004 | Max Consecutive Ones III | Medium | Facebook | 401 | | 807 | Max Increase to Keep City Skyline | Medium | Google | 402 | | 221 | Maximal Square | Medium | Google | 403 | | 654 | Maximum Binary Tree | Medium | Amazon | 404 | | 318 | Maximum Product of Word Lengths | Medium | Google | 405 | | 152 | Maximum Product Subarray | Medium | Adobe | 406 | | 325 | Maximum Size Subarray Sum Equals k | Medium | Facebook | 407 | | 918 | Maximum Sum Circular Subarray | Medium | Facebook | 408 | | 670 | Maximum Swap | Medium | Facebook | 409 | | 662 | Maximum Width of Binary Tree | Medium | Google | 410 | | 253 | Meeting Rooms II | Medium | Amazon, Facebook, Google, Microsoft | 411 | | 56 | Merge Intervals | Medium | Adobe, Amazon, Apple, Facebook, Google, Microsoft | 412 | | 529 | Minesweeper | Medium | Google | 413 | | 921 | Minimum Add to Make Parentheses Valid | Medium | Facebook | 414 | | 939 | Minimum Area Rectangle | Medium | Google | 415 | | 983 | Minimum Cost For Tickets | Medium | Amazon | 416 | | 1007 | Minimum Domino Rotations For Equal Row | Medium | Google | 417 | | 931 | Minimum Falling Path Sum | Medium | Google | 418 | | 433 | Minimum Genetic Mutation | Medium | Google | 419 | | 310 | Minimum Height Trees | Medium | Google | 420 | | 452 | Minimum Number of Arrows to Burst Balloons | Medium | Facebook | 421 | | 64 | Minimum Path Sum | Medium | Adobe, Amazon, Google, Microsoft | 422 | | 209 | Minimum Size Subarray Sum | Medium | Google, Microsoft | 423 | | 539 | Minimum Time Difference | Medium | Google | 424 | | 163 | Missing Ranges | Medium | Amazon | 425 | | 508 | Most Frequent Subtree Sum | Medium | Amazon | 426 | | 947 | Most Stones Removed with Same Row or Column | Medium | Google | 427 | | 43 | Multiply Strings | Medium | Amazon, Apple, Facebook, Google, Microsoft | 428 | | 729 | My Calendar I | Medium | Amazon, Google, Microsoft | 429 | | 731 | My Calendar II | Medium | Amazon, Google | 430 | | 743 | Network Delay Time | Medium | Amazon | 431 | | 681 | Next Closest Time | Medium | Facebook, Google | 432 | | 503 | Next Greater Element II | Medium | Microsoft | 433 | | 556 | Next Greater Element III | Medium | Amazon | 434 | | 1019 | Next Greater Node In Linked List | Medium | Amazon | 435 | | 31 | Next Permutation | Medium | Adobe, Amazon, Apple, Facebook, Google, Microsoft | 436 | | 435 | Non-overlapping Intervals | Medium | Apple, Google | 437 | | 177 | Nth Highest Salary | Medium | Adobe, Amazon, Apple, Facebook | 438 | | 750 | Number Of Corner Rectangles | Medium | Google | 439 | | 694 | Number of Distinct Islands | Medium | Amazon, Facebook, Google, Microsoft | 440 | | 200 | Number of Islands | Medium | Adobe, Affirm, Alibaba, Amazon, appdynamics, Facebook, Google, Microsoft | 441 | | 673 | Number of Longest Increasing Subsequence | Medium | Amazon, Facebook | 442 | | 792 | Number of Matching Subsequences | Medium | Google | 443 | | 328 | Odd Even Linked List | Medium | Amazon, Google, Microsoft | 444 | | 161 | One Edit Distance | Medium | Facebook, Microsoft | 445 | | 911 | Online Election | Medium | Apple, Google | 446 | | 752 | Open the Lock | Medium | Facebook, Google | 447 | | 544 | Output Contest Matches | Medium | Google | 448 | | 417 | Pacific Atlantic Water Flow | Medium | Google, Microsoft | 449 | | 131 | Palindrome Partitioning | Medium | Adobe, Amazon | 450 | | 647 | Palindromic Substrings | Medium | Adobe, Amazon, Facebook, Google, Microsoft | 451 | | 416 | Partition Equal Subset Sum | Medium | Facebook, Google, Microsoft | 452 | | 86 | Partition List | Medium | Amazon, Microsoft | 453 | | 698 | Partition to K Equal Sum Subsets | Medium | Google | 454 | | 113 | Path Sum II | Medium | Amazon, appdynamics, Facebook, Google | 455 | | 284 | Peeking Iterator | Medium | Google | 456 | | 279 | Perfect Squares | Medium | Adobe, Amazon, Facebook, Google | 457 | | 567 | Permutation in String | Medium | Facebook, Google | 458 | | 60 | Permutation Sequence | Medium | Amazon, Google | 459 | | 46 | Permutations | Medium | Adobe, Amazon, Apple, Facebook, Google, Microsoft | 460 | | 47 | Permutations II | Medium | Adobe, Amazon, Facebook | 461 | | 369 | Plus One Linked List | Medium | Amazon, Google | 462 | | 117 | Populating Next Right Pointers in Each Node II | Medium | Amazon, Facebook, Google, Microsoft | 463 | | 116 | Populating Next Right Pointers in Each Node | Medium | Facebook | 464 | | 886 | Possible Bipartition | Medium | Facebook | 465 | | 755 | Pour Water | Medium | Airbnb | 466 | | 50 | Pow(x, n) | Medium | Adobe, Alibaba, Amazon, Apple, Facebook, Microsoft | 467 | | 486 | Predict the Winner | Medium | Google | 468 | | 655 | Print Binary Tree | Medium | Microsoft | 469 | | 957 | Prison Cells After N Days | Medium | Amazon | 470 | | 238 | Product of Array Except Self | Medium | Adobe, Amazon, Apple, Facebook, Google, Microsoft | 471 | | 756 | Pyramid Transition Matrix | Medium | Airbnb | 472 | | 406 | Queue Reconstruction by Height | Medium | Amazon, Google | 473 | | 398 | Random Pick Index | Medium | Facebook, Google | 474 | | 528 | Random Pick with Weight | Medium | Google, Microsoft | 475 | | 497 | Random Point in Non-overlapping Rectangles | Medium | Google | 476 | | 370 | Range Addition | Medium | Google | 477 | | 938 | Range Sum of BST | Medium | Google | 478 | | 307 | Range Sum Query - Mutable | Medium | Facebook, Google | 479 | | 304 | Range Sum Query 2D - Immutable | Medium | Facebook, Google, Microsoft | 480 | | 178 | Rank Scores | Medium | Amazon, Apple | 481 | | 332 | Reconstruct Itinerary | Medium | Amazon, Facebook, Google, Microsoft | 482 | | 223 | Rectangle Area | Medium | Microsoft | 483 | | 684 | Redundant Connection | Medium | Google | 484 | | 722 | Remove Comments | Medium | Amazon, Facebook, Google, Microsoft | 485 | | 80 | Remove Duplicates from Sorted Array II | Medium | Google | 486 | | 82 | Remove Duplicates from Sorted List II | Medium | Google | 487 | | 402 | Remove K Digits | Medium | Adobe, Amazon, Facebook, Microsoft | 488 | | 19 | Remove Nth Node From End of List | Medium | Facebook | 489 | | 143 | Reorder List | Medium | Amazon, Facebook, Google, Microsoft | 490 | | 767 | Reorganize String | Medium | Amazon, Facebook, Google | 491 | | 187 | Repeated DNA Sequences | Medium | Google | 492 | | 93 | Restore IP Addresses | Medium | Microsoft | 493 | | 92 | Reverse Linked List II | Medium | Adobe, Alibaba, Amazon, Facebook, Google, Microsoft | 494 | | 151 | Reverse Words in a String | Medium | Facebook | 495 | | 186 | Reverse Words in a String II | Medium | Amazon, Microsoft | 496 | | 900 | RLE Iterator | Medium | Amazon, Google | 497 | | 61 | Rotate List | Medium | Amazon, Microsoft | 498 | | 74 | Search a 2D Matrix | Medium | Amazon, Facebook, Google, Microsoft | 499 | | 240 | Search a 2D Matrix II | Medium | Amazon, Facebook, Google, Microsoft | 500 | | 702 | Search in a Sorted Array of Unknown Size | Medium | Google | 501 | | 33 | Search in Rotated Sorted Array | Medium | Alibaba, Amazon, Apple, Facebook, Google, Microsoft | 502 | | 81 | Search in Rotated Sorted Array II | Medium | Google | 503 | | 418 | Sentence Screen Fitting | Medium | Google | 504 | | 737 | Sentence Similarity II | Medium | Google | 505 | | 444 | Sequence Reconstruction | Medium | Google | 506 | | 449 | Serialize and Deserialize BST | Medium | Amazon, Facebook, Google, Microsoft | 507 | | 73 | Set Matrix Zeroes | Medium | Amazon, Apple, Facebook, Google, Microsoft | 508 | | 384 | Shuffle an Array | Medium | Amazon, Google, Microsoft | 509 | | 71 | Simplify Path | Medium | Adobe, Amazon, Facebook, Microsoft | 510 | | 540 | Single Element in a Sorted Array | Medium | Amazon, Google | 511 | | 137 | Single Number II | Medium | Amazon, Facebook, Google | 512 | | 260 | Single Number III | Medium | Adobe, Facebook | 513 | | 865 | Smallest Subtree with all the Deepest Nodes | Medium | Facebook | 514 | | 909 | Snakes and Ladders | Medium | Amazon | 515 | | 640 | Solve the Equation | Medium | Amazon | 516 | | 451 | Sort Characters By Frequency | Medium | Amazon, Google, Microsoft | 517 | | 75 | Sort Colors | Medium | Adobe, Amazon, Apple, Facebook, Google, Microsoft | 518 | | 148 | Sort List | Medium | Amazon, Facebook, Google, Microsoft | 519 | | 360 | Sort Transformed Array | Medium | Facebook, Google | 520 | | 311 | Sparse Matrix Multiplication | Medium | Apple | 521 | | 54 | Spiral Matrix | Medium | Adobe, Amazon, Apple, Facebook, Google, Microsoft | 522 | | 59 | Spiral Matrix II | Medium | Amazon, Google, Microsoft | 523 | | 885 | Spiral Matrix III | Medium | Facebook | 524 | | 659 | Split Array into Consecutive Subsequences | Medium | Google | 525 | | 548 | Split Array with Equal Sum | Medium | Facebook | 526 | | 776 | Split BST | Medium | Google | 527 | | 725 | Split Linked List in Parts | Medium | Google | 528 | | 877 | Stone Game | Medium | Google | 529 | | 8 | String to Integer (atoi) | Medium | Apple | 530 | | 247 | Strobogrammatic Number II | Medium | Google | 531 | | 713 | Subarray Product Less Than K | Medium | Akuna Capital | 532 | | 560 | Subarray Sum Equals K | Medium | Facebook, Microsoft | 533 | | 78 | Subsets | Medium | Adobe, Amazon, Apple, Facebook, Google, Microsoft | 534 | | 90 | Subsets II | Medium | Amazon | 535 | | 228 | Summary Ranges | Medium | Amazon, Google, Microsoft | 536 | | 130 | Surrounded Regions | Medium | Amazon, Google | 537 | | 777 | Swap Adjacent in LR String | Medium | Google | 538 | | 24 | Swap Nodes in Pairs | Medium | Adobe, Amazon, Google | 539 | | 494 | Target Sum | Medium | Facebook, Google | 540 | | 621 | Task Scheduler | Medium | Amazon, Apple, Facebook, Google, Microsoft | 541 | | 490 | The Maze | Medium | Microsoft | 542 | | 505 | The Maze II | Medium | Amazon, Google | 543 | | 981 | Time Based Key-Value Store | Medium | Facebook | 544 | | 347 | Top K Frequent Elements | Medium | Facebook, Google, Microsoft | 545 | | 692 | Top K Frequent Words | Medium | Amazon, Apple, Facebook, Google, Microsoft | 546 | | 477 | Total Hamming Distance | Medium | Facebook | 547 | | 120 | Triangle | Medium | Amazon, Microsoft | 548 | | 264 | Ugly Number II | Medium | Google | 549 | | 96 | Unique Binary Search Trees | Medium | Amazon, Google | 550 | | 95 | Unique Binary Search Trees II | Medium | Adobe, Amazon, Google | 551 | | 62 | Unique Paths | Medium | Alibaba, Amazon, Apple, Facebook, Google, Microsoft | 552 | | 63 | Unique Paths II | Medium | Amazon, Facebook, Microsoft | 553 | | 288 | Unique Word Abbreviation | Medium | Google | 554 | | 393 | UTF-8 Validation | Medium | Facebook, Google | 555 | | 678 | Valid Parenthesis String | Medium | Facebook | 556 | | 36 | Valid Sudoku | Medium | Amazon, Apple, Facebook, Google, Microsoft | 557 | | 794 | Valid Tic-Tac-Toe State | Medium | Microsoft | 558 | | 611 | Valid Triangle Number | Medium | Amazon | 559 | | 98 | Validate Binary Search Tree | Medium | Adobe, Amazon, Apple, Facebook, Microsoft | 560 | | 468 | Validate IP Address | Medium | Facebook, Google | 561 | | 987 | Vertical Order Traversal of a Binary Tree | Medium | Adobe, Facebook | 562 | | 286 | Walls and Gates | Medium | Amazon | 563 | | 365 | Water and Jug Problem | Medium | Google | 564 | | 280 | Wiggle Sort | Medium | Google | 565 | | 324 | Wiggle Sort II | Medium | Facebook, Airbnb, Akuna Capital | 566 | | 139 | Word Break | Medium | Adobe, Amazon, Apple, Facebook, Google, Microsoft | 567 | | 192 | Word Frequency | Medium | Adobe, Amazon, Facebook | 568 | | 127 | Word Ladder | Medium | Affirm, Airbnb, Amazon, Apple, Facebook, Google, Microsoft | 569 | | 79 | Word Search | Medium | Amazon, Apple, Facebook, Microsoft | 570 | | 6 | ZigZag Conversion | Medium | Adobe, Amazon, Apple, Facebook, Google | 571 | | 281 | Zigzag Iterator | Medium | Google | 572 | | 48 | Rotate Image | Medium | Facebook | 573 | | 679 | 24 Game | Hard | Google, Microsoft | 574 | | 269 | Alien Dictionary | Hard | Amazon, Google | 575 | | 432 | All Oone Data Structure | Hard | Amazon, Facebook | 576 | | 446 | Arithmetic Slices II - Subsequence | Hard | Alibaba, Facebook | 577 | | 224 | Basic Calculator | Hard | Adobe, Amazon, Facebook, Google, Microsoft | 578 | | 772 | Basic Calculator III | Hard | Amazon, Facebook, Google, Microsoft | 579 | | 770 | Basic Calculator IV | Hard | Google | 580 | | 296 | Best Meeting Point | Hard | Google, Facebook | 581 | | 123 | Best Time to Buy and Sell Stock III | Hard | Amazon, Microsoft | 582 | | 188 | Best Time to Buy and Sell Stock IV | Hard | Amazon, Google | 583 | | 968 | Binary Tree Cameras | Hard | Google | 584 | | 124 | Binary Tree Maximum Path Sum | Hard | Apple | 585 | | 145 | Binary Tree Postorder Traversal | Hard | Amazon | 586 | | 803 | Bricks Falling When Hit | Hard | Google | 587 | | 312 | Burst Balloons | Hard | Amazon, Google | 588 | | 815 | Bus Routes | Hard | Airbnb, Amazon, Google | 589 | | 135 | Candy | Hard | Google | 590 | | 913 | Cat and Mouse | Hard | Google | 591 | | 272 | Closest Binary Search Tree Value II | Hard | Amazon | 592 | | 472 | Concatenated Words | Hard | Amazon | 593 | | 829 | Consecutive Numbers Sum | Hard | Adobe, Airbnb | 594 | | 730 | Count Different Palindromic Subsequences | Hard | Google | 595 | | 315 | Count of Smaller Numbers After Self | Hard | Adobe, Apple | 596 | | 630 | Course Schedule III | Hard | Google | 597 | | 753 | Cracking the Safe | Hard | Amazon, Google | 598 | | 675 | Cut Off Trees for Golf Event | Hard | Amazon | 599 | | 639 | Decode Ways II | Hard | Facebook | 600 | | 185 | Department Top Three Salaries | Hard | Adobe, Amazon, Google | 601 | | 631 | Design Excel Sum Formula | Hard | Amazon | 602 | | 588 | Design In-Memory File System | Hard | Amazon | 603 | | 642 | Design Search Autocomplete System | Hard | Google | 604 | | 115 | Distinct Subsequences | Hard | Google | 605 | | 940 | Distinct Subsequences II | Hard | Google | 606 | | 174 | Dungeon Game | Hard | Amazon | 607 | | 72 | Edit Distance | Hard | Facebook, Adobe, Amazon, Apple, Google, Microsoft | 608 | | 759 | Employee Free Time | Hard | Airbnb, Amazon, Google, Microsoft | 609 | | 471 | Encode String with Shortest Length | Hard | Google | 610 | | 282 | Expression Add Operators | Hard | Google, Apple, Facebook | 611 | | 336 | Facebook - LeetCodePalindrome Pairs 30.7% | Hard | Facebook | 612 | | 579 | Find Cumulative Salary of an Employee | Hard | Amazon | 613 | | 295 | Find Median from Data Stream | Hard | Akuna Capital, Amazon, Apple, Facebook, Google, Microsoft | 614 | | 154 | Find Minimum in Rotated Sorted Array II | Hard | Facebook, Google | 615 | | 564 | Find the Closest Palindrome | Hard | Amazon, Facebook, Microsoft | 616 | | 943 | Find the Shortest Superstring | Hard | Google | 617 | | 41 | First Missing Positive | Hard | Amazon | 618 | | 403 | Frog Jump | Hard | Amazon, Apple, Facebook, Google | 619 | | 843 | Guess the Word | Hard | Airbnb, Amazon, Facebook, Google | 620 | | 381 | Insert Delete GetRandom O(1) - Duplicates allowed | Hard | Affirm, Amazon | 621 | | 57 | Insert Interval | Hard | Amazon, Apple, Facebook, Google, Microsoft | 622 | | 273 | Integer to English Words | Hard | Amazon | 623 | | 97 | Interleaving String | Hard | Amazon, Apple, Microsoft | 624 | | 45 | Jump Game II | Hard | Adobe, Amazon, Apple, Google | 625 | | 683 | K Empty Slots | Hard | Google, Microsoft | 626 | | 854 | K-Similar Strings | Hard | Google | 627 | | 668 | Kth Smallest Number in Multiplication Table | Hard | Google | 628 | | 479 | Largest Palindrome Product | Hard | Apple | 629 | | 84 | Largest Rectangle in Histogram | Hard | Microsoft | 630 | | 460 | LFU Cache | Hard | Amazon | 631 | | 128 | Longest Consecutive Sequence | Hard | Alibaba, Google | 632 | | 329 | Longest Increasing Path in a Matrix | Hard | Facebook | 633 | | 340 | Longest Substring with At Most K Distinct Characters | Hard | Facebook, Google | 634 | | 159 | Longest Substring with At Most Two Distinct | Hard | Facebook | 635 | | 32 | Longest Valid Parentheses | Hard | Amazon | 636 | | 146 | LRU Cache | Hard | Alibaba | 637 | | 827 | Making A Large Island | Hard | Google | 638 | | 768 | Max Chunks To Make Sorted II | Hard | Google | 639 | | 149 | Max Points on a Line | Hard | Adobe, Amazon, Google, Microsoft | 640 | | 363 | Max Sum of Rectangle No Larger Than K | Hard | Google | 641 | | 85 | Maximal Rectangle | Hard | Adobe, Amazon, Google, Microsoft | 642 | | 895 | Maximum Frequency Stack | Hard | Amazon | 643 | | 164 | Maximum Gap | Hard | Amazon | 644 | | 689 | Maximum Sum of 3 Non-Overlapping Subarrays | Hard | Facebook, Google | 645 | | 568 | Maximum Vacation Days | Hard | Facebook, Google, Microsoft | 646 | | 4 | Median of Two Sorted Arrays | Hard | Alibaba, Apple | 647 | | 23 | Merge k Sorted Lists | Hard | Adobe, Alibaba, Amazon, Apple, Facebook, Google, Microsoft | 648 | | 924 | Minimize Malware Spread | Hard | Amazon | 649 | | 774 | Minimize Max Distance to Gas Station | Hard | Google | 650 | | 857 | Minimum Cost to Hire K Workers | Hard | Google | 651 | | 995 | Minimum Number of K Consecutive Bit Flips | Hard | Akuna Capital | 652 | | 871 | Minimum Number of Refueling Stops | Hard | Amazon | 653 | | 727 | Minimum Window Subsequence | Hard | Google | 654 | | 76 | Minimum Window Substring | Hard | Airbnb | 655 | | 51 | N-Queens | Hard | Alibaba, Amazon, Facebook, Microsoft | 656 | | 726 | Number of Atoms | Hard | Adobe | 657 | | 233 | Number of Digit One | Hard | Amazon | 658 | | 711 | Number of Distinct Islands II | Hard | Amazon | 659 | 660 | 661 | 662 | 663 | 664 | 665 | 666 | 667 | 668 | 669 | 670 | 671 | 672 | 673 | 674 | 675 | 676 | | 305 | Number of Islands II | Hard | Amazon, Google | -require premium 677 | | 920 | Number of Music Playlists | Hard | Google | 678 | | 975 | Odd Even Jump | Hard | Google | 679 | | 465 | Optimal Account Balancing | Hard | Google | 680 | | 132 | Palindrome Partitioning II | Hard | Google | 681 | | 736 | Parse Lisp Expression | Hard | Affirm | 682 | | 745 | Prefix and Suffix Search | Hard | Google | 683 | | 793 | Preimage Size of Factorial Zeroes Function | Hard | Amazon | 684 | | 818 | Race Car | Hard | Google | 685 | | 710 | Random Pick with Blacklist | Hard | Amazon, Google | 686 | | 715 | Range Module | Hard | Google | 687 | | 308 | Range Sum Query 2D - Mutable | Hard | Facebook, Google | 688 | | 158 | Read N Characters Given Read4 II - Call multiple | Hard | Facebook | 689 | | 99 | Recover Binary Search Tree | Hard | Facebook, Google | 690 | | 850 | Rectangle Area II | Hard | Google | 691 | | 685 | Redundant Connection II | Hard | Google | 692 | | 10 | Regular Expression Matching | Hard | Alibaba, Amazon, Google | 693 | | 316 | Remove Duplicate Letters | Hard | Microsoft | 694 | | 301 | Remove Invalid Parentheses | Hard | Amazon, Google | 695 | | 25 | Reverse Nodes in k-Group | Hard | Amazon | 696 | | 493 | Reverse Pairs | Hard | Apple, Facebook, Google, Microsoft | 697 | | 489 | Robot Room Cleaner | Hard | Amazon, Google | 698 | | 354 | Russian Doll Envelopes | Hard | Google | 699 | | 87 | Scramble String | Hard | Google | 700 | | 297 | Serialize and Deserialize Binary Tree | Hard | Amazon, Facebook, Google, Microsoft | 701 | | 428 | Serialize and Deserialize N-ary Tree | Hard | Facebook | 702 | | 317 | Shortest Distance from All Buildings | Hard | Amazon | 703 | | 847 | Shortest Path Visiting All Nodes | Hard | Amazon | 704 | | 862 | Shortest Subarray with Sum at Least K | Hard | Facebook | 705 | | 773 | Sliding Puzzle | Hard | Airbnb, Amazon, Google | 706 | | 239 | Sliding Window Maximum | Hard | Apple, Microsoft | 707 | | 480 | Sliding Window Median | Hard | Amazon, Google | 708 | | 632 | Smallest Range | Hard | Facebook, Microsoft | 709 | | 302 | Smallest Rectangle Enclosing Black Pixels | Hard | Google | 710 | | 761 | Special Binary String | Hard | Google | 711 | | 410 | Split Array Largest Sum | Hard | Google | 712 | | 805 | Split Array With Same Average | Hard | Google | 713 | | 936 | Stamping The Sequence | Hard | Google | 714 | | 248 | Strobogrammatic Number III | Hard | Facebook | 715 | | 552 | Student Attendance Record II | Hard | Google | 716 | | 992 | Subarrays with K Different Integers | Hard | Amazon | 717 | | 30 | Substring with Concatenation of All Words | Hard | Adobe, Apple, Facebook, Google | 718 | | 37 | Sudoku Solver | Hard | Amazon | 719 | | 834 | Sum of Distances in Tree | Hard | Google | 720 | | 778 | Swim in Rising Water | Hard | Amazon | 721 | | 591 | Tag Validator | Hard | Google | 722 | | 68 | Text Justification | Hard | Airbnb, Amazon, Facebook, Google, Microsoft | 723 | | 42 | Trapping Rain Water | Hard | Adobe, , Amazon, Apple, Facebook, Google, Microsoft | 724 | | 407 | Trapping Rain Water II | Hard | Apple, Google, Microsoft | 725 | | 262 | Trips and Users | Hard | Adobe | 726 | | 980 | Unique Paths III | Hard | Amazon | 727 | | 65 | Valid Number | Hard | Apple, Facebook, Google, Microsoft | 728 | | 44 | Wildcard Matching | Hard | Adobe, Amazon, Facebook, Google, Microsoft | 729 | | 527 | Word Abbreviation | Hard | Google | 730 | | 140 | Word Break II | Hard | Amazon, Apple, Facebook | 731 | | 126 | Word Ladder II | Hard | Facebook, Google, Microsoft | - 732 | | 291 | Word Pattern II | Hard | Facebook | 733 | | 212 | Word Search II | Hard | Airbnb, Amazon, Apple, Facebook, Microsoft | 734 | | 425 | Word Squares | Hard | Google | -require premium 735 | | 218 | The Skyline Problem | Hard | Facebook | 736 | 737 | 738 | --------------------------------------------------------------------------------