├── README.md ├── leetcode.db ├── main.py ├── pics └── LikeDislieRatio.png ├── questionDTO.py └── questions.csv /README.md: -------------------------------------------------------------------------------- 1 | # leetcode_MostLikedQuests 2 | Using API calls to get all leetcode questions and store its like/dislike counts to get the top like/dislike ratio questions 3 | 4 | ## requirements 5 | 1. python 3 6 | 2. python module sqlalchemy 7 | 3. sqlite3 8 | 9 | ## steps 10 | before query on the database, you can either 11 | * execute the main.py to create and load the database, or 12 | * download the leetcode.db, or 13 | * download the questions.csv 14 | 15 | ## check the data 16 | ### highest like/dislike ratio questions without premium limitation 17 | ``` 18 | SELECT questionFrontendId, title, isPaidOnly, difficulty, (likes / dislikes) as likeDislike_ratio, likes, dislikes 19 | FROM questions WHERE isPaidOnly = 0 order by likeDislike_ratio DESC LIMIT 200; 20 | ``` 21 | ![LikeDislieRatio.png](/pics/LikeDislieRatio.png) 22 | -------------------------------------------------------------------------------- /leetcode.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fatliau/leetcode_MostLikedQuests/74cb56b6a9e0f425242446cfd7956d6c29e6833c/leetcode.db -------------------------------------------------------------------------------- /main.py: -------------------------------------------------------------------------------- 1 | import requests 2 | from requests.exceptions import HTTPError 3 | from sqlalchemy import create_engine 4 | from sqlalchemy.exc import SQLAlchemyError 5 | from sqlalchemy.orm import relationship, backref, sessionmaker 6 | from deprecated import deprecated 7 | 8 | import questionDTO 9 | 10 | def get_all_slugs(): 11 | url = "https://leetcode.com/api/problems/all/" 12 | slugs = [] 13 | try: 14 | response = requests.get(url) 15 | response.raise_for_status() 16 | except HTTPError as http_err: 17 | print(f'HTTP error occurred: {http_err}') # Python 3.6 18 | except Exception as err: 19 | print(f'Other error occurred: {err}') # Python 3.6 20 | else: 21 | r_json = response.json() 22 | for slug in r_json["stat_status_pairs"]: 23 | slugs.append(slug["stat"]["question__title_slug"]) 24 | return slugs 25 | 26 | def get_quest_info(slug): 27 | query = """ 28 | query questionData($titleSlug: String!) {\n question(titleSlug: $titleSlug) {\n questionId\n questionFrontendId\n boundTopicId\n title\n titleSlug\n content\n translatedTitle\n translatedContent\n isPaidOnly\n difficulty\n likes\n dislikes\n isLiked\n similarQuestions\n contributors {\n username\n profileUrl\n avatarUrl\n __typename\n }\n langToValidPlayground\n topicTags {\n name\n slug\n translatedName\n __typename\n }\n companyTagStats\n codeSnippets {\n lang\n langSlug\n code\n __typename\n }\n stats\n hints\n solution {\n id\n canSeeDetail\n __typename\n }\n status\n sampleTestCase\n metaData\n judgerAvailable\n judgeType\n mysqlSchemas\n enableRunCode\n enableTestMode\n envInfo\n libraryUrl\n __typename\n }\n}\n 29 | """ 30 | body = {"operationName":"questionData", 31 | "variables":{"titleSlug":slug}, 32 | "query":query} 33 | 34 | url = "https://leetcode.com/graphql" 35 | try: 36 | response = requests.post(url, json=body) 37 | response.raise_for_status() 38 | except HTTPError as http_err: 39 | print(f'HTTP error occurred: {http_err}') # Python 3.6 40 | except Exception as err: 41 | print(f'Other error occurred: {err}') # Python 3.6 42 | else: 43 | r_json = response.json() 44 | return r_json["data"]["question"] 45 | 46 | def createRawTable(dbName='leetcode.db'): 47 | createTableSQL = "CREATE TABLE questions( " \ 48 | "questionId INT, questionFrontendId INT, title TEXT, titleSlug TEXT, content TEXT, " \ 49 | "isPaidOnly INT, difficulty TEXT, likes INT, dislikes INT);" 50 | db_connect = create_engine('sqlite:///{}'.format(dbName)) 51 | conn = db_connect.connect() 52 | try: 53 | conn.execute(createTableSQL) 54 | print("created table: {}".format(dbName)) 55 | except SQLAlchemyError as e: 56 | print("SQL error: {}".format(e)) 57 | raise SQLAlchemyError 58 | 59 | @deprecated(reason="use DTO instead of direct string query") 60 | def insertQuestInfo(quest_json, dbName='leetcode.db'): 61 | questionId = quest_json.get('questionId', -1) 62 | questionFrontendId = quest_json.get('questionFrontendId', -1) 63 | title = quest_json.get('title', "").replace("'", " ").replace('"', " ").replace(";", " ") 64 | titleSlug = quest_json.get('titleSlug', "").replace("'", " ").replace('"', " ").replace(";", " ") 65 | # content = quest_json.get('content', "") # TODO: store question content 66 | content = "" 67 | isPaidOnly = 1 if quest_json.get('isPaidOnly', False) else 0 68 | difficulty = quest_json.get('difficulty', "").replace("'", " ").replace('"', " ").replace(";", " ") 69 | likes = quest_json.get('likes', -1) 70 | dislikes = quest_json.get('dislikes', -1) 71 | # print(questionId, questionFrontendId, title, titleSlug, content, isPaidOnly, difficulty, likes, dislikes) 72 | 73 | insertSQL = "INSERT INTO questions (questionId, questionFrontendId, title, titleSlug, content, isPaidOnly, difficulty, likes, dislikes) " \ 74 | "VALUES ( {}, {}, '{}', '{}', '{}', {}, '{}', {}, {});".format(questionId, questionFrontendId, title, titleSlug, content, isPaidOnly, difficulty, likes, dislikes) 75 | 76 | db_connect = create_engine('sqlite:///{}'.format(dbName)) 77 | conn = db_connect.connect() 78 | try: 79 | conn.execute(insertSQL) 80 | except SQLAlchemyError as e: 81 | print("SQL error: {}".format(e)) 82 | raise SQLAlchemyError 83 | 84 | def insert_all_quest(): 85 | slugs = get_all_slugs() 86 | inserted = 0 87 | for slug in slugs: 88 | quest_json = get_quest_info(slug) 89 | if quest_json: 90 | q_obj = questionDTO.createObjectFromJson(quest_json) 91 | try: 92 | session = createSession() 93 | questionDTO.addQuestion(session, q_obj) 94 | except: 95 | session.rollback() 96 | raise 97 | finally: 98 | session.close() 99 | else: 100 | print("json invalid in {}".format(slug)) 101 | inserted += 1 102 | print("inserted {}/{}".format(inserted, len(slugs))) 103 | 104 | 105 | def createSession(dbName='leetcode.db'): 106 | db_engine = create_engine('sqlite:///{}'.format(dbName)) 107 | Session = sessionmaker() 108 | Session.configure(bind=db_engine) 109 | session = Session() 110 | return session 111 | 112 | if __name__ == "__main__": 113 | # createRawTable() # comment out if the table exists 114 | insert_all_quest() 115 | -------------------------------------------------------------------------------- /pics/LikeDislieRatio.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fatliau/leetcode_MostLikedQuests/74cb56b6a9e0f425242446cfd7956d6c29e6833c/pics/LikeDislieRatio.png -------------------------------------------------------------------------------- /questionDTO.py: -------------------------------------------------------------------------------- 1 | from sqlalchemy import Column, Integer, String, ForeignKey, Table 2 | from sqlalchemy.orm import relationship, backref, sessionmaker 3 | from sqlalchemy.ext.declarative import declarative_base 4 | 5 | from sqlalchemy import create_engine 6 | 7 | Base = declarative_base() 8 | 9 | # CREATE TABLE questions( questionId INT, questionFrontendId INT, title TEXT, titleSlug TEXT, content TEXT, 10 | # isPaidOnly INT, difficulty TEXT, likes INT, dislikes INT); 11 | 12 | class Question(Base): 13 | __tablename__ = "questions" 14 | questionId = Column(Integer, primary_key=True) 15 | questionFrontendId = Column(Integer) 16 | title = Column(String) 17 | titleSlug = Column(String) 18 | content = Column(String) 19 | isPaidOnly = Column(Integer) 20 | difficulty = Column(String) 21 | likes = Column(Integer) 22 | dislikes = Column(Integer) 23 | 24 | def query_all(dbName='leetcode.db'): 25 | db_engine = create_engine('sqlite:///{}'.format(dbName)) 26 | Session = sessionmaker() 27 | Session.configure(bind=db_engine) 28 | session = Session() 29 | results = session.query(Question).all() 30 | 31 | def createObjectFromJson(quest_json): 32 | questionId = quest_json.get('questionId', -1) 33 | questionObj = Question(questionId=questionId) 34 | 35 | questionObj.questionFrontendId = quest_json.get('questionFrontendId', -1) 36 | questionObj.title = quest_json.get('title', "").replace("'", " ").replace('"', " ").replace(";", " ") 37 | questionObj.titleSlug = quest_json.get('titleSlug', "").replace("'", " ").replace('"', " ").replace(";", " ") 38 | # content = quest_json.get('content', "") # TODO: store question content 39 | questionObj.isPaidOnly = 1 if quest_json.get('isPaidOnly', False) else 0 40 | questionObj.difficulty = quest_json.get('difficulty', "").replace("'", " ").replace('"', " ").replace(";", " ") 41 | questionObj.likes = quest_json.get('likes', -1) 42 | questionObj.dislikes = quest_json.get('dislikes', -1) 43 | return questionObj 44 | 45 | def addQuestion(session, questionObj): 46 | question = ( 47 | session.query(Question).filter(Question.questionId == questionObj.questionId).one_or_none() 48 | ) 49 | # Does the Question already exist? 50 | if question is not None: 51 | print("id:{} exist".format(questionObj.questionId)) 52 | return 53 | session.add(questionObj) 54 | session.commit() 55 | -------------------------------------------------------------------------------- /questions.csv: -------------------------------------------------------------------------------- 1 | questionFrontendId,title,isPaidOnly,difficulty,likeDislike_ratio,likes,dislikes 2 | 1151,"Minimum Swaps to Group All 1 s Together",1,Medium,146,292,2 3 | 1716,"Calculate Money in Leetcode Bank",0,Easy,136,136,1 4 | 990,"Satisfiability of Equality Equations",0,Medium,121,726,6 5 | 1522,"Diameter of N-Ary Tree",1,Medium,103,103,1 6 | 1579,"Remove Max Number of Edges to Keep Graph Fully Traversable",0,Hard,95,287,3 7 | 1368,"Minimum Cost to Make at Least One Valid Path in a Grid",0,Hard,92,462,5 8 | 1434,"Number of Ways to Wear Different Hats to Each Other",0,Hard,91,364,4 9 | 1235,"Maximum Profit in Job Scheduling",0,Hard,90,995,11 10 | 1143,"Longest Common Subsequence",0,Medium,84,2523,30 11 | 1745,"Palindrome Partitioning IV",0,Hard,79,158,2 12 | 958,"Check Completeness of a Binary Tree",0,Medium,79,1115,14 13 | 72,"Edit Distance",0,Hard,77,5133,66 14 | 1463,"Cherry Pickup II",0,Hard,76,685,9 15 | 1439,"Find the Kth Smallest Sum of a Matrix With Sorted Rows",0,Hard,73,442,6 16 | 1676,"Lowest Common Ancestor of a Binary Tree IV",1,Medium,72,72,1 17 | 1671,"Minimum Number of Removals to Make Mountain Array",0,Hard,70,212,3 18 | 1602,"Find Nearest Right Node in Binary Tree",1,Medium,70,141,2 19 | 1312,"Minimum Insertion Steps to Make a String Palindrome",0,Hard,70,637,9 20 | 1567,"Maximum Length of Subarray With Positive Product",0,Medium,69,345,5 21 | 1264,"Page Recommendations",1,Medium,67,67,1 22 | 286,"Walls and Gates",1,Medium,67,1495,22 23 | 226,"Invert Binary Tree",0,Easy,66,4680,70 24 | 1713,"Minimum Operations to Make a Subsequence",0,Hard,65,195,3 25 | 366,"Find Leaves of Binary Tree",1,Medium,65,1248,19 26 | 42,"Trapping Rain Water",0,Hard,65,9809,149 27 | 1449,"Form Largest Integer With Digits That Add up to Target",0,Hard,64,321,5 28 | 1388,"Pizza With 3n Slices",0,Hard,64,320,5 29 | 208,"Implement Trie (Prefix Tree)",0,Medium,64,4166,65 30 | 1004,"Max Consecutive Ones III",0,Medium,63,1828,29 31 | 1580,"Put Boxes Into the Warehouse II",1,Medium,62,62,1 32 | 1478,"Allocate Mailboxes",0,Hard,62,373,6 33 | 253,"Meeting Rooms II",1,Medium,61,3392,55 34 | 1547,"Minimum Cost to Cut a Stick",0,Hard,60,360,6 35 | 1546,"Maximum Number of Non-Overlapping Subarrays With Sum Equals Target",0,Medium,60,424,7 36 | 1440,"Evaluate Boolean Expression",1,Medium,60,60,1 37 | 1554,"Strings Differ by One Character",1,Medium,59,59,1 38 | 968,"Binary Tree Cameras",0,Hard,59,1139,19 39 | 1530,"Number of Good Leaf Nodes Pairs",0,Medium,58,582,10 40 | 1406,"Stone Game III",0,Hard,58,467,8 41 | 1277,"Count Square Submatrices with All Ones",0,Medium,58,1626,28 42 | 992,"Subarrays with K Different Integers",0,Hard,58,1523,26 43 | 159,"Longest Substring with At Most Two Distinct Characters",1,Medium,58,1219,21 44 | 337,"House Robber III",0,Medium,57,3705,65 45 | 1585,"Check If String Is Transformable With Substring Sort Operations",0,Hard,56,224,4 46 | 1643,"Kth Smallest Instructions",0,Hard,56,168,3 47 | 1293,"Shortest Path in a Grid with Obstacles Elimination",0,Hard,55,661,12 48 | 1514,"Path with Maximum Probability",0,Medium,54,490,9 49 | 295,"Find Median from Data Stream",0,Hard,54,3693,68 50 | 106,"Construct Binary Tree from Inorder and Postorder Traversal",0,Medium,54,2415,44 51 | 64,"Minimum Path Sum",0,Medium,54,4213,78 52 | 1474,"Delete N Nodes After M Nodes of a Linked List",1,Easy,53,161,3 53 | 983,"Minimum Cost For Tickets",0,Medium,53,2495,47 54 | 1077,"Project Employees III",1,Medium,52,104,2 55 | 632,"Smallest Range Covering Elements from K Lists",0,Hard,52,1324,25 56 | 329,"Longest Increasing Path in a Matrix",0,Hard,52,2694,51 57 | 1664,"Ways to Make a Fair Array",0,Medium,51,309,6 58 | 1319,"Number of Operations to Make Network Connected",0,Medium,51,725,14 59 | 206,"Reverse Linked List",0,Easy,51,6276,121 60 | 487,"Max Consecutive Ones II",1,Medium,50,657,13 61 | 1532,"The Most Recent Three Orders",1,Medium,49,49,1 62 | 1125,"Smallest Sufficient Team",0,Hard,49,448,9 63 | 863,"All Nodes Distance K in Binary Tree",0,Medium,49,3144,64 64 | 84,"Largest Rectangle in Histogram",0,Hard,49,5225,105 65 | 1469,"Find All The Lonely Nodes",1,Easy,48,194,4 66 | 1372,"Longest ZigZag Path in a Binary Tree",0,Medium,48,489,10 67 | 1278,"Palindrome Partitioning III",0,Hard,48,391,8 68 | 240,"Search a 2D Matrix II",0,Medium,48,4155,85 69 | 1358,"Number of Substrings Containing All Three Characters",0,Medium,47,611,13 70 | 1245,"Tree Diameter",1,Medium,47,429,9 71 | 78,Subsets,0,Medium,47,5202,109 72 | 1493,"Longest Subarray of 1 s After Deleting One Element",0,Medium,46,323,7 73 | 174,"Dungeon Game",0,Hard,46,2151,46 74 | 85,"Maximal Rectangle",0,Hard,46,3836,83 75 | 1663,"Smallest String With A Given Numeric Value",0,Medium,45,362,8 76 | 1035,"Uncrossed Lines",0,Medium,45,1057,23 77 | 895,"Maximum Frequency Stack",0,Hard,45,1315,29 78 | 871,"Minimum Number of Refueling Stops",0,Hard,45,1049,23 79 | 407,"Trapping Rain Water II",0,Hard,45,1688,37 80 | 1420,"Build Array Where You Can Find The Maximum Exactly K Comparisons",0,Hard,44,265,6 81 | 862,"Shortest Subarray with Sum at Least K",0,Hard,44,1588,36 82 | 416,"Partition Equal Subset Sum",0,Medium,44,3938,88 83 | 1743,"Restore the Array From Adjacent Pairs",0,Medium,43,175,4 84 | 1458,"Max Dot Product of Two Subsequences",0,Hard,43,388,9 85 | 1209,"Remove All Adjacent Duplicates in String II",0,Medium,43,1049,24 86 | 300,"Longest Increasing Subsequence",0,Medium,43,6421,149 87 | 230,"Kth Smallest Element in a BST",0,Medium,43,3483,81 88 | 1572,"Matrix Diagonal Sum",0,Easy,42,341,8 89 | 1542,"Find Longest Awesome Substring",0,Hard,42,298,7 90 | 1496,"Path Crossing",0,Easy,42,253,6 91 | 1482,"Minimum Number of Days to Make m Bouquets",0,Medium,42,727,17 92 | 1455,"Check If a Word Occurs As a Prefix of Any Word in a Sentence",0,Easy,42,252,6 93 | 46,Permutations,0,Medium,42,5352,125 94 | 1644,"Lowest Common Ancestor of a Binary Tree II",1,Medium,41,82,2 95 | 1416,"Restore The Array",0,Hard,41,208,5 96 | 1246,"Palindrome Removal",1,Hard,41,208,5 97 | 583,"Delete Operation for Two Strings",0,Medium,41,1376,33 98 | 582,"Kill Process",1,Medium,41,542,13 99 | 213,"House Robber II",0,Medium,41,2579,62 100 | 102,"Binary Tree Level Order Traversal",0,Medium,41,4158,101 101 | 1365,"How Many Numbers Are Smaller Than the Current Number",0,Easy,40,1385,34 102 | 1325,"Delete Leaves With a Given Value",0,Medium,40,609,15 103 | 1249,"Minimum Remove to Make Valid Parentheses",0,Medium,40,1572,39 104 | 946,"Validate Stack Sequences",0,Medium,40,1309,32 105 | 221,"Maximal Square",0,Medium,40,4134,103 106 | 1187,"Make Array Strictly Increasing",0,Hard,39,354,9 107 | 105,"Construct Binary Tree from Preorder and Inorder Traversal",0,Medium,39,4669,119 108 | 104,"Maximum Depth of Binary Tree",0,Easy,39,3529,90 109 | 1685,"Sum of Absolute Differences in a Sorted Array",0,Medium,38,228,6 110 | 1658,"Minimum Operations to Reduce X to Zero",0,Medium,38,695,18 111 | 1466,"Reorder Routes to Make All Paths Lead to the City Zero",0,Medium,38,540,14 112 | 1100,"Find K-Length Substrings With No Repeated Characters",1,Medium,38,229,6 113 | 518,"Coin Change 2",0,Medium,38,2765,71 114 | 129,"Sum Root to Leaf Numbers",0,Medium,38,2051,53 115 | 123,"Best Time to Buy and Sell Stock III",0,Hard,38,3183,83 116 | 1697,"Checking Existence of Edge Length Limited Paths",0,Hard,37,225,6 117 | 1216,"Valid Palindrome III",1,Hard,37,223,6 118 | 305,"Number of Islands II",1,Hard,37,967,26 119 | 101,"Symmetric Tree",0,Easy,37,5558,147 120 | 39,"Combination Sum",0,Medium,37,5347,142 121 | 1734,"Decode XORed Permutation",0,Medium,36,217,6 122 | 1703,"Minimum Adjacent Swaps for K Consecutive Ones",0,Hard,36,147,4 123 | 1394,"Find Lucky Integer in an Array",0,Easy,36,330,9 124 | 1349,"Maximum Students Taking Exam",0,Hard,36,369,10 125 | 1182,"Shortest Distance to Target Color",1,Medium,36,145,4 126 | 960,"Delete Columns to Make Sorted III",0,Hard,36,292,8 127 | 886,"Possible Bipartition",0,Medium,36,1289,35 128 | 718,"Maximum Length of Repeated Subarray",0,Medium,36,1775,49 129 | 435,"Non-overlapping Intervals",0,Medium,36,1843,50 130 | 100,"Same Tree",0,Easy,36,2906,79 131 | 1727,"Largest Submatrix With Rearrangements",0,Medium,35,284,8 132 | 1695,"Maximum Erasure Value",0,Medium,35,178,5 133 | 1444,"Number of Ways of Cutting a Pizza",0,Hard,35,285,8 134 | 1446,"Consecutive Characters",0,Easy,35,457,13 135 | 1008,"Construct Binary Search Tree from Preorder Traversal",0,Medium,35,1677,47 136 | 962,"Maximum Width Ramp",0,Medium,35,716,20 137 | 678,"Valid Parenthesis String",0,Medium,35,2216,63 138 | 323,"Number of Connected Components in an Undirected Graph",1,Medium,35,1016,29 139 | 47,"Permutations II",0,Medium,35,2707,76 140 | 1653,"Minimum Deletions to Make String Balanced",0,Medium,34,241,7 141 | 1262,"Greatest Sum Divisible by Three",0,Medium,34,660,19 142 | 1248,"Count Number of Nice Subarrays",0,Medium,34,724,21 143 | 1092,"Shortest Common Supersequence ",0,Hard,34,838,24 144 | 1046,"Last Stone Weight",0,Easy,34,1202,35 145 | 312,"Burst Balloons",0,Hard,34,3330,96 146 | 272,"Closest Binary Search Tree Value II",1,Hard,34,722,21 147 | 198,"House Robber",0,Medium,34,6451,185 148 | 1641,"Count Sorted Vowel Strings",0,Medium,33,698,21 149 | 1574,"Shortest Subarray to be Removed to Make Array Sorted",0,Medium,33,470,14 150 | 1011,"Capacity To Ship Packages Within D Days",0,Medium,33,1784,53 151 | 986,"Interval List Intersections",0,Medium,33,1997,59 152 | 926,"Flip String to Monotone Increasing",0,Medium,33,728,22 153 | 714,"Best Time to Buy and Sell Stock with Transaction Fee",0,Medium,33,2049,62 154 | 322,"Coin Change",0,Medium,33,5958,178 155 | 132,"Palindrome Partitioning II",0,Hard,33,1631,49 156 | 1591,"Strange Printer II",0,Hard,32,164,5 157 | 1457,"Pseudo-Palindromic Paths in a Binary Tree",0,Medium,32,580,18 158 | 1254,"Number of Closed Islands",0,Medium,32,687,21 159 | 1120,"Maximum Average Subtree",1,Medium,32,352,11 160 | 827,"Making A Large Island",0,Hard,32,610,19 161 | 739,"Daily Temperatures",0,Medium,32,3789,118 162 | 1730,"Shortest Path to Get Food",1,Medium,32,32,1 163 | 309,"Best Time to Buy and Sell Stock with Cooldown",0,Medium,32,3381,104 164 | 283,"Move Zeroes",0,Easy,32,4990,155 165 | 200,"Number of Islands",0,Medium,32,7583,234 166 | 1525,"Number of Good Ways to Split a String",0,Medium,31,344,11 167 | 1306,"Jump Game III",0,Medium,31,996,32 168 | 354,"Russian Doll Envelopes",0,Hard,31,1563,49 169 | 325,"Maximum Size Subarray Sum Equals k",1,Medium,31,1131,36 170 | 315,"Count of Smaller Numbers After Self",0,Hard,31,3136,100 171 | 261,"Graph Valid Tree",1,Medium,31,1278,41 172 | 131,"Palindrome Partitioning",0,Medium,31,2971,94 173 | 70,"Climbing Stairs",0,Easy,31,5854,185 174 | 1722,"Minimize Hamming Distance After Swap Operations",0,Medium,30,276,9 175 | 1110,"Delete Nodes And Return Forest",0,Medium,30,1591,53 176 | 1094,"Car Pooling",0,Medium,30,1114,36 177 | 856,"Score of Parentheses",0,Medium,30,1600,52 178 | 815,"Bus Routes",0,Hard,30,984,32 179 | 787,"Cheapest Flights Within K Stops",0,Medium,30,2729,90 180 | 773,"Sliding Puzzle",0,Hard,30,879,29 181 | 136,"Single Number",0,Easy,30,5673,187 182 | 1415,"The k-th Lexicographical String of All Happy Strings of Length n",0,Medium,29,354,12 183 | 1632,"Rank Transform of a Matrix",0,Hard,29,179,6 184 | 1168,"Optimize Water Distribution in a Village",1,Hard,29,378,13 185 | 876,"Middle of the Linked List",0,Easy,29,2046,69 186 | 695,"Max Area of Island",0,Medium,29,2684,92 187 | 668,"Kth Smallest Number in Multiplication Table",0,Hard,29,671,23 188 | 560,"Subarray Sum Equals K",0,Medium,29,6522,224 189 | 152,"Maximum Product Subarray",0,Medium,29,6125,205 190 | 113,"Path Sum II",0,Medium,29,2501,86 191 | 1647,"Minimum Deletions to Make Character Frequencies Unique",0,Medium,28,230,8 192 | 1367,"Linked List in Binary Tree",0,Medium,28,704,25 193 | 1371,"Find the Longest Substring Containing Vowels in Even Counts",0,Medium,28,566,20 194 | 1219,"Path with Maximum Gold",0,Medium,28,828,29 195 | 1136,"Parallel Courses",1,Hard,28,253,9 196 | 1028,"Recover a Tree From Preorder Traversal",0,Hard,28,595,21 197 | 940,"Distinct Subsequences II",0,Hard,28,484,17 198 | 567,"Permutation in String",0,Medium,28,2144,76 199 | 340,"Longest Substring with At Most K Distinct Characters",1,Medium,28,1472,52 200 | 115,"Distinct Subsequences",0,Hard,28,1738,62 201 | 109,"Convert Sorted List to Binary Search Tree",0,Medium,28,2651,93 202 | 40,"Combination Sum II",0,Medium,28,2443,85 203 | 1,"Two Sum",0,Easy,28,19149,682 204 | 1595,"Minimum Cost to Connect Two Groups of Points",0,Hard,27,190,7 205 | 1582,"Special Positions in a Binary Matrix",0,Easy,27,194,7 206 | 1559,"Detect Cycles in 2D Grid",0,Hard,27,245,9 207 | 1499,"Max Value of Equation",0,Hard,27,271,10 208 | 1202,"Smallest String With Swaps",0,Medium,27,800,29 209 | 1026,"Maximum Difference Between Node and Ancestor",0,Medium,27,1110,41 210 | 979,"Distribute Coins in Binary Tree",0,Medium,27,2173,78 211 | 956,"Tallest Billboard",0,Hard,27,412,15 212 | 864,"Shortest Path to Get All Keys",0,Hard,27,497,18 213 | 647,"Palindromic Substrings",0,Medium,27,3637,133 214 | 370,"Range Addition",1,Medium,27,631,23 215 | 51,N-Queens,0,Hard,27,2612,96 216 | 1606,"Find Servers That Handled Most Number of Requests",0,Hard,26,183,7 217 | 1263,"Minimum Moves to Move a Box to Their Target Location",0,Hard,26,266,10 218 | 1190,"Reverse Substrings Between Each Pair of Parentheses",0,Medium,26,642,24 219 | 1079,"Letter Tile Possibilities",0,Medium,26,908,34 220 | 834,"Sum of Distances in Tree",0,Hard,26,1118,43 221 | 814,"Binary Tree Pruning",0,Medium,26,1310,50 222 | 719,"Find K-th Smallest Pair Distance",0,Hard,26,1225,46 223 | 630,"Course Schedule III",0,Hard,26,962,36 224 | 452,"Minimum Number of Arrows to Burst Balloons",0,Medium,26,1581,59 225 | 410,"Split Array Largest Sum",0,Hard,26,2363,90 226 | 358,"Rearrange String k Distance Apart",1,Hard,26,555,21 227 | 216,"Combination Sum III",0,Medium,26,1641,63 228 | 99,"Recover Binary Search Tree",0,Hard,26,2234,85 229 | 96,"Unique Binary Search Trees",0,Medium,26,4267,159 230 | 32,"Longest Valid Parentheses",0,Hard,26,4439,167 231 | 1593,"Split a String Into the Max Number of Unique Substrings",0,Medium,25,276,11 232 | 1605,"Find Valid Matrix Given Row and Column Sums",0,Medium,25,362,14 233 | 1590,"Make Sum Divisible by P",0,Medium,25,383,15 234 | 1539,"Kth Missing Positive Number",0,Easy,25,755,30 235 | 1207,"Unique Number of Occurrences",0,Easy,25,606,24 236 | 1315,"Sum of Nodes with Even-Valued Grandparent",0,Medium,25,802,32 237 | 1049,"Last Stone Weight II",0,Medium,25,1081,42 238 | 752,"Open the Lock",0,Medium,25,1423,55 239 | 713,"Subarray Product Less Than K",0,Medium,25,2129,82 240 | 540,"Single Element in a Sorted Array",0,Medium,25,2184,86 241 | 450,"Delete Node in a BST",0,Medium,25,2647,104 242 | 254,"Factor Combinations",1,Medium,25,670,26 243 | 236,"Lowest Common Ancestor of a Binary Tree",0,Medium,25,5075,199 244 | 209,"Minimum Size Subarray Sum",0,Medium,25,3339,133 245 | 77,Combinations,0,Medium,25,2004,79 246 | 34,"Find First and Last Position of Element in Sorted Array",0,Medium,25,4900,190 247 | 1679,"Max Number of K-Sum Pairs",0,Medium,24,363,15 248 | 1340,"Jump Game V",0,Hard,24,313,13 249 | 1305,"All Elements in Two Binary Search Trees",0,Medium,24,809,33 250 | 1186,"Maximum Subarray Sum with One Deletion",0,Medium,24,711,29 251 | 1112,"Highest Grade For Each Student",1,Medium,24,98,4 252 | 1074,"Number of Submatrices That Sum to Target",0,Hard,24,746,30 253 | 1135,"Connecting Cities With Minimum Cost",1,Medium,24,414,17 254 | 881,"Boats to Save People",0,Medium,24,1171,48 255 | 873,"Length of Longest Fibonacci Subsequence",0,Medium,24,916,37 256 | 845,"Longest Mountain in Array",0,Medium,24,1057,43 257 | 503,"Next Greater Element II",0,Medium,24,2158,88 258 | 494,"Target Sum",0,Medium,24,3658,148 259 | 239,"Sliding Window Maximum",0,Hard,24,5118,212 260 | 212,"Word Search II",0,Hard,24,3388,141 261 | 207,"Course Schedule",0,Medium,24,5201,210 262 | 146,"LRU Cache",0,Medium,24,7722,316 263 | 103,"Binary Tree Zigzag Level Order Traversal",0,Medium,24,3046,122 264 | 37,"Sudoku Solver",0,Hard,24,2469,100 265 | 20,"Valid Parentheses",0,Easy,24,6748,274 266 | 1631,"Path With Minimum Effort",0,Medium,23,829,35 267 | 1626,"Best Team With No Conflicts",0,Medium,23,350,15 268 | 1556,"Thousand Separator",0,Easy,23,166,7 269 | 1521,"Find a Value of a Mysterious Function Closest to Target",0,Hard,23,185,8 270 | 1288,"Remove Covered Intervals",0,Medium,23,594,25 271 | 1060,"Missing Element in Sorted Array",1,Medium,23,857,37 272 | 872,"Leaf-Similar Trees",0,Easy,23,1035,44 273 | 768,"Max Chunks To Make Sorted II",0,Hard,23,527,22 274 | 763,"Partition Labels",0,Medium,23,4086,171 275 | 402,"Remove K Digits",0,Medium,23,3030,131 276 | 265,"Paint House II",1,Hard,23,600,26 277 | 148,"Sort List",0,Medium,23,3846,166 278 | 144,"Binary Tree Preorder Traversal",0,Medium,23,2042,86 279 | 79,"Word Search",0,Medium,23,5149,222 280 | 1709,"Biggest Window Between Visits",1,Medium,22,22,1 281 | 1513,"Number of Substrings With Only 1s",0,Medium,22,274,12 282 | 1356,"Sort Integers by The Number of 1 Bits",0,Easy,22,422,19 283 | 1320,"Minimum Distance to Type a Word Using Two Fingers",0,Hard,22,516,23 284 | 1173,"Immediate Food Delivery I",1,Easy,22,90,4 285 | 1054,"Distant Barcodes",0,Medium,22,509,23 286 | 1162,"As Far from Land as Possible",0,Medium,22,751,33 287 | 1101,"The Earliest Moment When Everyone Become Friends",1,Medium,22,157,7 288 | 1024,"Video Stitching",0,Medium,22,667,30 289 | 1014,"Best Sightseeing Pair",0,Medium,22,573,26 290 | 930,"Binary Subarrays With Sum",0,Medium,22,705,31 291 | 712,"Minimum ASCII Delete Sum for Two Strings",0,Medium,22,1220,54 292 | 310,"Minimum Height Trees",0,Medium,22,2850,124 293 | 235,"Lowest Common Ancestor of a Binary Search Tree",0,Easy,22,2785,125 294 | 211,"Design Add and Search Words Data Structure",0,Medium,22,2714,121 295 | 121,"Best Time to Buy and Sell Stock",0,Easy,22,7520,336 296 | 94,"Binary Tree Inorder Traversal",0,Medium,22,4220,188 297 | 90,"Subsets II",0,Medium,22,2230,100 298 | 49,"Group Anagrams",0,Medium,22,4851,220 299 | 22,"Generate Parentheses",0,Medium,22,7036,312 300 | 1699,"Number of Calls Between Two Persons",1,Medium,21,21,1 301 | 1704,"Determine if String Halves Are Alike",0,Easy,21,126,6 302 | 1675,"Minimize Deviation in Array",0,Hard,21,382,18 303 | 1575,"Count All Possible Routes",0,Hard,21,195,9 304 | 1438,"Longest Continuous Subarray With Absolute Diff Less Than or Equal to Limit",0,Medium,21,1158,54 305 | 1423,"Maximum Points You Can Obtain from Cards",0,Medium,21,1032,48 306 | 1285,"Find the Start and End Number of Continuous Ranges",1,Medium,21,171,8 307 | 534,"Game Play Analysis III",1,Medium,21,128,6 308 | 1230,"Toss Strange Coins",1,Medium,21,128,6 309 | 945,"Minimum Increment to Make Array Unique",0,Medium,21,558,26 310 | 918,"Maximum Sum Circular Subarray",0,Medium,21,1480,70 311 | 896,"Monotonic Array",0,Easy,21,887,41 312 | 844,"Backspace String Compare",0,Easy,21,2237,105 313 | 813,"Largest Sum of Averages",0,Medium,21,1124,53 314 | 767,"Reorganize String",0,Medium,21,2518,118 315 | 559,"Maximum Depth of N-ary Tree",0,Easy,21,1204,56 316 | 428,"Serialize and Deserialize N-ary Tree",1,Hard,21,572,27 317 | 729,"My Calendar I",0,Medium,21,946,44 318 | 301,"Remove Invalid Parentheses",0,Hard,21,3124,145 319 | 297,"Serialize and Deserialize Binary Tree",0,Hard,21,3925,183 320 | 145,"Binary Tree Postorder Traversal",0,Medium,21,2355,110 321 | 82,"Remove Duplicates from Sorted List II",0,Medium,21,2648,122 322 | 45,"Jump Game II",0,Hard,21,3615,167 323 | 44,"Wildcard Matching",0,Hard,21,2679,127 324 | 1636,"Sort Array by Increasing Frequency",0,Easy,20,270,13 325 | 1529,"Bulb Switcher IV",0,Medium,20,323,16 326 | 1484,"Group Sold Products By The Date",1,Easy,20,100,5 327 | 1462,"Course Schedule IV",0,Medium,20,326,16 328 | 1425,"Constrained Subsequence Sum",0,Hard,20,460,22 329 | 1155,"Number of Dice Rolls With Target Sum",0,Medium,20,1110,55 330 | 1301,"Number of Paths with Max Score",0,Hard,20,187,9 331 | 1161,"Maximum Level Sum of a Binary Tree",0,Medium,20,663,33 332 | 704,"Binary Search",0,Easy,20,1126,56 333 | 617,"Merge Two Binary Trees",0,Easy,20,3906,190 334 | 581,"Shortest Unsorted Continuous Subarray",0,Medium,20,3398,165 335 | 572,"Subtree of Another Tree",0,Easy,20,3096,152 336 | 454,"4Sum II",0,Medium,20,1747,84 337 | 394,"Decode String",0,Medium,20,4551,222 338 | 210,"Course Schedule II",0,Medium,20,3262,162 339 | 203,"Remove Linked List Elements",0,Easy,20,2411,115 340 | 143,"Reorder List",0,Medium,20,2857,141 341 | 139,"Word Break",0,Medium,20,5980,286 342 | 128,"Longest Consecutive Sequence",0,Hard,20,4610,224 343 | 53,"Maximum Subarray",0,Easy,20,10686,512 344 | 1707,"Maximum XOR With an Element From Array",0,Hard,19,153,8 345 | 1723,"Find Minimum Time to Finish All Jobs",0,Hard,19,172,9 346 | 1639,"Number of Ways to Form a Target String Given a Dictionary",0,Hard,19,116,6 347 | 1442,"Count Triplets That Can Form Two Arrays of Equal XOR",0,Medium,19,455,23 348 | 1382,"Balance a Binary Search Tree",0,Medium,19,529,27 349 | 1031,"Maximum Sum of Two Non-Overlapping Subarrays",0,Medium,19,939,49 350 | 993,"Cousins in Binary Tree",0,Easy,19,1296,66 351 | 973,"K Closest Points to Origin",0,Medium,19,2665,139 352 | 951,"Flip Equivalent Binary Trees",0,Medium,19,913,47 353 | 554,"Brick Wall",0,Medium,19,1093,56 354 | 525,"Contiguous Array",0,Medium,19,2622,134 355 | 505,"The Maze II",1,Medium,19,701,36 356 | 463,"Island Perimeter",0,Easy,19,2545,132 357 | 449,"Serialize and Deserialize BST",0,Medium,19,1815,92 358 | 438,"Find All Anagrams in a String",0,Medium,19,3867,195 359 | 424,"Longest Repeating Character Replacement",0,Medium,19,2077,107 360 | 387,"First Unique Character in a String",0,Easy,19,2622,132 361 | 376,"Wiggle Subsequence",0,Medium,19,1278,65 362 | 368,"Largest Divisible Subset",0,Medium,19,1716,87 363 | 285,"Inorder Successor in BST",1,Medium,19,1417,71 364 | 281,"Zigzag Iterator",1,Medium,19,433,22 365 | 252,"Meeting Rooms",1,Easy,19,836,44 366 | 116,"Populating Next Right Pointers in Each Node",0,Medium,19,3022,159 367 | 92,"Reverse Linked List II",0,Medium,19,3289,169 368 | 62,"Unique Paths",0,Medium,19,4517,234 369 | 23,"Merge k Sorted Lists",0,Hard,19,6510,342 370 | 3,"Longest Substring Without Repeating Characters",0,Medium,19,13009,676 371 | 1524,"Number of Sub-arrays With Odd Sum",0,Medium,18,311,17 372 | 1448,"Count Good Nodes in Binary Tree",0,Medium,18,511,27 373 | 1398,"Customers Who Bought Products A and B but Not C",1,Medium,18,72,4 374 | 1310,"XOR Queries of a Subarray",0,Medium,18,424,23 375 | 1429,"First Unique Number",1,Medium,18,202,11 376 | 1200,"Minimum Absolute Difference",0,Easy,18,519,28 377 | 1192,"Critical Connections in a Network",0,Hard,18,1974,108 378 | 1027,"Longest Arithmetic Subsequence",0,Medium,18,1119,61 379 | 1020,"Number of Enclaves",0,Medium,18,448,24 380 | 1062,"Longest Repeating Substring",1,Medium,18,360,20 381 | 1061,"Lexicographically Smallest Equivalent String",1,Medium,18,129,7 382 | 996,"Number of Squareful Arrays",0,Hard,18,434,23 383 | 917,"Reverse Only Letters",0,Easy,18,738,41 384 | 889,"Construct Binary Tree from Preorder and Postorder Traversal",0,Medium,18,1103,59 385 | 797,"All Paths From Source to Target",0,Medium,18,1591,85 386 | 431,"Encode N-ary Tree to Binary Tree",1,Hard,18,279,15 387 | 673,"Number of Longest Increasing Subsequence",0,Medium,18,2077,115 388 | 608,"Tree Node",1,Medium,18,221,12 389 | 514,"Freedom Trail",0,Hard,18,496,27 390 | 442,"Find All Duplicates in an Array",0,Medium,18,3241,173 391 | 378,"Kth Smallest Element in a Sorted Matrix",0,Medium,18,3273,173 392 | 338,"Counting Bits",0,Medium,18,3555,193 393 | 257,"Binary Tree Paths",0,Easy,18,2327,123 394 | 241,"Different Ways to Add Parentheses",0,Medium,18,2023,107 395 | 199,"Binary Tree Right Side View",0,Medium,18,3464,183 396 | 182,"Duplicate Emails",0,Easy,18,584,31 397 | 169,"Majority Element",0,Easy,18,4460,246 398 | 56,"Merge Intervals",0,Medium,18,6426,355 399 | 1587,"Bank Account Summary II",1,Easy,17,35,2 400 | 1526,"Minimum Number of Increments on Subarrays to Form a Target Array",0,Hard,17,285,16 401 | 1473,"Paint House III",0,Hard,17,315,18 402 | 1477,"Find Two Non-overlapping Sub-arrays Each With Target Sum",0,Medium,17,654,37 403 | 1456,"Maximum Number of Vowels in a Substring of Given Length",0,Medium,17,339,19 404 | 1351,"Count Negative Numbers in a Sorted Matrix",0,Easy,17,781,45 405 | 1290,"Convert Binary Number in a Linked List to Integer",0,Easy,17,1017,59 406 | 1726,"Tuple with Same Product",0,Medium,17,161,9 407 | 1302,"Deepest Leaves Sum",0,Medium,17,944,53 408 | 1129,"Shortest Path with Alternating Colors",0,Medium,17,588,33 409 | 1019,"Next Greater Node In Linked List",0,Medium,17,1185,67 410 | 977,"Squares of a Sorted Array",0,Easy,17,2001,113 411 | 905,"Sort Array By Parity",0,Easy,17,1516,85 412 | 489,"Robot Room Cleaner",1,Hard,17,1378,80 413 | 796,"Rotate String",0,Easy,17,990,58 414 | 510,"Inorder Successor in BST II",1,Medium,17,426,25 415 | 486,"Predict the Winner",0,Medium,17,1791,101 416 | 369,"Plus One Linked List",1,Medium,17,618,36 417 | 347,"Top K Frequent Elements",0,Medium,17,4422,253 418 | 279,"Perfect Squares",0,Medium,17,3940,228 419 | 218,"The Skyline Problem",0,Hard,17,2669,151 420 | 97,"Interleaving String",0,Hard,17,1848,103 421 | 75,"Sort Colors",0,Medium,17,4804,272 422 | 16,"3Sum Closest",0,Medium,17,2856,164 423 | 1673,"Find the Most Competitive Subsequence",0,Medium,16,646,40 424 | 1650,"Lowest Common Ancestor of a Binary Tree III",1,Medium,16,64,4 425 | 1686,"Stone Game VI",0,Medium,16,179,11 426 | 1624,"Largest Substring Between Two Equal Characters",0,Easy,16,167,10 427 | 1594,"Maximum Non Negative Product in a Matrix",0,Medium,16,284,17 428 | 1436,"Destination City",0,Easy,16,500,30 429 | 1422,"Maximum Score After Splitting a String",0,Easy,16,287,17 430 | 1411,"Number of Ways to Paint N × 3 Grid",0,Hard,16,403,24 431 | 1352,"Product of the Last K Numbers",0,Medium,16,468,28 432 | 1269,"Number of Ways to Stay in the Same Place After Some Steps",0,Hard,16,333,20 433 | 1691,"Maximum Height by Stacking Cuboids ",0,Hard,16,146,9 434 | 1147,"Longest Chunked Palindrome Decomposition",0,Hard,16,249,15 435 | 1106,"Parsing A Boolean Expression",0,Hard,16,318,19 436 | 1229,"Meeting Scheduler",1,Medium,16,316,19 437 | 1165,"Single-Row Keyboard",1,Easy,16,202,12 438 | 1010,"Pairs of Songs With Total Durations Divisible by 60",0,Medium,16,1145,69 439 | 965,"Univalued Binary Tree",0,Easy,16,736,46 440 | 922,"Sort Array By Parity II",0,Easy,16,913,57 441 | 870,"Advantage Shuffle",0,Medium,16,656,41 442 | 786,"K-th Smallest Prime Fraction",0,Hard,16,475,28 443 | 741,"Cherry Pickup",0,Hard,16,1472,89 444 | 727,"Minimum Window Subsequence",1,Hard,16,851,51 445 | 698,"Partition to K Equal Sum Subsets",0,Medium,16,2603,159 446 | 694,"Number of Distinct Islands",1,Medium,16,1109,69 447 | 680,"Valid Palindrome II",0,Easy,16,2292,143 448 | 542,"01 Matrix",0,Medium,16,2076,124 449 | 515,"Find Largest Value in Each Tree Row",0,Medium,16,1199,71 450 | 477,"Total Hamming Distance",0,Medium,16,1040,64 451 | 471,"Encode String with Shortest Length",1,Hard,16,431,26 452 | 380,"Insert Delete GetRandom O(1)",0,Medium,16,3250,194 453 | 331,"Verify Preorder Serialization of a Binary Tree",0,Medium,16,888,55 454 | 307,"Range Sum Query - Mutable",0,Medium,16,1684,100 455 | 264,"Ugly Number II",0,Medium,16,2409,150 456 | 260,"Single Number III",0,Medium,16,2111,128 457 | 188,"Best Time to Buy and Sell Stock IV",0,Hard,16,2211,135 458 | 118,"Pascal s Triangle",0,Easy,16,2194,130 459 | 24,"Swap Nodes in Pairs",0,Medium,16,3273,202 460 | 19,"Remove Nth Node From End of List",0,Medium,16,4693,286 461 | 1718,"Construct the Lexicographically Largest Valid Sequence",0,Medium,15,156,10 462 | 1717,"Maximum Score From Removing Substrings",0,Medium,15,183,12 463 | 1657,"Determine if Two Strings Are Close",0,Medium,15,384,25 464 | 1634,"Add Two Polynomials Represented as Linked Lists",1,Medium,15,30,2 465 | 1584,"Min Cost to Connect All Points",0,Medium,15,360,24 466 | 1578,"Minimum Deletion Cost to Avoid Repeating Letters",0,Medium,15,281,18 467 | 1558,"Minimum Numbers of Function Calls to Make Target Array",0,Medium,15,230,15 468 | 1490,"Clone N-ary Tree",1,Medium,15,125,8 469 | 1392,"Longest Happy Prefix",0,Hard,15,303,19 470 | 1334,"Find the City With the Smallest Number of Neighbors at a Threshold Distance",0,Medium,15,477,31 471 | 1218,"Longest Arithmetic Subsequence of Given Difference",0,Medium,15,473,30 472 | 1171,"Remove Zero Sum Consecutive Nodes from Linked List",0,Medium,15,762,48 473 | 1105,"Filling Bookcase Shelves",0,Medium,15,793,50 474 | 1048,"Longest String Chain",0,Medium,15,1414,94 475 | 1063,"Number of Valid Subarrays",1,Hard,15,120,8 476 | 1055,"Shortest Way to Form String",1,Medium,15,579,38 477 | 1000,"Minimum Cost to Merge Stones",0,Hard,15,845,55 478 | 907,"Sum of Subarray Minimums",0,Medium,15,1763,115 479 | 875,"Koko Eating Bananas",0,Medium,15,1273,81 480 | 821,"Shortest Distance to a Character",0,Easy,15,1459,93 481 | 798,"Smallest Rotation with Highest Score",0,Hard,15,256,17 482 | 795,"Number of Subarrays with Bounded Maximum",0,Medium,15,700,45 483 | 737,"Sentence Similarity II",1,Medium,15,561,36 484 | 689,"Maximum Sum of 3 Non-Overlapping Subarrays",0,Hard,15,1162,73 485 | 670,"Maximum Swap",0,Medium,15,1352,87 486 | 547,"Number of Provinces",0,Medium,15,2685,172 487 | 543,"Diameter of Binary Tree",0,Easy,15,4200,264 488 | 538,"Convert BST to Greater Tree",0,Medium,15,2234,142 489 | 456,"132 Pattern",0,Medium,15,2106,134 490 | 425,"Word Squares",1,Hard,15,689,44 491 | 317,"Shortest Distance from All Buildings",1,Hard,15,947,60 492 | 291,"Word Pattern II",1,Medium,15,487,32 493 | 215,"Kth Largest Element in an Array",0,Medium,15,5093,330 494 | 110,"Balanced Binary Tree",0,Easy,15,3156,207 495 | 83,"Remove Duplicates from Sorted List",0,Easy,15,2247,143 496 | 1696,"Jump Game VI",0,Medium,14,279,19 497 | 1609,"Even Odd Tree",0,Medium,14,230,16 498 | 1589,"Maximum Sum Obtained of Any Permutation",0,Medium,14,259,18 499 | 1537,"Get the Maximum Score",0,Hard,14,300,21 500 | 1505,"Minimum Possible Integer After at Most K Adjacent Swaps On Digits",0,Hard,14,198,14 501 | 1510,"Stone Game IV",0,Hard,14,374,25 502 | 1412,"Find the Quiet Students in All Exams",1,Hard,14,70,5 503 | 1419,"Minimum Number of Frogs Croaking",0,Medium,14,400,28 504 | 1347,"Minimum Number of Steps to Make Two Strings Anagram",0,Medium,14,469,32 505 | 1337,"The K Weakest Rows in a Matrix",0,Easy,14,531,36 506 | 1430,"Check If a String Is a Valid Sequence from Root to Leaves Path in a Binary Tree",1,Medium,14,87,6 507 | 1292,"Maximum Side Length of a Square with Sum Less than or Equal to Threshold",0,Medium,14,464,31 508 | 1287,"Element Appearing More Than 25% In Sorted Array",0,Easy,14,401,28 509 | 1122,"Relative Sort Array",0,Easy,14,957,66 510 | 1047,"Remove All Adjacent Duplicates In String",0,Easy,14,1312,89 511 | 994,"Rotting Oranges",0,Medium,14,2982,208 512 | 980,"Unique Paths III",0,Hard,14,1266,87 513 | 934,"Shortest Bridge",0,Medium,14,1163,81 514 | 915,"Partition Array into Disjoint Intervals",0,Medium,14,434,30 515 | 841,"Keys and Rooms",0,Medium,14,1439,102 516 | 784,"Letter Case Permutation",0,Medium,14,1673,114 517 | 702,"Search in a Sorted Array of Unknown Size",1,Medium,14,463,31 518 | 701,"Insert into a Binary Search Tree",0,Medium,14,1394,95 519 | 766,"Toeplitz Matrix",0,Easy,14,1280,88 520 | 765,"Couples Holding Hands",0,Hard,14,957,67 521 | 759,"Employee Free Time",1,Hard,14,742,51 522 | 740,"Delete and Earn",0,Medium,14,1341,95 523 | 730,"Count Different Palindromic Subsequences",0,Hard,14,715,49 524 | 692,"Top K Frequent Words",0,Medium,14,2673,183 525 | 646,"Maximum Length of Pair Chain",0,Medium,14,1241,87 526 | 642,"Design Search Autocomplete System",1,Hard,14,1202,85 527 | 603,"Consecutive Available Seats",1,Easy,14,285,20 528 | 546,"Remove Boxes",0,Hard,14,814,56 529 | 451,"Sort Characters By Frequency",0,Medium,14,2115,143 530 | 437,"Path Sum III",0,Medium,14,4749,319 531 | 409,"Longest Palindrome",0,Easy,14,1430,97 532 | 373,"Find K Pairs with Smallest Sums",0,Medium,14,1780,122 533 | 348,"Design Tic-Tac-Toe",1,Medium,14,977,68 534 | 334,"Increasing Triplet Subsequence",0,Medium,14,2269,161 535 | 95,"Unique Binary Search Trees II",0,Medium,14,2809,197 536 | 76,"Minimum Window Substring",0,Hard,14,5961,409 537 | 74,"Search a 2D Matrix",0,Medium,14,2845,191 538 | 55,"Jump Game",0,Medium,14,5684,400 539 | 5,"Longest Palindromic Substring",0,Medium,14,9607,647 540 | 1725,"Number Of Rectangles That Can Form The Largest Square",0,Easy,13,96,7 541 | 1710,"Maximum Units on a Truck",0,Easy,13,178,13 542 | 1700,"Number of Students Unable to Eat Lunch",0,Easy,13,178,13 543 | 1642,"Furthest Building You Can Reach",0,Medium,13,396,29 544 | 1535,"Find the Winner of an Array Game",0,Medium,13,287,22 545 | 1504,"Count Submatrices With All Ones",0,Medium,13,745,54 546 | 1396,"Design Underground System",0,Medium,13,481,36 547 | 1369,"Get the Second Most Recent Activity",1,Hard,13,53,4 548 | 1383,"Maximum Performance of a Team",0,Hard,13,355,26 549 | 1345,"Jump Game IV",0,Hard,13,552,41 550 | 1303,"Find the Team Size",1,Easy,13,120,9 551 | 1208,"Get Equal Substrings Within Budget",0,Medium,13,368,28 552 | 1259,"Handshakes That Don t Cross",1,Hard,13,80,6 553 | 1188,"Design Bounded Blocking Queue",1,Medium,13,233,17 554 | 1231,"Divide Chocolate",1,Hard,13,433,32 555 | 1095,"Find in Mountain Array",0,Hard,13,449,34 556 | 1215,"Stepping Numbers",1,Medium,13,131,10 557 | 1066,"Campus Bikes II",1,Medium,13,492,37 558 | 995,"Minimum Number of K Consecutive Bit Flips",0,Hard,13,464,34 559 | 974,"Subarray Sums Divisible by K",0,Medium,13,1416,108 560 | 931,"Minimum Falling Path Sum",0,Medium,13,1059,80 561 | 921,"Minimum Add to Make Parentheses Valid",0,Medium,13,1041,79 562 | 887,"Super Egg Drop",0,Hard,13,1233,94 563 | 854,"K-Similar Strings",0,Hard,13,537,41 564 | 850,"Rectangle Area II",0,Hard,13,425,32 565 | 801,"Minimum Swaps To Make Sequences Increasing",0,Medium,13,1394,100 566 | 799,"Champagne Tower",0,Medium,13,747,54 567 | 792,"Number of Matching Subsequences",0,Medium,13,1238,89 568 | 589,"N-ary Tree Preorder Traversal",0,Easy,13,827,63 569 | 429,"N-ary Tree Level Order Traversal",0,Medium,13,825,59 570 | 663,"Equal Tree Partition",1,Medium,13,319,23 571 | 650,"2 Keys Keyboard",0,Medium,13,1595,115 572 | 557,"Reverse Words in a String III",0,Easy,13,1329,99 573 | 549,"Binary Tree Longest Consecutive Sequence II",1,Medium,13,663,49 574 | 516,"Longest Palindromic Subsequence",0,Medium,13,2770,212 575 | 480,"Sliding Window Median",0,Hard,13,1248,95 576 | 448,"Find All Numbers Disappeared in an Array",0,Easy,13,3816,279 577 | 363,"Max Sum of Rectangle No Larger Than K",0,Hard,13,1019,75 578 | 316,"Remove Duplicate Letters",0,Medium,13,2180,166 579 | 243,"Shortest Word Distance",1,Easy,13,646,48 580 | 242,"Valid Anagram",0,Easy,13,2186,157 581 | 142,"Linked List Cycle II",0,Medium,13,3744,282 582 | 124,"Binary Tree Maximum Path Sum",0,Hard,13,5084,368 583 | 108,"Convert Sorted Array to Binary Search Tree",0,Easy,13,3412,257 584 | 48,"Rotate Image",0,Medium,13,4263,311 585 | 1557,"Minimum Number of Vertices to Reach All Nodes",0,Medium,12,426,34 586 | 1502,"Can Make Arithmetic Progression From Sequence",0,Easy,12,277,23 587 | 1331,"Rank Transform of an Array",0,Easy,12,393,32 588 | 1130,"Minimum Cost Tree From Leaf Values",0,Medium,12,1876,145 589 | 1286,"Iterator for Combination",0,Medium,12,553,46 590 | 1091,"Shortest Path in Binary Matrix",0,Medium,12,796,62 591 | 1213,"Intersection of Three Sorted Arrays",1,Easy,12,230,19 592 | 1198,"Find Smallest Common Element in All Rows",1,Medium,12,165,13 593 | 997,"Find the Town Judge",0,Easy,12,1365,110 594 | 894,"All Possible Full Binary Trees",0,Medium,12,1264,104 595 | 778,"Swim in Rising Water",0,Hard,12,797,62 596 | 776,"Split BST",1,Medium,12,711,55 597 | 590,"N-ary Tree Postorder Traversal",0,Easy,12,887,73 598 | 715,"Range Module",0,Hard,12,575,47 599 | 669,"Trim a Binary Search Tree",0,Medium,12,2635,208 600 | 653,"Two Sum IV - Input is a BST",0,Easy,12,1857,148 601 | 611,"Valid Triangle Number",0,Medium,12,1287,102 602 | 530,"Minimum Absolute Difference in BST",0,Easy,12,1114,87 603 | 476,"Number Complement",0,Easy,12,1084,85 604 | 462,"Minimum Moves to Equal Array Elements II",0,Medium,12,615,51 605 | 461,"Hamming Distance",0,Easy,12,2091,174 606 | 460,"LFU Cache",0,Hard,12,1789,146 607 | 399,"Evaluate Division",0,Medium,12,3166,250 608 | 381,"Insert Delete GetRandom O(1) - Duplicates allowed",0,Hard,12,1049,85 609 | 318,"Maximum Product of Word Lengths",0,Medium,12,957,79 610 | 296,"Best Meeting Point",1,Hard,12,570,46 611 | 270,"Closest Binary Search Tree Value",1,Easy,12,947,74 612 | 238,"Product of Array Except Self",0,Medium,12,6635,519 613 | 224,"Basic Calculator",0,Hard,12,1968,155 614 | 59,"Spiral Matrix II",0,Medium,12,1522,125 615 | 11,"Container With Most Water",0,Medium,12,8298,657 616 | 1724,"Checking Existence of Edge Length Limited Paths II",1,Hard,11,11,1 617 | 1742,"Maximum Number of Balls in a Box",0,Easy,11,79,7 618 | 1684,"Count the Number of Consistent Strings",0,Easy,11,178,16 619 | 1553,"Minimum Number of Days to Eat N Oranges",0,Hard,11,375,32 620 | 1545,"Find Kth Bit in Nth Binary String",0,Medium,11,198,18 621 | 1512,"Number of Good Pairs",0,Easy,11,891,80 622 | 1494,"Parallel Courses II",0,Hard,11,312,28 623 | 1381,"Design a Stack With Increment Operation",0,Medium,11,469,42 624 | 1339,"Maximum Product of Splitted Binary Tree",0,Medium,11,462,40 625 | 1267,"Count Servers that Communicate",0,Medium,11,489,44 626 | 1253,"Reconstruct a 2-Row Binary Matrix",0,Medium,11,179,15 627 | 1191,"K-Concatenation Maximum Sum",0,Medium,11,453,41 628 | 1115,"Print FooBar Alternately",0,Medium,11,336,29 629 | 511,"Game Play Analysis I",1,Easy,11,58,5 630 | 1166,"Design File System",1,Medium,11,132,12 631 | 1022,"Sum of Root To Leaf Binary Numbers",0,Easy,11,1034,87 632 | 903,"Valid Permutations for DI Sequence",0,Hard,11,335,29 633 | 430,"Flatten a Multilevel Doubly Linked List",0,Medium,11,2038,184 634 | 426,"Convert Binary Search Tree to Sorted Doubly Linked List",1,Medium,11,1188,106 635 | 735,"Asteroid Collision",0,Medium,11,1750,154 636 | 691,"Stickers to Spell Word",0,Hard,11,475,42 637 | 1721,"Swapping Nodes in a Linked List",0,Medium,11,179,16 638 | 473,"Matchsticks to Square",0,Medium,11,724,62 639 | 403,"Frog Jump",0,Hard,11,1409,125 640 | 294,"Flip Game II",1,Medium,11,440,37 641 | 256,"Paint House",1,Medium,11,1116,98 642 | 255,"Verify Preorder Sequence in Binary Search Tree",1,Medium,11,708,60 643 | 229,"Majority Element II",0,Medium,11,2430,213 644 | 173,"Binary Search Tree Iterator",0,Medium,11,3402,306 645 | 117,"Populating Next Right Pointers in Each Node II",0,Medium,11,2243,195 646 | 35,"Search Insert Position",0,Easy,11,3143,285 647 | 33,"Search in Rotated Sorted Array",0,Medium,11,6874,607 648 | 1687,"Delivering Boxes from Storage to Ports",0,Hard,10,113,11 649 | 1498,"Number of Subsequences That Satisfy the Given Sum Condition",0,Medium,10,481,48 650 | 1497,"Check If Array Pairs Are Divisible by k",0,Medium,10,395,39 651 | 1480,"Running Sum of 1d Array",0,Easy,10,968,94 652 | 1475,"Final Prices With a Special Discount in a Shop",0,Easy,10,376,35 653 | 1404,"Number of Steps to Reduce a Number in Binary Representation to One",0,Medium,10,265,25 654 | 1380,"Lucky Numbers in a Matrix",0,Easy,10,428,41 655 | 1376,"Time Needed to Inform All Employees",0,Medium,10,691,64 656 | 1338,"Reduce Array Size to The Half",0,Medium,10,372,37 657 | 1342,"Number of Steps to Reduce a Number to Zero",0,Easy,10,689,68 658 | 1309,"Decrypt String from Alphabet to Integer Mapping",0,Easy,10,485,48 659 | 1270,"All People Report to the Given Manager",1,Medium,10,153,14 660 | 1268,"Search Suggestions System",0,Medium,10,892,89 661 | 1255,"Maximum Score Words Formed by Letters",0,Hard,10,248,24 662 | 1225,"Report Contiguous Dates",1,Hard,10,109,10 663 | 1204,"Last Person to Fit in the Elevator",1,Medium,10,114,11 664 | 1706,"Where Will the Ball Fall",0,Medium,10,183,17 665 | 1189,"Maximum Number of Balloons",0,Easy,10,450,45 666 | 1156,"Swap For Longest Repeated Character Substring",0,Medium,10,433,40 667 | 1272,"Remove Interval",1,Medium,10,180,17 668 | 1214,"Two Sum BSTs",1,Medium,10,240,22 669 | 1072,"Flip Columns For Maximum Number of Equal Rows",0,Medium,10,329,30 670 | 1052,"Grumpy Bookstore Owner",0,Medium,10,649,63 671 | 1038,"Binary Search Tree to Greater Sum Tree",0,Medium,10,1187,109 672 | 1133,"Largest Unique Number",1,Easy,10,120,11 673 | 890,"Find and Replace Pattern",0,Medium,10,887,83 674 | 828,"Count Unique Characters of All Substrings of a Given String",0,Hard,10,570,56 675 | 785,"Is Graph Bipartite?",0,Medium,10,2150,208 676 | 465,"Optimal Account Balancing",1,Hard,10,703,70 677 | 446,"Arithmetic Slices II - Subsequence",0,Hard,10,624,62 678 | 445,"Add Two Numbers II",0,Medium,10,2123,195 679 | 404,"Sum of Left Leaves",0,Easy,10,1669,161 680 | 362,"Design Hit Counter",1,Medium,10,973,94 681 | 336,"Palindrome Pairs",0,Hard,10,1660,164 682 | 333,"Largest BST Subtree",1,Medium,10,782,75 683 | 280,"Wiggle Sort",1,Medium,10,706,68 684 | 234,"Palindrome Linked List",0,Easy,10,4593,421 685 | 222,"Count Complete Tree Nodes",0,Medium,10,2678,247 686 | 214,"Shortest Palindrome",0,Hard,10,1497,146 687 | 155,"Min Stack",0,Easy,10,4547,420 688 | 153,"Find Minimum in Rotated Sorted Array",0,Medium,10,3086,287 689 | 57,"Insert Interval",0,Medium,10,2558,233 690 | 17,"Letter Combinations of a Phone Number",0,Medium,10,5289,488 691 | 13,"Roman to Integer",0,Easy,10,50,5 692 | 1702,"Maximum Binary String After Change",0,Medium,9,165,18 693 | 1701,"Average Waiting Time",0,Medium,9,117,13 694 | 1655,"Distribute Repeating Integers",0,Hard,9,100,11 695 | 1598,"Crawler Log Folder",0,Easy,9,159,16 696 | 1552,"Magnetic Force Between Two Balls",0,Medium,9,449,47 697 | 1544,"Make The String Great",0,Easy,9,333,36 698 | 1518,"Water Bottles",0,Easy,9,365,37 699 | 1495,"Friendly Movies Streamed Last Month",1,Easy,9,28,3 700 | 1531,"String Compression II",0,Hard,9,265,27 701 | 1523,"Count Odd Numbers in an Interval Range",0,Easy,9,185,20 702 | 1454,"Active Users",1,Medium,9,134,14 703 | 1443,"Minimum Time to Collect All Apples in a Tree",0,Medium,9,513,56 704 | 1407,"Top Travellers",1,Easy,9,45,5 705 | 1414,"Find the Minimum Number of Fibonacci Numbers Whose Sum Is K",0,Medium,9,362,40 706 | 1350,"Students With Invalid Departments",1,Easy,9,66,7 707 | 1359,"Count All Valid Pickup and Delivery Options",0,Hard,9,249,27 708 | 1335,"Minimum Difficulty of a Job Schedule",0,Hard,9,496,51 709 | 1326,"Minimum Number of Taps to Open to Water a Garden",0,Hard,9,490,53 710 | 1318,"Minimum Flips to Make a OR b Equal to c",0,Medium,9,201,21 711 | 1296,"Divide Array in Sets of K Consecutive Numbers",0,Medium,9,618,63 712 | 1239,"Maximum Length of a Concatenated String with Unique Characters",0,Medium,9,720,78 713 | 1184,"Distance Between Bus Stops",0,Easy,9,314,34 714 | 1126,"Active Businesses",1,Medium,9,108,12 715 | 1289,"Minimum Falling Path Sum II",0,Hard,9,329,33 716 | 1291,"Sequential Digits",0,Medium,9,492,52 717 | 1257,"Smallest Common Region",1,Medium,9,187,19 718 | 1102,"Path With Maximum Minimum Value",1,Medium,9,625,68 719 | 1029,"Two City Scheduling",0,Medium,9,1727,190 720 | 1099,"Two Sum Less Than K",1,Easy,9,480,52 721 | 1087,"Brace Expansion",1,Medium,9,305,33 722 | 1009,"Complement of Base 10 Integer",0,Easy,9,417,43 723 | 1005,"Maximize Sum Of Array After K Negations",0,Easy,9,497,53 724 | 1002,"Find Common Characters",0,Easy,9,1293,133 725 | 976,"Largest Perimeter Triangle",0,Easy,9,479,52 726 | 920,"Number of Music Playlists",0,Hard,9,503,51 727 | 849,"Maximize Distance to Closest Person",0,Medium,9,1208,126 728 | 847,"Shortest Path Visiting All Nodes",0,Hard,9,726,76 729 | 846,"Hand of Straights",0,Medium,9,893,93 730 | 838,"Push Dominoes",0,Medium,9,764,77 731 | 818,"Race Car",0,Hard,9,600,66 732 | 700,"Search in a Binary Search Tree",0,Easy,9,1254,127 733 | 757,"Set Intersection Size At Least Two",0,Hard,9,333,37 734 | 743,"Network Delay Time",0,Medium,9,2321,243 735 | 664,"Strange Printer",0,Hard,9,538,55 736 | 644,"Maximum Average Subarray II",1,Hard,9,469,51 737 | 637,"Average of Levels in Binary Tree",0,Easy,9,1659,180 738 | 594,"Longest Harmonious Subsequence",0,Easy,9,1086,117 739 | 586,"Customer Placing the Largest Number of Orders",1,Easy,9,130,14 740 | 570,"Managers with at Least 5 Direct Reports",1,Medium,9,128,14 741 | 565,"Array Nesting",0,Medium,9,977,105 742 | 502,IPO,0,Hard,9,466,47 743 | 459,"Repeated Substring Pattern",0,Easy,9,2230,226 744 | 421,"Maximum XOR of Two Numbers in an Array",0,Medium,9,1904,207 745 | 392,"Is Subsequence",0,Easy,9,2179,229 746 | 346,"Moving Average from Data Stream",1,Easy,9,775,83 747 | 287,"Find the Duplicate Number",0,Medium,9,6721,723 748 | 259,"3Sum Smaller",1,Medium,9,780,80 749 | 232,"Implement Queue using Stacks",0,Easy,9,1532,162 750 | 201,"Bitwise AND of Numbers Range",0,Medium,9,1270,141 751 | 183,"Customers Who Never Order",0,Easy,9,485,53 752 | 179,"Largest Number",0,Medium,9,2771,298 753 | 114,"Flatten Binary Tree to Linked List",0,Medium,9,3835,391 754 | 15,3Sum,0,Medium,9,9377,965 755 | 1715,"Count Apples and Oranges",1,Medium,8,16,2 756 | 1732,"Find the Highest Altitude",0,Easy,8,107,12 757 | 1712,"Ways to Split Array Into Three Subarrays",0,Medium,8,279,32 758 | 1621,"Number of Sets of K Non-Overlapping Line Segments",0,Medium,8,168,20 759 | 1601,"Maximum Number of Achievable Transfer Requests",0,Hard,8,161,19 760 | 1564,"Put Boxes Into the Warehouse I",1,Medium,8,61,7 761 | 1588,"Sum of All Odd Length Subarrays",0,Easy,8,526,64 762 | 1509,"Minimum Difference Between Largest and Smallest Value in Three Moves",0,Medium,8,257,32 763 | 1481,"Least Number of Unique Integers after K Removals",0,Medium,8,289,33 764 | 1470,"Shuffle the Array",0,Easy,8,922,110 765 | 1424,"Diagonal Traverse II",0,Medium,8,443,54 766 | 1400,"Construct K Palindrome Strings",0,Medium,8,291,36 767 | 1295,"Find Numbers with Even Number of Digits",0,Easy,8,574,71 768 | 1284,"Minimum Number of Flips to Convert Binary Matrix to Zero Matrix",0,Hard,8,266,30 769 | 1251,"Average Selling Price",1,Easy,8,134,16 770 | 1224,"Maximum Equal Frequency",0,Hard,8,234,27 771 | 1212,"Team Scores in Football Tournament",1,Medium,8,129,15 772 | 1206,"Design Skiplist",0,Hard,8,219,25 773 | 1178,"Number of Valid Words for Each Puzzle",0,Hard,8,260,32 774 | 1157,"Online Majority Element In Subarray",0,Hard,8,280,32 775 | 1330,"Reverse Subarray To Maximize Array Value",0,Hard,8,209,26 776 | 1137,"N-th Tribonacci Number",0,Easy,8,456,51 777 | 1124,"Longest Well-Performing Interval",0,Medium,8,553,69 778 | 1199,"Minimum Time to Build Blocks",1,Hard,8,113,14 779 | 1228,"Missing Number In Arithmetic Progression",1,Easy,8,106,12 780 | 1183,"Maximum Number of Ones",1,Hard,8,73,9 781 | 1196,"How Many Apples Can You Put into the Basket",1,Easy,8,91,11 782 | 952,"Largest Component Size by Common Factor",0,Hard,8,540,67 783 | 941,"Valid Mountain Array",0,Easy,8,793,89 784 | 901,"Online Stock Span",0,Medium,8,1287,155 785 | 879,"Profitable Schemes",0,Hard,8,278,31 786 | 860,"Lemonade Change",0,Easy,8,773,92 787 | 857,"Minimum Cost to Hire K Workers",0,Hard,8,1083,122 788 | 641,"Design Circular Deque",0,Medium,8,354,42 789 | 823,"Binary Trees With Factors",0,Medium,8,345,39 790 | 706,"Design HashMap",0,Easy,8,1263,141 791 | 654,"Maximum Binary Tree",0,Medium,8,2303,262 792 | 624,"Maximum Distance in Arrays",1,Medium,8,480,59 793 | 573,"Squirrel Simulation",1,Medium,8,254,29 794 | 566,"Reshape the Matrix",0,Easy,8,931,107 795 | 493,"Reverse Pairs",0,Hard,8,1221,137 796 | 490,"The Maze",1,Medium,8,958,107 797 | 439,"Ternary Expression Parser",1,Medium,8,283,32 798 | 432,"All O`one Data Structure",0,Hard,8,740,87 799 | 406,"Queue Reconstruction by Height",0,Medium,8,3825,433 800 | 395,"Longest Substring with At Least K Repeating Characters",0,Medium,8,2247,255 801 | 386,"Lexicographical Numbers",0,Medium,8,696,87 802 | 377,"Combination Sum IV",0,Medium,8,1846,220 803 | 328,"Odd Even Linked List",0,Medium,8,2776,330 804 | 327,"Count of Range Sum",0,Hard,8,969,108 805 | 290,"Word Pattern",0,Easy,8,1694,208 806 | 277,"Find the Celebrity",1,Medium,8,1383,154 807 | 266,"Palindrome Permutation",1,Easy,8,527,59 808 | 181,"Employees Earning More Than Their Managers",0,Easy,8,741,88 809 | 171,"Excel Sheet Column Number",0,Easy,8,1529,190 810 | 160,"Intersection of Two Linked Lists",0,Easy,8,4856,549 811 | 126,"Word Ladder II",0,Hard,8,2275,275 812 | 120,Triangle,0,Medium,8,2611,296 813 | 107,"Binary Tree Level Order Traversal II",0,Easy,8,1974,235 814 | 98,"Validate Binary Search Tree",0,Medium,8,5424,645 815 | 73,"Set Matrix Zeroes",0,Medium,8,3037,352 816 | 63,"Unique Paths II",0,Medium,8,2418,278 817 | 25,"Reverse Nodes in k-Group",0,Hard,8,3249,394 818 | 21,"Merge Two Sorted Lists",0,Easy,8,6049,719 819 | 1731,"The Number of Employees Which Report to Each Employee",1,Easy,7,15,2 820 | 1739,"Building Boxes",0,Hard,7,114,15 821 | 1678,"Goal Parser Interpretation",0,Easy,7,171,23 822 | 1674,"Minimum Moves to Make Array Complementary",0,Medium,7,240,33 823 | 1665,"Minimum Initial Energy to Finish Tasks",0,Hard,7,182,23 824 | 1612,"Check If Two Expression Trees are Equivalent",1,Medium,7,49,7 825 | 1596,"The Most Frequently Ordered Products for Each Customer",1,Medium,7,45,6 826 | 1586,"Binary Search Tree Iterator II",1,Medium,7,60,8 827 | 1569,"Number of Ways to Reorder Array to Get Same BST",0,Hard,7,171,22 828 | 1520,"Maximum Number of Non-Overlapping Substrings",0,Hard,7,320,44 829 | 1489,"Find Critical and Pseudo-Critical Edges in Minimum Spanning Tree",0,Hard,7,209,29 830 | 1472,"Design Browser History",0,Medium,7,392,51 831 | 1393,"Capital Gain/Loss",1,Medium,7,71,10 832 | 1395,"Count Number of Teams",0,Medium,7,790,112 833 | 1387,"Sort Integers by The Power Value",0,Medium,7,347,49 834 | 1366,"Rank Teams by Votes",0,Medium,7,377,51 835 | 1354,"Construct Target Array With Multiple Sums",0,Hard,7,240,34 836 | 1353,"Maximum Number of Events That Can Be Attended",0,Medium,7,706,94 837 | 1280,"Students and Examinations",1,Easy,7,135,18 838 | 1428,"Leftmost Column with at Least a One",1,Medium,7,401,53 839 | 1172,"Dinner Plate Stacks",0,Hard,7,221,28 840 | 1627,"Graph Connectivity With Threshold",0,Hard,7,151,19 841 | 1081,"Smallest Subsequence of Distinct Characters",0,Medium,7,786,107 842 | 1043,"Partition Array for Maximum Sum",0,Medium,7,1012,127 843 | 1039,"Minimum Score Triangulation of Polygon",0,Medium,7,588,77 844 | 1150,"Check If a Number Is Majority Element in a Sorted Array",1,Easy,7,170,23 845 | 1134,"Armstrong Number",1,Easy,7,81,11 846 | 1013,"Partition Array Into Three Parts With Equal Sum",0,Easy,7,611,79 847 | 981,"Time Based Key-Value Store",0,Medium,7,1067,135 848 | 938,"Range Sum of BST",0,Easy,7,2024,279 849 | 902,"Numbers At Most N Given Digit Set",0,Hard,7,479,67 850 | 832,"Flipping an Image",0,Easy,7,1226,174 851 | 738,"Monotone Increasing Digits",0,Medium,7,577,73 852 | 733,"Flood Fill",0,Easy,7,1720,230 853 | 731,"My Calendar II",0,Medium,7,742,98 854 | 684,"Redundant Connection",0,Medium,7,1856,240 855 | 674,"Longest Continuous Increasing Subsequence",0,Easy,7,1057,135 856 | 652,"Find Duplicate Subtrees",0,Medium,7,1757,230 857 | 616,"Add Bold Tag in String",1,Medium,7,614,84 858 | 613,"Shortest Distance in a Line",1,Easy,7,187,26 859 | 588,"Design In-Memory File System",1,Hard,7,500,67 860 | 513,"Find Bottom Left Tree Value",0,Medium,7,1219,163 861 | 472,"Concatenated Words",0,Hard,7,1057,140 862 | 467,"Unique Substrings in Wraparound String",0,Medium,7,744,98 863 | 455,"Assign Cookies",0,Easy,7,803,114 864 | 433,"Minimum Genetic Mutation",0,Medium,7,513,70 865 | 413,"Arithmetic Slices",0,Medium,7,1358,187 866 | 361,"Bomb Enemy",1,Medium,7,538,75 867 | 330,"Patching Array",0,Hard,7,590,83 868 | 314,"Binary Tree Vertical Order Traversal",1,Medium,7,1363,190 869 | 308,"Range Sum Query 2D - Mutable",1,Hard,7,479,63 870 | 289,"Game of Life",0,Medium,7,2436,323 871 | 267,"Palindrome Permutation II",1,Medium,7,530,68 872 | 175,"Combine Two Tables",0,Easy,7,1085,153 873 | 141,"Linked List Cycle",0,Easy,7,4034,576 874 | 135,Candy,0,Hard,7,1313,186 875 | 67,"Add Binary",0,Easy,7,2496,326 876 | 18,4Sum,0,Medium,7,2905,392 877 | 1740,"Find Distance in a Binary Tree",1,Medium,6,31,5 878 | 1720,"Decode XORed Array",0,Easy,6,128,20 879 | 1660,"Correct a Binary Tree",1,Medium,6,52,8 880 | 1649,"Create Sorted Array through Instructions",0,Hard,6,322,49 881 | 1613,"Find the Missing IDs",1,Medium,6,54,8 882 | 1629,"Slowest Key",0,Easy,6,150,23 883 | 1617,"Count Subtrees With Max Distance Between Cities",0,Hard,6,139,21 884 | 1608,"Special Array With X Elements Greater Than or Equal X",0,Easy,6,211,35 885 | 1571,"Warehouse Manager",1,Easy,6,38,6 886 | 1570,"Dot Product of Two Sparse Vectors",1,Medium,6,176,27 887 | 1566,"Detect Pattern of Length M Repeated K or More Times",0,Easy,6,265,44 888 | 1549,"The Most Recent Orders for Each Product",1,Medium,6,27,4 889 | 1501,"Countries You Can Safely Invest In",1,Medium,6,61,10 890 | 1485,"Clone Binary Tree With Random Pointer",1,Medium,6,133,22 891 | 1468,"Calculate Salaries",1,Medium,6,42,7 892 | 1445,"Apples & Oranges",1,Medium,6,57,9 893 | 1373,"Maximum Sum BST in Binary Tree",0,Hard,6,367,61 894 | 1321,"Restaurant Growth",1,Medium,6,123,18 895 | 1323,"Maximum 69 Number",0,Easy,6,495,82 896 | 1294,"Weather Type in Each Country",1,Easy,6,43,7 897 | 1266,"Minimum Time Visiting All Points",0,Easy,6,700,112 898 | 1426,"Counting Elements",1,Easy,6,54,8 899 | 1242,"Web Crawler Multithreaded",1,Medium,6,232,38 900 | 1483,"Kth Ancestor of a Tree Node",0,Hard,6,363,53 901 | 1363,"Largest Multiple of Three",0,Hard,6,223,37 902 | 1274,"Number of Ships in a Rectangle",1,Hard,6,165,24 903 | 1300,"Sum of Mutated Array Closest to Target",0,Medium,6,426,67 904 | 512,"Game Play Analysis II",1,Easy,6,86,13 905 | 1160,"Find Words That Can Be Formed by Characters",0,Easy,6,536,89 906 | 1032,"Stream of Characters",0,Hard,6,750,111 907 | 1007,"Minimum Domino Rotations For Equal Row",0,Medium,6,1179,190 908 | 989,"Add to Array-Form of Integer",0,Easy,6,530,85 909 | 955,"Delete Columns to Make Sorted II",0,Medium,6,319,52 910 | 954,"Array of Doubled Pairs",0,Medium,6,379,59 911 | 943,"Find the Shortest Superstring",0,Hard,6,480,77 912 | 919,"Complete Binary Tree Inserter",0,Medium,6,389,56 913 | 622,"Design Circular Queue",0,Medium,6,791,116 914 | 826,"Most Profit Assigning Work",0,Medium,6,462,74 915 | 705,"Design HashSet",0,Easy,6,641,100 916 | 774,"Minimize Max Distance to Gas Station",1,Hard,6,407,64 917 | 771,"Jewels and Stones",0,Easy,6,2477,395 918 | 769,"Max Chunks To Make Sorted",0,Medium,6,948,137 919 | 750,"Number Of Corner Rectangles",1,Medium,6,511,78 920 | 696,"Count Binary Substrings",0,Easy,6,1188,197 921 | 693,"Binary Number with Alternating Bits",0,Easy,6,581,91 922 | 677,"Map Sum Pairs",0,Medium,6,612,92 923 | 658,"Find K Closest Elements",0,Medium,6,1859,300 924 | 651,"4 Keys Keyboard",1,Medium,6,417,62 925 | 648,"Replace Words",0,Medium,6,910,140 926 | 643,"Maximum Average Subarray I",0,Easy,6,894,129 927 | 600,"Non-negative Integers without Consecutive Ones",0,Hard,6,489,77 928 | 531,"Lonely Pixel I",1,Medium,6,219,32 929 | 1059,"All Paths from Source Lead to Destination",1,Medium,6,207,34 930 | 491,"Increasing Subsequences",0,Medium,6,901,133 931 | 484,"Find Permutation",1,Medium,6,420,68 932 | 464,"Can I Win",0,Medium,6,1211,198 933 | 440,"K-th Smallest in Lexicographical Order",0,Hard,6,392,59 934 | 304,"Range Sum Query 2D - Immutable",0,Medium,6,1359,201 935 | 227,"Basic Calculator II",0,Medium,6,2106,336 936 | 140,"Word Break II",0,Hard,6,2864,438 937 | 134,"Gas Station",0,Medium,6,2694,421 938 | 10,"Regular Expression Matching",0,Hard,6,5324,823 939 | 4,"Median of Two Sorted Arrays",0,Hard,6,9110,1403 940 | 1738,"Find Kth Largest XOR Coordinate Value",0,Medium,5,97,18 941 | 1692,"Count Ways to Distribute Candies",1,Hard,5,22,4 942 | 1682,"Longest Palindromic Subsequence II",1,Medium,5,36,7 943 | 1633,"Percentage of Users Attended a Contest",1,Easy,5,15,3 944 | 1628,"Design an Expression Tree With Evaluate Function",1,Medium,5,65,12 945 | 1669,"Merge In Between Linked Lists",0,Medium,5,204,36 946 | 1652,"Defuse the Bomb",0,Easy,5,155,28 947 | 1630,"Arithmetic Subarrays",0,Medium,5,156,27 948 | 1607,"Sellers With No Sales",1,Easy,5,22,4 949 | 1615,"Maximal Network Rank",0,Medium,5,171,30 950 | 1573,"Number of Ways to Split a String",0,Medium,5,224,40 951 | 1533,"Find the Index of the Large Integer",1,Medium,5,44,8 952 | 1536,"Minimum Swaps to Arrange a Binary Grid",0,Medium,5,263,50 953 | 1511,"Customer Order Frequency",1,Easy,5,90,17 954 | 1508,"Range Sum of Sorted Subarray Sums",0,Medium,5,263,52 955 | 1447,"Simplified Fractions",0,Medium,5,126,25 956 | 1375,"Bulb Switcher III",0,Medium,5,418,70 957 | 1346,"Check If N and Its Double Exist",0,Easy,5,288,49 958 | 1343,"Number of Sub-arrays of Size K and Average Greater than or Equal to Threshold",0,Medium,5,197,37 959 | 1308,"Running Total for Different Genders",1,Medium,5,80,15 960 | 1283,"Find the Smallest Divisor Given a Threshold",0,Medium,5,672,122 961 | 1265,"Print Immutable Linked List in Reverse",1,Medium,5,247,49 962 | 1261,"Find Elements in a Contaminated Binary Tree",0,Medium,5,307,52 963 | 1618,"Maximum Font to Fit a Sentence in a Screen",1,Medium,5,30,6 964 | 1233,"Remove Sub-Folders from the Filesystem",0,Medium,5,323,57 965 | 1232,"Check If It Is a Straight Line",0,Easy,5,505,86 966 | 1220,"Count Vowels Permutation",0,Hard,5,281,52 967 | 1217,"Minimum Cost to Move Chips to The Same Position",0,Easy,5,171,30 968 | 1193,"Monthly Transactions I",1,Medium,5,55,11 969 | 1203,"Sort Items by Groups Respecting Dependencies",0,Hard,5,353,65 970 | 1405,"Longest Happy String",0,Medium,5,472,93 971 | 1550,"Three Consecutive Odds",0,Easy,5,179,32 972 | 1148,"Article Views I",1,Easy,5,46,9 973 | 1329,"Sort the Matrix Diagonally",0,Medium,5,809,148 974 | 1146,"Snapshot Array",0,Medium,5,714,135 975 | 1314,"Matrix Block Sum",0,Medium,5,758,136 976 | 1619,"Mean of Array After Removing Some Elements",0,Easy,5,113,22 977 | 1109,"Corporate Flight Bookings",0,Medium,5,626,118 978 | 1114,"Print in Order",0,Easy,5,664,116 979 | 1083,"Sales Analysis II",1,Easy,5,101,20 980 | 1045,"Customers Who Bought All Products",1,Medium,5,107,20 981 | 1180,"Count Substrings with Only One Distinct Letter",1,Easy,5,179,34 982 | 1086,"High Five",1,Easy,5,378,68 983 | 1012,"Numbers With Repeated Digits",0,Hard,5,257,51 984 | 1057,"Campus Bikes",1,Medium,5,635,113 985 | 991,"Broken Calculator",0,Medium,5,577,102 986 | 988,"Smallest String Starting From Leaf",0,Medium,5,560,109 987 | 959,"Regions Cut By Slashes",0,Medium,5,1157,225 988 | 950,"Reveal Cards In Increasing Order",0,Medium,5,1120,190 989 | 939,"Minimum Area Rectangle",0,Medium,5,875,165 990 | 929,"Unique Email Addresses",0,Easy,5,1080,207 991 | 925,"Long Pressed Name",0,Easy,5,854,159 992 | 916,"Word Subsets",0,Medium,5,476,87 993 | 884,"Uncommon Words from Two Sentences",0,Easy,5,550,100 994 | 880,"Decoded String at Index",0,Medium,5,850,152 995 | 710,"Random Pick with Blacklist",0,Hard,5,396,71 996 | 848,"Shifting Letters",0,Medium,5,346,67 997 | 805,"Split Array With Same Average",0,Hard,5,475,92 998 | 802,"Find Eventual Safe States",0,Medium,5,1041,200 999 | 780,"Reaching Points",0,Hard,5,661,121 1000 | 742,"Closest Leaf in a Binary Tree",1,Medium,5,562,111 1001 | 725,"Split Linked List in Parts",0,Medium,5,875,148 1002 | 724,"Find Pivot Index",0,Easy,5,1565,309 1003 | 721,"Accounts Merge",0,Medium,5,2082,389 1004 | 699,"Falling Squares",0,Hard,5,322,62 1005 | 688,"Knight Probability in Chessboard",0,Medium,5,1148,216 1006 | 679,"24 Game",0,Hard,5,861,169 1007 | 662,"Maximum Width of Binary Tree",0,Medium,5,2022,371 1008 | 621,"Task Scheduler",0,Medium,5,4348,834 1009 | 610,"Triangle Judgement",1,Easy,5,131,24 1010 | 607,"Sales Person",1,Easy,5,156,31 1011 | 580,"Count Student Number in Departments",1,Medium,5,118,21 1012 | 568,"Maximum Vacation Days",1,Hard,5,354,60 1013 | 562,"Longest Line of Consecutive One in Matrix",1,Medium,5,429,77 1014 | 552,"Student Attendance Record II",0,Hard,5,677,127 1015 | 536,"Construct Binary Tree from String",1,Medium,5,498,98 1016 | 526,"Beautiful Arrangement",0,Medium,5,1127,201 1017 | 508,"Most Frequent Subtree Sum",0,Medium,5,805,139 1018 | 499,"The Maze III",1,Hard,5,233,46 1019 | 474,"Ones and Zeroes",0,Medium,5,1346,262 1020 | 391,"Perfect Rectangle",0,Hard,5,445,83 1021 | 367,"Valid Perfect Square",0,Easy,5,1103,191 1022 | 355,"Design Twitter",0,Medium,5,1188,225 1023 | 343,"Integer Break",0,Medium,5,1418,248 1024 | 282,"Expression Add Operators",0,Hard,5,1543,262 1025 | 269,"Alien Dictionary",1,Hard,5,2301,455 1026 | 231,"Power of Two",0,Easy,5,1217,212 1027 | 202,"Happy Number",0,Easy,5,2858,483 1028 | 186,"Reverse Words in a String II",1,Medium,5,546,106 1029 | 178,"Rank Scores",0,Medium,5,866,161 1030 | 168,"Excel Sheet Column Title",0,Easy,5,1553,283 1031 | 164,"Maximum Gap",0,Hard,5,1067,204 1032 | 161,"One Edit Distance",1,Medium,5,795,134 1033 | 154,"Find Minimum in Rotated Sorted Array II",0,Hard,5,1396,266 1034 | 138,"Copy List with Random Pointer",0,Medium,5,4542,786 1035 | 137,"Single Number II",0,Medium,5,2345,396 1036 | 119,"Pascal s Triangle II",0,Easy,5,1228,217 1037 | 60,"Permutation Sequence",0,Hard,5,2035,354 1038 | 54,"Spiral Matrix",0,Medium,5,3427,636 1039 | 41,"First Missing Positive",0,Hard,5,5123,929 1040 | 1741,"Find Total Time Spent by Each Employee",1,Easy,4,8,2 1041 | 1698,"Number of Distinct Substrings in a String",1,Medium,4,32,8 1042 | 1688,"Count of Matches in Tournament",0,Easy,4,178,41 1043 | 1672,"Richest Customer Wealth",0,Easy,4,309,73 1044 | 1662,"Check If Two String Arrays are Equivalent",0,Easy,4,275,65 1045 | 1648,"Sell Diminishing-Valued Colored Balls",0,Medium,4,190,43 1046 | 1670,"Design Front Middle Back Queue",0,Medium,4,134,32 1047 | 1640,"Check Array Formation Through Concatenation",0,Easy,4,410,86 1048 | 1614,"Maximum Nesting Depth of the Parentheses",0,Easy,4,216,49 1049 | 1728,"Cat and Mouse II",0,Hard,4,68,17 1050 | 1577,"Number of Ways Where Square of Number Is Equal to Product of Two Numbers",0,Medium,4,128,31 1051 | 1563,"Stone Game V",0,Hard,4,180,44 1052 | 1562,"Find Latest Group of Size M",0,Medium,4,292,65 1053 | 1561,"Maximum Number of Coins You Can Get",0,Medium,4,200,46 1054 | 1551,"Minimum Operations to Make Array Equal",0,Medium,4,201,48 1055 | 1541,"Minimum Insertions to Balance a Parentheses String",0,Medium,4,249,61 1056 | 1488,"Avoid Flood in The City",0,Medium,4,498,109 1057 | 1491,"Average Salary Excluding the Minimum and Maximum Salary",0,Easy,4,226,46 1058 | 1464,"Maximum Product of Two Elements in an Array",0,Easy,4,350,75 1059 | 1451,"Rearrange Words in a Sentence",0,Medium,4,241,49 1060 | 1461,"Check If a String Contains All Binary Codes of Size K",0,Medium,4,219,46 1061 | 1460,"Make Two Arrays Equal by Reversing Sub-arrays",0,Easy,4,318,73 1062 | 1417,"Reformat The String",0,Easy,4,210,50 1063 | 1431,"Kids With the Greatest Number of Candies",0,Easy,4,639,153 1064 | 1408,"String Matching in an Array",0,Easy,4,265,55 1065 | 1402,"Reducing Dishes",0,Hard,4,373,81 1066 | 1344,"Angle Between Hands of a Clock",0,Medium,4,462,108 1067 | 1234,"Replace the Substring for Balanced String",0,Medium,4,449,98 1068 | 1222,"Queens That Can Attack the King",0,Medium,4,396,80 1069 | 1145,"Binary Tree Coloring Game",0,Medium,4,592,127 1070 | 1140,"Stone Game II",0,Medium,4,699,170 1071 | 1139,"Largest 1-Bordered Square",0,Medium,4,278,59 1072 | 1299,"Replace Elements with Greatest Element on Right Side",0,Easy,4,647,140 1073 | 1071,"Greatest Common Divisor of Strings",0,Easy,4,699,165 1074 | 978,"Longest Turbulent Subarray",0,Medium,4,532,114 1075 | 509,"Fibonacci Number",0,Easy,4,1048,217 1076 | 967,"Numbers With Same Consecutive Differences",0,Medium,4,581,118 1077 | 936,"Stamping The Sequence",0,Hard,4,243,59 1078 | 928,"Minimize Malware Spread II",0,Hard,4,253,56 1079 | 927,"Three Equal Parts",0,Hard,4,273,61 1080 | 923,"3Sum With Multiplicity",0,Medium,4,440,89 1081 | 914,"X of a Kind in a Deck of Cards",0,Easy,4,742,185 1082 | 913,"Cat and Mouse",0,Hard,4,413,85 1083 | 898,"Bitwise ORs of Subarrays",0,Medium,4,639,139 1084 | 888,"Fair Candy Swap",0,Easy,4,694,157 1085 | 865,"Smallest Subtree with all the Deepest Nodes",0,Medium,4,1175,281 1086 | 861,"Score After Flipping Matrix",0,Medium,4,615,137 1087 | 836,"Rectangle Overlap",0,Easy,4,922,230 1088 | 830,"Positions of Large Groups",0,Easy,4,447,97 1089 | 791,"Custom Sort String",0,Medium,4,941,208 1090 | 779,"K-th Symbol in Grammar",0,Medium,4,756,188 1091 | 764,"Largest Plus Sign",0,Medium,4,542,113 1092 | 746,"Min Cost Climbing Stairs",0,Easy,4,2808,607 1093 | 732,"My Calendar III",0,Hard,4,438,107 1094 | 716,"Max Stack",1,Easy,4,882,209 1095 | 685,"Redundant Connection II",0,Hard,4,1003,240 1096 | 676,"Implement Magic Dictionary",0,Medium,4,693,151 1097 | 665,"Non-decreasing Array",0,Medium,4,2469,593 1098 | 629,"K Inverse Pairs Array",0,Hard,4,374,77 1099 | 623,"Add One Row to Tree",0,Medium,4,557,138 1100 | 576,"Out of Boundary Paths",0,Medium,4,701,145 1101 | 556,"Next Greater Element III",0,Medium,4,1062,254 1102 | 417,"Pacific Atlantic Water Flow",0,Medium,4,1722,400 1103 | 415,"Add Strings",0,Easy,4,1525,361 1104 | 405,"Convert a Number to Hexadecimal",0,Easy,4,557,126 1105 | 359,"Logger Rate Limiter",1,Easy,4,678,138 1106 | 320,"Generalized Abbreviation",1,Medium,4,483,113 1107 | 313,"Super Ugly Number",0,Medium,4,784,158 1108 | 302,"Smallest Rectangle Enclosing Black Pixels",1,Hard,4,231,55 1109 | 298,"Binary Tree Longest Consecutive Sequence",1,Medium,4,606,148 1110 | 249,"Group Shifted Strings",1,Medium,4,681,139 1111 | 205,"Isomorphic Strings",0,Easy,4,1809,447 1112 | 189,"Rotate Array",0,Medium,4,4106,904 1113 | 185,"Department Top Three Salaries",0,Hard,4,683,147 1114 | 184,"Department Highest Salary",0,Medium,4,580,128 1115 | 180,"Consecutive Numbers",0,Medium,4,552,128 1116 | 112,"Path Sum",0,Easy,4,2780,576 1117 | 86,"Partition List",0,Medium,4,1817,364 1118 | 52,"N-Queens II",0,Hard,4,742,176 1119 | 36,"Valid Sudoku",0,Medium,4,2302,523 1120 | 2,"Add Two Numbers",0,Medium,4,10738,2606 1121 | 1729,"Find Followers Count",1,Easy,3,15,5 1122 | 1693,"Daily Leads and Partners",1,Easy,3,19,5 1123 | 1735,"Count Ways to Make Array With Product",0,Hard,3,71,18 1124 | 1645,"Hopper Company Queries II",1,Hard,3,11,3 1125 | 1659,"Maximize Grid Happiness",0,Hard,3,115,38 1126 | 1668,"Maximum Repeating Substring",0,Easy,3,104,31 1127 | 1654,"Minimum Jumps to Reach Home",0,Medium,3,188,52 1128 | 1597,"Build Binary Expression Tree From Infix Expression",1,Hard,3,47,12 1129 | 1622,"Fancy Sequence",0,Hard,3,144,40 1130 | 1581,"Customer Who Visited but Did Not Make Any Transactions",1,Easy,3,36,11 1131 | 1555,"Bank Account Summary",1,Medium,3,46,12 1132 | 1528,"Shuffle String",0,Easy,3,442,111 1133 | 1471,"The k Strongest Values in an Array",0,Medium,3,217,65 1134 | 1450,"Number of Students Doing Homework at a Given Time",0,Easy,3,313,81 1135 | 1433,"Check If a String Can Break Another String",0,Medium,3,250,72 1136 | 1413,"Minimum Value to Get Positive Step by Step Sum",0,Easy,3,307,88 1137 | 1401,"Circle and Rectangle Overlapping",0,Medium,3,148,45 1138 | 1327,"List the Products Ordered in a Period",1,Easy,3,41,13 1139 | 1322,"Ads Performance",1,Easy,3,96,26 1140 | 1324,"Print Words Vertically",0,Medium,3,209,61 1141 | 1307,"Verbal Arithmetic Puzzle",0,Hard,3,191,60 1142 | 1281,"Subtract the Product and Sum of Digits of an Integer",0,Easy,3,458,128 1143 | 1275,"Find Winner on a Tic Tac Toe Game",0,Easy,3,296,93 1144 | 1223,"Dice Roll Simulation",0,Hard,3,498,157 1145 | 1210,"Minimum Moves to Reach Target with Rotations",0,Hard,3,145,42 1146 | 1164,"Product Price at a Given Date",1,Medium,3,123,32 1147 | 1138,"Alphabet Board Path",0,Medium,3,362,95 1148 | 1273,"Delete Tree Nodes",1,Medium,3,150,43 1149 | 1103,"Distribute Candies to People",0,Easy,3,481,138 1150 | 1104,"Path In Zigzag Labelled Binary Tree",0,Medium,3,555,182 1151 | 1097,"Game Play Analysis V",1,Hard,3,68,19 1152 | 1258,"Synonymous Sentences",1,Medium,3,121,40 1153 | 1117,"Building H2O",0,Medium,3,226,66 1154 | 550,"Game Play Analysis IV",1,Medium,3,96,31 1155 | 1244,"Design A Leaderboard",1,Medium,3,204,55 1156 | 1084,"Sales Analysis III",1,Easy,3,103,30 1157 | 1082,"Sales Analysis I",1,Easy,3,91,30 1158 | 1076,"Project Employees II",1,Easy,3,74,20 1159 | 1050,"Actors and Directors Who Cooperated At Least Three Times",1,Easy,3,66,17 1160 | 1167,"Minimum Cost to Connect Sticks",1,Medium,3,467,129 1161 | 1044,"Longest Duplicate Substring",0,Hard,3,759,246 1162 | 1041,"Robot Bounded In Circle",0,Medium,3,779,235 1163 | 1121,"Divide Array Into Increasing Sequences",1,Hard,3,66,21 1164 | 1088,"Confusing Number II",1,Hard,3,238,68 1165 | 1018,"Binary Prefix Divisible By 5",0,Easy,3,337,103 1166 | 1067,"Digit Count in Range",1,Hard,3,46,12 1167 | 1064,"Fixed Point",1,Easy,3,182,47 1168 | 1001,"Grid Illumination",0,Hard,3,237,67 1169 | 975,"Odd Even Jump",0,Hard,3,861,261 1170 | 970,"Powerful Integers",0,Medium,3,3,1 1171 | 964,"Least Operators to Express Number",0,Hard,3,202,54 1172 | 900,"RLE Iterator",0,Medium,3,305,94 1173 | 519,"Random Flip Matrix",0,Medium,3,213,70 1174 | 878,"Nth Magical Number",0,Hard,3,247,65 1175 | 839,"Similar String Groups",0,Hard,3,474,146 1176 | 820,"Short Encoding of Words",0,Medium,3,284,73 1177 | 807,"Max Increase to Keep City Skyline",0,Medium,3,1059,313 1178 | 803,"Bricks Falling When Hit",0,Hard,3,517,147 1179 | 793,"Preimage Size of Factorial Zeroes Function",0,Hard,3,205,59 1180 | 783,"Minimum Distance Between BST Nodes",0,Easy,3,920,242 1181 | 726,"Number of Atoms",0,Hard,3,563,156 1182 | 687,"Longest Univalue Path",0,Medium,3,2148,544 1183 | 659,"Split Array into Consecutive Subsequences",0,Medium,3,1473,466 1184 | 628,"Maximum Product of Three Numbers",0,Easy,3,1453,419 1185 | 615,"Average Salary: Departments VS Company",1,Hard,3,115,37 1186 | 602,"Friend Requests II: Who Has the Most Friends",1,Medium,3,180,55 1187 | 599,"Minimum Index Sum of Two Lists",0,Easy,3,741,231 1188 | 561,"Array Partition I",0,Easy,3,120,32 1189 | 548,"Split Array with Equal Sum",1,Medium,3,270,88 1190 | 544,"Output Contest Matches",1,Medium,3,299,98 1191 | 539,"Minimum Time Difference",0,Medium,3,623,169 1192 | 501,"Find Mode in Binary Search Tree",0,Easy,3,1209,396 1193 | 436,"Find Right Interval",0,Medium,3,668,187 1194 | 396,"Rotate Function",0,Medium,3,474,149 1195 | 389,"Find the Difference",0,Easy,3,1173,310 1196 | 383,"Ransom Note",0,Easy,3,791,227 1197 | 382,"Linked List Random Node",0,Medium,3,872,231 1198 | 364,"Nested List Weight Sum II",1,Medium,3,671,204 1199 | 360,"Sort Transformed Array",1,Medium,3,387,112 1200 | 352,"Data Stream as Disjoint Intervals",0,Hard,3,449,116 1201 | 350,"Intersection of Two Arrays II",0,Easy,3,1978,496 1202 | 342,"Power of Four",0,Easy,3,791,248 1203 | 339,"Nested List Weight Sum",1,Medium,3,752,210 1204 | 321,"Create Maximum Number",0,Hard,3,882,263 1205 | 276,"Paint Fence",1,Easy,3,877,288 1206 | 250,"Count Univalue Subtrees",1,Medium,3,655,174 1207 | 247,"Strobogrammatic Number II",1,Medium,3,520,144 1208 | 245,"Shortest Word Distance III",1,Medium,3,238,76 1209 | 244,"Shortest Word Distance II",1,Medium,3,453,141 1210 | 204,"Count Primes",0,Easy,3,2699,719 1211 | 190,"Reverse Bits",0,Easy,3,1552,509 1212 | 187,"Repeated DNA Sequences",0,Medium,3,1108,327 1213 | 167,"Two Sum II - Input array is sorted",0,Easy,3,2317,685 1214 | 130,"Surrounded Regions",0,Medium,3,2480,740 1215 | 127,"Word Ladder",0,Hard,3,4620,1391 1216 | 81,"Search in Rotated Sorted Array II",0,Medium,3,1904,560 1217 | 1690,"Stone Game VII",0,Medium,2,171,70 1218 | 1661,"Average Time of Process per Machine",1,Easy,2,23,8 1219 | 1635,"Hopper Company Queries I",1,Hard,2,17,8 1220 | 1565,"Unique Orders and Customers Per Month",1,Easy,2,27,13 1221 | 1603,"Design Parking System",0,Easy,2,235,91 1222 | 1538,"Guess the Majority in a Hidden Array",1,Medium,2,40,16 1223 | 1517,"Find Users With Valid E-Mails",1,Easy,2,44,21 1224 | 1506,"Find Root of N-Ary Tree",1,Medium,2,207,71 1225 | 1479,"Sales by Day of the Week",1,Hard,2,48,18 1226 | 1486,"XOR Operation in an Array",0,Easy,2,378,180 1227 | 1492,"The kth Factor of n",0,Medium,2,283,116 1228 | 1384,"Total Sales Amount by Year",1,Hard,2,76,28 1229 | 1355,"Activity Participants",1,Medium,2,51,22 1230 | 1377,"Frog Position After T Seconds",0,Hard,2,171,61 1231 | 1260,"Shift 2D Grid",0,Easy,2,294,113 1232 | 1247,"Minimum Swaps to Make Strings Equal",0,Medium,2,434,163 1233 | 1361,"Validate Binary Tree Nodes",0,Medium,2,309,108 1234 | 1159,"Market Analysis II",1,Hard,2,49,20 1235 | 1158,"Market Analysis I",1,Medium,2,50,22 1236 | 1149,"Article Views II",1,Medium,2,45,16 1237 | 1128,"Number of Equivalent Domino Pairs",0,Easy,2,289,144 1238 | 1089,"Duplicate Zeros",0,Easy,2,796,274 1239 | 1073,"Adding Two Negabinary Numbers",0,Medium,2,145,66 1240 | 1197,"Minimum Knight Moves",1,Medium,2,526,217 1241 | 1153,"String Transforms Into Another String",1,Hard,2,515,184 1242 | 1036,"Escape a Large Maze",0,Hard,2,272,109 1243 | 1030,"Matrix Cells in Distance Order",0,Easy,2,278,138 1244 | 1065,"Index Pairs of a String",1,Easy,2,129,54 1245 | 985,"Sum of Even Numbers After Queries",0,Easy,2,471,181 1246 | 971,"Flip Binary Tree To Match Preorder Traversal",0,Medium,2,329,154 1247 | 961,"N-Repeated Element in Size 2N Array",0,Easy,2,580,256 1248 | 953,"Verifying an Alien Dictionary",0,Easy,2,1353,563 1249 | 947,"Most Stones Removed with Same Row or Column",0,Medium,2,1322,449 1250 | 942,"DI String Match",0,Easy,2,1051,401 1251 | 935,"Knight Dialer",0,Medium,2,749,284 1252 | 912,"Sort an Array",0,Medium,2,710,346 1253 | 910,"Smallest Range II",0,Medium,2,633,278 1254 | 897,"Increasing Order Search Tree",0,Easy,2,1202,518 1255 | 891,"Sum of Subsequence Widths",0,Hard,2,292,106 1256 | 470,"Implement Rand10() Using Rand7()",0,Medium,2,665,227 1257 | 869,"Reordered Power of 2",0,Medium,2,243,97 1258 | 855,"Exam Room",0,Medium,2,687,289 1259 | 853,"Car Fleet",0,Medium,2,550,230 1260 | 842,"Split Array into Fibonacci Sequence",0,Medium,2,582,195 1261 | 775,"Global and Local Inversions",0,Medium,2,516,195 1262 | 772,"Basic Calculator III",1,Hard,2,564,219 1263 | 761,"Special Binary String",0,Hard,2,382,128 1264 | 760,"Find Anagram Mappings",1,Easy,2,389,173 1265 | 728,"Self Dividing Numbers",0,Easy,2,803,307 1266 | 723,"Candy Crush",1,Medium,2,514,212 1267 | 656,"Coin Path",1,Hard,2,180,88 1268 | 645,"Set Mismatch",0,Easy,2,828,349 1269 | 635,"Design Log Storage System",1,Medium,2,304,136 1270 | 612,"Shortest Distance in a Plane",1,Medium,2,116,42 1271 | 605,"Can Place Flowers",0,Easy,2,1279,434 1272 | 604,"Design Compressed String Iterator",1,Easy,2,285,103 1273 | 571,"Find Median Given Frequency of Numbers",1,Hard,2,126,44 1274 | 524,"Longest Word in Dictionary through Deleting",0,Medium,2,719,261 1275 | 520,"Detect Capital",0,Easy,2,758,287 1276 | 517,"Super Washing Machines",0,Hard,2,389,160 1277 | 498,"Diagonal Traverse",0,Medium,2,1156,394 1278 | 485,"Max Consecutive Ones",0,Easy,2,1068,380 1279 | 418,"Sentence Screen Fitting",1,Medium,2,516,243 1280 | 353,"Design Snake Game",1,Medium,2,487,205 1281 | 344,"Reverse String",0,Easy,2,2038,750 1282 | 341,"Flatten Nested List Iterator",0,Medium,2,1993,768 1283 | 332,"Reconstruct Itinerary",0,Medium,2,2451,1182 1284 | 324,"Wiggle Sort II",0,Medium,2,1280,635 1285 | 311,"Sparse Matrix Multiplication",1,Medium,2,609,238 1286 | 278,"First Bad Version",0,Easy,2,1946,796 1287 | 271,"Encode and Decode Strings",1,Medium,2,526,178 1288 | 191,"Number of 1 Bits",0,Easy,2,1341,611 1289 | 150,"Evaluate Reverse Polish Notation",0,Medium,2,1424,507 1290 | 111,"Minimum Depth of Binary Tree",0,Easy,2,2124,792 1291 | 93,"Restore IP Addresses",0,Medium,2,1625,545 1292 | 80,"Remove Duplicates from Sorted Array II",0,Medium,2,1699,769 1293 | 71,"Simplify Path",0,Medium,2,201,75 1294 | 43,"Multiply Strings",0,Medium,2,2250,945 1295 | 31,"Next Permutation",0,Medium,2,4917,1696 1296 | 1736,"Latest Time by Replacing Hidden Digits",0,Easy,1,74,39 1297 | 1711,"Count Good Meals",0,Medium,1,164,123 1298 | 1683,"Invalid Tweets",1,Easy,1,27,24 1299 | 1705,"Maximum Number of Eaten Apples",0,Medium,1,214,112 1300 | 1719,"Number Of Ways To Reconstruct A Tree",0,Hard,1,49,39 1301 | 1714,"Sum Of Special Evenly-Spaced Elements In Array",1,Hard,1,8,7 1302 | 1689,"Partitioning Into Minimum Number Of Deci-Binary Numbers",0,Medium,1,133,117 1303 | 1680,"Concatenation of Consecutive Binary Numbers",0,Medium,1,223,165 1304 | 1681,"Minimum Incompatibility",0,Hard,1,99,77 1305 | 1651,"Hopper Company Queries III",1,Hard,1,5,5 1306 | 1638,"Count Substrings That Differ by One Character",0,Medium,1,141,86 1307 | 1616,"Split Two Strings to Make Palindrome",0,Medium,1,246,143 1308 | 1611,"Minimum One Bit Operations to Make Integers Zero",0,Hard,1,122,90 1309 | 1576,"Replace All ? s to Avoid Consecutive Repeating Characters",0,Easy,1,150,86 1310 | 1568,"Minimum Number of Days to Disconnect Island",0,Hard,1,170,95 1311 | 1548,"The Most Similar Path in a Graph",1,Hard,1,121,61 1312 | 1543,"Fix Product Name Format",1,Easy,1,26,17 1313 | 1540,"Can Convert String in K Moves",0,Medium,1,188,147 1314 | 1503,"Last Moment Before All Ants Fall Out of a Plank",0,Medium,1,208,142 1315 | 1467,"Probability of a Two Boxes Having The Same Number of Distinct Balls",0,Hard,1,143,114 1316 | 1465,"Maximum Area of a Piece of Cake After Horizontal and Vertical Cuts",0,Medium,1,179,90 1317 | 1452,"People Whose List of Favorite Companies Is Not a Subset of Another List",0,Medium,1,148,148 1318 | 1437,"Check If All 1 s Are at Least Length K Places Away",0,Easy,1,239,173 1319 | 1397,"Find All Good Strings",0,Hard,1,172,88 1320 | 1378,"Replace Employee ID With The Unique Identifier",1,Easy,1,32,19 1321 | 1391,"Check if There is a Valid Path in a Grid",0,Medium,1,289,161 1322 | 1386,"Cinema Seat Allocation",0,Medium,1,209,154 1323 | 1341,"Movie Rating",1,Medium,1,51,28 1324 | 1317,"Convert Integer to the Sum of Two No-Zero Integers",0,Easy,1,148,145 1325 | 1304,"Find N Unique Integers Sum up to Zero",0,Easy,1,483,283 1326 | 1298,"Maximum Candies You Can Get from Boxes",0,Hard,1,107,92 1327 | 1297,"Maximum Number of Occurrences of a Substring",0,Medium,1,291,175 1328 | 1282,"Group the People Given the Group Size They Belong To",0,Medium,1,496,352 1329 | 1238,"Circular Permutation in Binary Representation",0,Medium,1,130,120 1330 | 1221,"Split a String in Balanced Strings",0,Easy,1,901,554 1331 | 1194,"Tournament Winners",1,Hard,1,55,29 1332 | 1195,"Fizz Buzz Multithreaded",0,Medium,1,219,154 1333 | 1201,"Ugly Number III",0,Medium,1,381,269 1334 | 1179,"Reformat Department Table",0,Easy,1,232,167 1335 | 1174,"Immediate Food Delivery II",1,Medium,1,44,36 1336 | 1177,"Can Make Palindrome from Substring",0,Medium,1,319,183 1337 | 1362,"Closest Divisors",0,Medium,1,95,61 1338 | 1144,"Decrease Elements To Make Array Zigzag",0,Medium,1,155,116 1339 | 1141,"User Activity for the Past 30 Days I",1,Easy,1,41,31 1340 | 1131,"Maximum of Absolute Value Expression",0,Medium,1,276,241 1341 | 1127,"User Purchase Platform",1,Hard,1,78,59 1342 | 1116,"Print Zero Even Odd",0,Medium,1,222,150 1343 | 1107,"New Users Daily Count",1,Medium,1,57,48 1344 | 1096,"Brace Expansion II",0,Hard,1,251,155 1345 | 1243,"Array Transformation",1,Easy,1,76,39 1346 | 1068,"Product Sales Analysis I",1,Easy,1,54,47 1347 | 1119,"Remove Vowels from a String",1,Easy,1,155,88 1348 | 1023,"Camelcase Matching",0,Medium,1,310,163 1349 | 1017,"Convert to Base -2",0,Medium,1,212,181 1350 | 1056,"Confusing Number",1,Easy,1,103,76 1351 | 1058,"Minimize Rounding Error to Meet Target",1,Medium,1,87,81 1352 | 948,"Bag of Tokens",0,Medium,1,458,254 1353 | 924,"Minimize Malware Spread",0,Hard,1,379,291 1354 | 911,"Online Election",0,Medium,1,443,365 1355 | 899,"Orderly Queue",0,Hard,1,241,222 1356 | 882,"Reachable Nodes In Subdivided Graph",0,Hard,1,175,152 1357 | 867,"Transpose Matrix",0,Easy,1,576,328 1358 | 859,"Buddy Strings",0,Easy,1,871,603 1359 | 837,"New 21 Game",0,Medium,1,668,396 1360 | 708,"Insert into a Sorted Circular Linked List",1,Medium,1,469,388 1361 | 804,"Unique Morse Code Words",0,Easy,1,873,804 1362 | 790,"Domino and Tromino Tiling",0,Medium,1,493,270 1363 | 781,"Rabbits in Forest",0,Medium,1,355,349 1364 | 777,"Swap Adjacent in LR String",0,Medium,1,494,475 1365 | 703,"Kth Largest Element in a Stream",0,Easy,1,1084,646 1366 | 758,"Bold Words in String",1,Easy,1,169,86 1367 | 754,"Reach a Number",0,Medium,1,669,528 1368 | 745,"Prefix and Suffix Search",0,Hard,1,443,223 1369 | 736,"Parse Lisp Expression",0,Hard,1,311,234 1370 | 697,"Degree of an Array",0,Easy,1,1180,896 1371 | 690,"Employee Importance",0,Easy,1,881,816 1372 | 686,"Repeated String Match",0,Medium,1,969,827 1373 | 683,"K Empty Slots",1,Hard,1,637,600 1374 | 675,"Cut Off Trees for Golf Event",0,Hard,1,634,366 1375 | 657,"Robot Return to Origin",0,Easy,1,1193,688 1376 | 649,"Dota2 Senate",0,Medium,1,308,250 1377 | 638,"Shopping Offers",0,Medium,1,678,507 1378 | 634,"Find the Derangement of An Array",1,Medium,1,142,123 1379 | 633,"Sum of Square Numbers",0,Medium,1,635,367 1380 | 627,"Swap Salary",0,Easy,1,565,308 1381 | 626,"Exchange Seats",0,Medium,1,389,283 1382 | 625,"Minimum Factorization",1,Medium,1,101,90 1383 | 620,"Not Boring Movies",0,Easy,1,333,316 1384 | 619,"Biggest Single Number",1,Easy,1,84,77 1385 | 587,"Erect the Fence",0,Hard,1,273,198 1386 | 585,"Investments in 2016",1,Medium,1,122,103 1387 | 584,"Find Customer Referee",1,Easy,1,96,60 1388 | 577,"Employee Bonus",1,Easy,1,105,53 1389 | 569,"Median Employee Salary",1,Hard,1,124,77 1390 | 529,Minesweeper,0,Medium,1,799,618 1391 | 527,"Word Abbreviation",1,Hard,1,244,157 1392 | 504,"Base 7",0,Easy,1,278,158 1393 | 466,"Count The Repetitions",0,Hard,1,211,187 1394 | 441,"Arranging Coins",0,Easy,1,832,774 1395 | 422,"Valid Word Square",1,Easy,1,204,132 1396 | 419,"Battleships in a Board",0,Medium,1,887,569 1397 | 411,"Minimum Unique Word Abbreviation",1,Hard,1,141,130 1398 | 397,"Integer Replacement",0,Medium,1,472,352 1399 | 390,"Elimination Game",0,Medium,1,527,393 1400 | 284,"Peeking Iterator",0,Medium,1,617,439 1401 | 268,"Missing Number",0,Easy,1,2536,2440 1402 | 262,"Trips and Users",0,Hard,1,470,317 1403 | 251,"Flatten 2D Vector",1,Medium,1,419,242 1404 | 248,"Strobogrammatic Number III",1,Hard,1,209,152 1405 | 228,"Summary Ranges",0,Easy,1,911,665 1406 | 225,"Implement Stack using Queues",0,Easy,1,936,657 1407 | 217,"Contains Duplicate",0,Easy,1,1423,824 1408 | 197,"Rising Temperature",0,Easy,1,481,245 1409 | 192,"Word Frequency",0,Medium,1,252,172 1410 | 177,"Nth Highest Salary",0,Medium,1,557,436 1411 | 176,"Second Highest Salary",0,Easy,1,1015,511 1412 | 170,"Two Sum III - Data structure design",1,Easy,1,373,282 1413 | 147,"Insertion Sort List",0,Medium,1,947,667 1414 | 133,"Clone Graph",0,Medium,1,2692,1626 1415 | 122,"Best Time to Buy and Sell Stock II",0,Easy,1,3622,1911 1416 | 91,"Decode Ways",0,Medium,1,3931,3373 1417 | 61,"Rotate List",0,Medium,1,2059,1122 1418 | 14,"Longest Common Prefix",0,Easy,1,3648,2121 1419 | 9,"Palindrome Number",0,Easy,1,3008,1697 1420 | 1744,"Can You Eat Your Favorite Candy on Your Favorite Day?",0,Medium,0,50,161 1421 | 1737,"Change Minimum Characters to Satisfy One of Three Conditions",0,Medium,0,121,174 1422 | 1708,"Largest Subarray Length K",1,Easy,0,26,37 1423 | 1733,"Minimum Number of People to Teach",0,Medium,0,65,200 1424 | 1677,"Product s Worth Over Invoices",1,Easy,0,8,14 1425 | 1694,"Reformat Phone Number",0,Easy,0,79,85 1426 | 1667,"Fix Names in a Table",1,Easy,0,11,14 1427 | 1666,"Change the Root of a Binary Tree",1,Medium,0,23,47 1428 | 1656,"Design an Ordered Stream",0,Easy,0,68,467 1429 | 1646,"Get Maximum in Generated Array",0,Easy,0,143,215 1430 | 1623,"All Valid Triplets That Can Represent a Country",1,Easy,0,22,30 1431 | 1625,"Lexicographically Smallest String After Applying Operations",0,Medium,0,121,172 1432 | 1637,"Widest Vertical Area Between Two Points Containing No Points",0,Medium,0,58,175 1433 | 1610,"Maximum Number of Visible Points",0,Hard,0,121,188 1434 | 1620,"Coordinate With Maximum Network Quality",0,Medium,0,42,137 1435 | 1600,"Throne Inheritance",0,Medium,0,97,151 1436 | 1599,"Maximum Profit of Operating a Centennial Wheel",0,Medium,0,48,177 1437 | 1592,"Rearrange Spaces Between Words",0,Easy,0,110,113 1438 | 1604,"Alert Using Same Key-Card Three or More Times in a One Hour Period",0,Medium,0,78,137 1439 | 1583,"Count Unhappy Friends",0,Medium,0,93,351 1440 | 1560,"Most Visited Sector in a Circular Track",0,Easy,0,110,275 1441 | 1527,"Patients With a Condition",1,Easy,0,20,47 1442 | 1534,"Count Good Triplets",0,Easy,0,176,487 1443 | 1516,"Move Sub-Tree of N-Ary Tree",1,Hard,0,12,27 1444 | 1519,"Number of Nodes in the Sub-Tree With the Same Label",0,Medium,0,219,235 1445 | 1500,"Design a File Sharing System",1,Medium,0,22,55 1446 | 1515,"Best Position for a Service Centre",0,Hard,0,102,135 1447 | 1487,"Making File Names Unique",0,Medium,0,204,356 1448 | 1459,"Rectangles Area",1,Medium,0,28,41 1449 | 1476,"Subrectangle Queries",0,Medium,0,157,433 1450 | 1435,"Create a Session Bar Chart",1,Easy,0,52,100 1451 | 1453,"Maximum Number of Darts Inside of a Circular Dartboard",0,Hard,0,84,206 1452 | 1441,"Build an Array With Stack Operations",0,Easy,0,229,390 1453 | 1421,"NPV Queries",1,Medium,0,10,143 1454 | 1418,"Display Table of Food Orders in a Restaurant",0,Medium,0,103,220 1455 | 1432,"Max Difference You Can Get From Changing an Integer",0,Medium,0,96,125 1456 | 1410,"HTML Entity Parser",0,Medium,0,78,197 1457 | 1409,"Queries on a Permutation With Key",0,Medium,0,172,336 1458 | 1403,"Minimum Subsequence in Non-Increasing Order",0,Easy,0,182,251 1459 | 1389,"Create Target Array in the Given Order",0,Easy,0,415,569 1460 | 1399,"Count Largest Group",0,Easy,0,162,404 1461 | 1379,"Find a Corresponding Node of a Binary Tree in a Clone of That Tree",0,Medium,0,407,543 1462 | 1364,"Number of Trusted Contacts of a Customer",1,Medium,0,27,151 1463 | 1374,"Generate a String With Characters That Have Odd Counts",0,Easy,0,156,680 1464 | 1385,"Find the Distance Value Between Two Arrays",0,Easy,0,155,627 1465 | 1370,"Increasing Decreasing String",0,Easy,0,309,321 1466 | 1348,"Tweet Counts Per Frequency",0,Medium,0,90,554 1467 | 1336,"Number of Transactions per Visit",1,Hard,0,28,147 1468 | 1357,"Apply Discount Every n Orders",0,Medium,0,70,99 1469 | 1333,"Filter Restaurants by Vegan-Friendly, Price and Distance",0,Medium,0,116,117 1470 | 1332,"Remove Palindromic Subsequences",0,Easy,0,301,616 1471 | 1311,"Get Watched Videos by Your Friends",0,Medium,0,136,213 1472 | 1279,"Traffic Light Controlled Intersection",1,Easy,0,33,183 1473 | 1276,"Number of Burgers with No Waste of Ingredients",0,Medium,0,132,148 1474 | 1252,"Cells with Odd Values in a Matrix",0,Easy,0,411,679 1475 | 1241,"Number of Comments per Post",1,Easy,0,86,195 1476 | 1250,"Check If It Is a Good Array",0,Hard,0,127,200 1477 | 1227,"Airplane Seat Assignment Probability",0,Medium,0,235,414 1478 | 1240,"Tiling a Rectangle with the Fewest Squares",0,Hard,0,267,280 1479 | 1237,"Find Positive Integer Solution for a Given Equation",0,Medium,0,202,869 1480 | 1226,"The Dining Philosophers",0,Medium,0,115,117 1481 | 1211,"Queries Quality and Percentage",1,Easy,0,49,87 1482 | 1205,"Monthly Transactions II",1,Medium,0,67,181 1483 | 1185,"Day of the Week",0,Easy,0,150,1367 1484 | 1390,"Four Divisors",0,Medium,0,91,108 1485 | 1507,"Reformat Date",0,Easy,0,96,192 1486 | 1176,"Diet Plan Performance",1,Easy,0,75,208 1487 | 1175,"Prime Arrangements",0,Easy,0,155,265 1488 | 1360,"Number of Days Between Two Dates",0,Easy,0,86,486 1489 | 1170,"Compare Strings by Frequency of the Smallest Character",0,Medium,0,326,783 1490 | 1169,"Invalid Transactions",0,Medium,0,130,845 1491 | 1236,"Web Crawler",1,Medium,0,119,148 1492 | 1154,"Day of the Year",0,Easy,0,137,199 1493 | 1328,"Break a Palindrome",0,Medium,0,254,277 1494 | 1142,"User Activity for the Past 30 Days II",1,Easy,0,44,172 1495 | 1316,"Distinct Echo Substrings",0,Hard,0,100,134 1496 | 1313,"Decompress Run-Length Encoded List",0,Easy,0,397,729 1497 | 1132,"Reported Posts II",1,Medium,0,70,225 1498 | 1123,"Lowest Common Ancestor of Deepest Leaves",0,Medium,0,602,610 1499 | 1113,"Reported Posts",1,Easy,0,36,165 1500 | 1111,"Maximum Nesting Depth of Two Valid Parentheses Strings",0,Medium,0,169,798 1501 | 1108,"Defanging an IP Address",0,Easy,0,587,1068 1502 | 1271,Hexspeak,1,Easy,0,40,71 1503 | 1098,"Unpopular Books",1,Medium,0,81,200 1504 | 1256,"Encode Number",1,Medium,0,39,134 1505 | 1093,"Statistics from a Large Sample",0,Medium,0,78,307 1506 | 1090,"Largest Values From Labels",0,Medium,0,165,410 1507 | 1075,"Project Employees I",1,Easy,0,34,44 1508 | 1080,"Insufficient Nodes in Root to Leaf Paths",0,Medium,0,228,373 1509 | 1078,"Occurrences After Bigram",0,Easy,0,199,216 1510 | 1070,"Product Sales Analysis III",1,Medium,0,46,155 1511 | 1069,"Product Sales Analysis II",1,Easy,0,30,83 1512 | 1053,"Previous Permutation With One Swap",0,Medium,0,220,279 1513 | 1051,"Height Checker",0,Easy,0,369,1738 1514 | 1163,"Last Substring in Lexicographical Order",0,Hard,0,294,337 1515 | 1181,"Before and After Puzzle",1,Medium,0,59,127 1516 | 1042,"Flower Planting With No Adjacent",0,Medium,0,490,535 1517 | 1037,"Valid Boomerang",0,Easy,0,138,271 1518 | 1040,"Moving Stones Until Consecutive II",0,Medium,0,209,383 1519 | 1152,"Analyze User Website Visit Pattern",1,Medium,0,145,1310 1520 | 1034,"Coloring A Border",0,Medium,0,174,321 1521 | 1033,"Moving Stones Until Consecutive",0,Easy,0,94,496 1522 | 1118,"Number of Days in a Month",1,Easy,0,17,107 1523 | 1025,"Divisor Game",0,Easy,0,660,1826 1524 | 1085,"Sum of Digits in the Minimum Number",1,Easy,0,51,115 1525 | 1021,"Remove Outermost Parentheses",0,Easy,0,713,784 1526 | 1016,"Binary String With Substrings Representing 1 To N",0,Medium,0,148,375 1527 | 1015,"Smallest Integer Divisible by K",0,Medium,0,353,381 1528 | 1006,"Clumsy Factorial",0,Medium,0,112,161 1529 | 1003,"Check If Word Is Valid After Substitutions",0,Medium,0,296,368 1530 | 999,"Available Captures for Rook",0,Easy,0,286,477 1531 | 998,"Maximum Binary Tree II",0,Medium,0,225,477 1532 | 987,"Vertical Order Traversal of a Binary Tree",0,Hard,0,1280,2304 1533 | 984,"String Without AAA or BBB",0,Medium,0,265,271 1534 | 982,"Triples with Bitwise AND Equal To Zero",0,Hard,0,139,150 1535 | 972,"Equal Rational Numbers",0,Hard,0,51,158 1536 | 969,"Pancake Sorting",0,Medium,0,710,923 1537 | 966,"Vowel Spellchecker",0,Medium,0,189,346 1538 | 963,"Minimum Area Rectangle II",0,Medium,0,188,275 1539 | 957,"Prison Cells After N Days",0,Medium,0,906,1215 1540 | 949,"Largest Time for Given Digits",0,Medium,0,429,813 1541 | 944,"Delete Columns to Make Sorted",0,Easy,0,205,1797 1542 | 937,"Reorder Data in Log Files",0,Easy,0,972,2752 1543 | 933,"Number of Recent Calls",0,Easy,0,538,2101 1544 | 932,"Beautiful Array",0,Medium,0,435,540 1545 | 909,"Snakes and Ladders",0,Medium,0,519,1053 1546 | 908,"Smallest Range I",0,Easy,0,288,1267 1547 | 906,"Super Palindromes",0,Hard,0,92,172 1548 | 904,"Fruit Into Baskets",0,Medium,0,1086,1580 1549 | 893,"Groups of Special-Equivalent Strings",0,Easy,0,315,1225 1550 | 892,"Surface Area of 3D Shapes",0,Easy,0,290,437 1551 | 885,"Spiral Matrix III",0,Medium,0,291,365 1552 | 883,"Projection Area of 3D Shapes",0,Easy,0,288,932 1553 | 478,"Generate Random Point in a Circle",0,Medium,0,196,308 1554 | 497,"Random Point in Non-overlapping Rectangles",0,Medium,0,320,517 1555 | 528,"Random Pick with Weight",0,Medium,0,1100,2659 1556 | 877,"Stone Game",0,Medium,0,987,1241 1557 | 874,"Walking Robot Simulation",0,Easy,0,218,933 1558 | 868,"Binary Gap",0,Easy,0,276,544 1559 | 866,"Prime Palindrome",0,Medium,0,230,606 1560 | 858,"Mirror Reflection",0,Medium,0,322,640 1561 | 852,"Peak Index in a Mountain Array",0,Easy,0,943,1337 1562 | 851,"Loud and Rich",0,Medium,0,305,325 1563 | 843,"Guess the Word",0,Hard,0,720,740 1564 | 840,"Magic Squares In Grid",0,Medium,0,183,1317 1565 | 835,"Image Overlap",0,Medium,0,560,753 1566 | 833,"Find And Replace in String",0,Medium,0,426,503 1567 | 831,"Masking Personal Information",0,Medium,0,88,339 1568 | 829,"Consecutive Numbers Sum",0,Hard,0,545,684 1569 | 825,"Friends Of Appropriate Ages",0,Medium,0,366,773 1570 | 824,"Goat Latin",0,Easy,0,477,902 1571 | 822,"Card Flipping Game",0,Medium,0,83,503 1572 | 707,"Design Linked List",0,Medium,0,759,824 1573 | 819,"Most Common Word",0,Easy,0,875,1990 1574 | 817,"Linked List Components",0,Medium,0,462,1269 1575 | 816,"Ambiguous Coordinates",0,Medium,0,130,239 1576 | 812,"Largest Triangle Area",0,Easy,0,224,1083 1577 | 811,"Subdomain Visit Count",0,Easy,0,636,793 1578 | 810,"Chalkboard XOR Game",0,Hard,0,76,196 1579 | 809,"Expressive Words",0,Medium,0,425,1070 1580 | 808,"Soup Servings",0,Medium,0,182,591 1581 | 806,"Number of Lines To Write String",0,Easy,0,269,958 1582 | 800,"Similar RGB Color",1,Easy,0,65,408 1583 | 794,"Valid Tic-Tac-Toe State",0,Medium,0,247,714 1584 | 789,"Escape The Ghosts",0,Medium,0,214,362 1585 | 788,"Rotated Digits",0,Easy,0,398,1332 1586 | 782,"Transform to Chessboard",0,Hard,0,140,151 1587 | 770,"Basic Calculator IV",0,Hard,0,85,744 1588 | 558,"Logical OR of Two Binary Grids Represented as Quad-Trees",0,Medium,0,109,360 1589 | 427,"Construct Quad Tree",0,Medium,0,303,464 1590 | 762,"Prime Number of Set Bits in Binary Representation",0,Easy,0,296,379 1591 | 756,"Pyramid Transition Matrix",0,Medium,0,344,367 1592 | 755,"Pour Water",1,Medium,0,212,456 1593 | 753,"Cracking the Safe",0,Hard,0,521,765 1594 | 751,"IP to CIDR",1,Medium,0,101,814 1595 | 749,"Contain Virus",0,Hard,0,127,297 1596 | 748,"Shortest Completing Word",0,Easy,0,217,692 1597 | 747,"Largest Number At Least Twice of Others",0,Easy,0,397,642 1598 | 744,"Find Smallest Letter Greater Than Target",0,Easy,0,557,659 1599 | 709,"To Lower Case",0,Easy,0,618,1787 1600 | 734,"Sentence Similarity",1,Easy,0,207,342 1601 | 722,"Remove Comments",0,Medium,0,427,1120 1602 | 720,"Longest Word in Dictionary",0,Easy,0,800,950 1603 | 717,"1-bit and 2-bit Characters",0,Easy,0,526,1325 1604 | 711,"Number of Distinct Islands II",1,Hard,0,167,184 1605 | 682,"Baseball Game",0,Easy,0,656,1201 1606 | 681,"Next Closest Time",1,Medium,0,546,807 1607 | 672,"Bulb Switcher II",0,Medium,0,158,937 1608 | 671,"Second Minimum Node In a Binary Tree",0,Easy,0,744,1003 1609 | 667,"Beautiful Arrangement II",0,Medium,0,380,682 1610 | 666,"Path Sum IV",1,Medium,0,202,276 1611 | 661,"Image Smoother",0,Easy,0,286,1207 1612 | 660,"Remove 9",1,Hard,0,112,147 1613 | 655,"Print Binary Tree",0,Medium,0,405,938 1614 | 640,"Solve the Equation",0,Medium,0,279,575 1615 | 639,"Decode Ways II",0,Hard,0,549,582 1616 | 636,"Exclusive Time of Functions",0,Medium,0,956,1697 1617 | 631,"Design Excel Sum Formula",1,Hard,0,96,97 1618 | 618,"Students Report By Geography",1,Hard,0,75,97 1619 | 614,"Second Degree Follower",1,Medium,0,79,553 1620 | 609,"Find Duplicate File in System",0,Medium,0,530,681 1621 | 606,"Construct String from Binary Tree",0,Easy,0,897,1226 1622 | 601,"Human Traffic of Stadium",0,Hard,0,212,407 1623 | 598,"Range Addition II",0,Easy,0,348,600 1624 | 597,"Friend Requests I: Overall Acceptance Rate",1,Easy,0,171,390 1625 | 596,"Classes More Than 5 Students",0,Easy,0,272,718 1626 | 595,"Big Countries",0,Easy,0,557,736 1627 | 593,"Valid Square",0,Medium,0,428,580 1628 | 592,"Fraction Addition and Subtraction",0,Medium,0,215,338 1629 | 591,"Tag Validator",0,Hard,0,97,447 1630 | 579,"Find Cumulative Salary of an Employee",1,Hard,0,119,260 1631 | 578,"Get Highest Answer Rate Question",1,Medium,0,46,539 1632 | 575,"Distribute Candies",0,Easy,0,562,928 1633 | 574,"Winning Candidate",1,Medium,0,79,319 1634 | 564,"Find the Closest Palindrome",0,Hard,0,332,942 1635 | 563,"Binary Tree Tilt",0,Easy,0,812,1533 1636 | 555,"Split Concatenated Strings",1,Medium,0,59,208 1637 | 553,"Optimal Division",0,Medium,0,191,1191 1638 | 551,"Student Attendance Record I",0,Easy,0,364,912 1639 | 545,"Boundary of Binary Tree",1,Medium,0,678,1186 1640 | 541,"Reverse String II",0,Easy,0,545,1522 1641 | 537,"Complex Number Multiplication",0,Medium,0,280,788 1642 | 535,"Encode and Decode TinyURL",0,Medium,0,770,1625 1643 | 533,"Lonely Pixel II",1,Medium,0,55,597 1644 | 532,"K-diff Pairs in an Array",0,Medium,0,1028,1549 1645 | 523,"Continuous Subarray Sum",0,Medium,0,1801,2498 1646 | 522,"Longest Uncommon Subsequence II",0,Medium,0,201,643 1647 | 521,"Longest Uncommon Subsequence I",0,Easy,0,369,4601 1648 | 507,"Perfect Number",0,Easy,0,351,695 1649 | 506,"Relative Ranks",0,Easy,0,310,609 1650 | 500,"Keyboard Row",0,Easy,0,617,747 1651 | 496,"Next Greater Element I",0,Easy,0,2193,2684 1652 | 495,"Teemo Attacking",0,Medium,0,503,1011 1653 | 492,"Construct the Rectangle",0,Easy,0,247,284 1654 | 488,"Zuma Game",0,Hard,0,254,271 1655 | 483,"Smallest Good Base",0,Hard,0,180,355 1656 | 482,"License Key Formatting",0,Easy,0,558,858 1657 | 481,"Magical String",0,Medium,0,123,740 1658 | 479,"Largest Palindrome Product",0,Hard,0,99,1357 1659 | 475,Heaters,0,Medium,0,848,918 1660 | 469,"Convex Polygon",1,Medium,0,72,194 1661 | 468,"Validate IP Address",0,Medium,0,441,1931 1662 | 458,"Poor Pigs",0,Hard,0,537,1023 1663 | 457,"Circular Array Loop",0,Medium,0,467,1512 1664 | 453,"Minimum Moves to Equal Array Elements",0,Easy,0,728,1057 1665 | 447,"Number of Boomerangs",0,Medium,0,448,745 1666 | 444,"Sequence Reconstruction",1,Medium,0,351,1172 1667 | 443,"String Compression",0,Medium,0,1127,2997 1668 | 434,"Number of Segments in a String",0,Easy,0,280,833 1669 | 423,"Reconstruct Original Digits from English",0,Medium,0,195,645 1670 | 420,"Strong Password Checker",0,Hard,0,286,861 1671 | 414,"Third Maximum Number",0,Easy,0,888,1578 1672 | 412,"Fizz Buzz",0,Easy,0,1200,1462 1673 | 408,"Valid Word Abbreviation",1,Easy,0,179,749 1674 | 401,"Binary Watch",0,Easy,0,688,1214 1675 | 400,"Nth Digit",0,Medium,0,444,1182 1676 | 398,"Random Pick Index",0,Medium,0,609,788 1677 | 393,"UTF-8 Validation",0,Medium,0,265,1199 1678 | 388,"Longest Absolute File Path",0,Medium,0,694,1654 1679 | 385,"Mini Parser",0,Medium,0,276,943 1680 | 384,"Shuffle an Array",0,Medium,0,77,100 1681 | 379,"Design Phone Directory",1,Medium,0,204,313 1682 | 375,"Guess Number Higher or Lower II",0,Medium,0,970,1450 1683 | 374,"Guess Number Higher or Lower",0,Easy,0,541,1984 1684 | 372,"Super Pow",0,Medium,0,285,854 1685 | 371,"Sum of Two Integers",0,Medium,0,1548,2593 1686 | 365,"Water and Jug Problem",0,Medium,0,383,846 1687 | 357,"Count Numbers with Unique Digits",0,Medium,0,523,969 1688 | 356,"Line Reflection",1,Medium,0,158,373 1689 | 351,"Android Unlock Patterns",1,Medium,0,451,774 1690 | 349,"Intersection of Two Arrays",0,Easy,0,1225,1454 1691 | 345,"Reverse Vowels of a String",0,Easy,0,911,1404 1692 | 335,"Self Crossing",0,Hard,0,169,394 1693 | 326,"Power of Three",0,Easy,0,663,1690 1694 | 319,"Bulb Switcher",0,Medium,0,585,1178 1695 | 306,"Additive Number",0,Medium,0,481,484 1696 | 303,"Range Sum Query - Immutable",0,Easy,0,1165,1282 1697 | 299,"Bulls and Cows",0,Medium,0,896,1016 1698 | 293,"Flip Game",1,Easy,0,125,314 1699 | 292,"Nim Game",0,Easy,0,733,1802 1700 | 288,"Unique Word Abbreviation",1,Medium,0,125,1458 1701 | 275,"H-Index II",0,Medium,0,518,797 1702 | 274,H-Index,0,Medium,0,867,1427 1703 | 273,"Integer to English Words",0,Hard,0,1346,3407 1704 | 263,"Ugly Number",0,Easy,0,670,742 1705 | 258,"Add Digits",0,Easy,0,1064,1251 1706 | 246,"Strobogrammatic Number",1,Easy,0,261,528 1707 | 237,"Delete Node in a Linked List",0,Easy,0,2294,8558 1708 | 233,"Number of Digit One",0,Hard,0,362,706 1709 | 223,"Rectangle Area",0,Medium,0,497,840 1710 | 220,"Contains Duplicate III",0,Medium,0,1487,1586 1711 | 219,"Contains Duplicate II",0,Easy,0,1189,1320 1712 | 196,"Delete Duplicate Emails",0,Easy,0,521,760 1713 | 195,"Tenth Line",0,Easy,0,184,238 1714 | 194,"Transpose File",0,Medium,0,78,205 1715 | 193,"Valid Phone Numbers",0,Easy,0,179,480 1716 | 172,"Factorial Trailing Zeroes",0,Easy,0,1172,1339 1717 | 166,"Fraction to Recurring Decimal",0,Medium,0,1057,2164 1718 | 165,"Compare Version Numbers",0,Medium,0,760,1657 1719 | 163,"Missing Ranges",1,Easy,0,480,2071 1720 | 162,"Find Peak Element",0,Medium,0,2475,2495 1721 | 158,"Read N Characters Given Read4 II - Call multiple times",1,Hard,0,593,1284 1722 | 157,"Read N Characters Given Read4",1,Easy,0,360,2338 1723 | 156,"Binary Tree Upside Down",1,Medium,0,330,1022 1724 | 151,"Reverse Words in a String",0,Medium,0,1482,3139 1725 | 149,"Max Points on a Line",0,Hard,0,1086,2294 1726 | 125,"Valid Palindrome",0,Easy,0,1734,3538 1727 | 89,"Gray Code",0,Medium,0,770,1722 1728 | 88,"Merge Sorted Array",0,Easy,0,3326,4962 1729 | 87,"Scramble String",0,Hard,0,728,780 1730 | 69,Sqrt(x),0,Easy,0,1775,2217 1731 | 68,"Text Justification",0,Hard,0,895,1847 1732 | 66,"Plus One",0,Easy,0,2080,2976 1733 | 65,"Valid Number",0,Hard,0,856,5462 1734 | 58,"Length of Last Word",0,Easy,0,948,2972 1735 | 50,"Pow(x, n)",0,Medium,0,2085,3583 1736 | 38,"Count and Say",0,Easy,0,258,970 1737 | 30,"Substring with Concatenation of All Words",0,Hard,0,1147,1402 1738 | 29,"Divide Two Integers",0,Medium,0,1545,6250 1739 | 28,"Implement strStr()",0,Easy,0,2150,2239 1740 | 27,"Remove Element",0,Easy,0,1907,3299 1741 | 26,"Remove Duplicates from Sorted Array",0,Easy,0,3482,6411 1742 | 12,"Integer to Roman",0,Medium,0,1479,2937 1743 | 8,"String to Integer (atoi)",0,Medium,0,32,75 1744 | 7,"Reverse Integer",0,Easy,0,4300,6636 1745 | 6,"ZigZag Conversion",0,Medium,0,2164,5465 1746 | 1746,"Maximum Subarray Sum After One Operation",1,Medium,,26,0 1747 | 1427,"Perform String Shifts",1,Easy,,70,0 1748 | --------------------------------------------------------------------------------