Solutions-To-Problems/LeetCode/Java Solutions at main · aurimas13/Solutions-To-Problems

1 Is Graph Bipartite? Is Graph Bipartite? O(n) O(n) ✔️ ✔️ ✔️ ❌ ✔️ ✔️ ✔️ ✔️ ✔️ ✔️ ❌ ❌ ✔️ ❌ ✔️ ✔️ ✔️ ✔️ ✔️ 2 Integer to English Words Integer to English Words O(1) O(1) ❌ ✔️ ✔️ ✔️ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ 3 As Far from Land as Possible As Far from Land as Possible O(n^2) O(n^2) ✔️ ❌ ✔️ ❌ ✔️ ✔️ ✔️ ✔️ ✔️ ✔️ ❌ ❌ ✔️ ❌ ❌ ✔️ ✔️ ✔️ ✔️ 4 Evaluate Division Evaluate Division O(n) O(n) ✔️ ✔️ ❌ ✔️ ✔️ ✔️ ❌ ✔️ :hx: ✔️ ❌ ❌ ❌ ❌ ❌ ✔️ ❌ ✔️ ✔️ 5 Shortest Bridge Shortest Bridge O(n log) O(n^2) ✔️ ✔️ ✔️ ✔️ ✔️ ✔️ ❌ ✔️ ✔️ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ ✔️ 6 Top K Frequent Elements Top K Frequent Elements O(n log n) O(n) ✔️ ✔️ ✔️ ✔️ ✔️ ✔️ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ ❌ ✔️ ❌ ✔️ 7 Kth Largest Element in a Stream" Kth Largest Element in a Stream" O (log n) O(n) ✔️ ✔️ ❌ ✔️ ✔️ ✔️ ❌ ❌ ❌ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ✔️ ❌ ✔️ 8 Maximum Subsequence Score Maximum Subsequence Score O(n log n) O(n) ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 9 New 21 Game New 21 Game O(n) O(n) ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 10 Stone Game II Stone Game II O(n^2) O(n) ❌ ❌ ❌ ❌ ✔️ ❌ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ 11 Stone Game III Stone Game III O(n) O(n) ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 12 Minimum Cost to Cut a Stickre Minimum Cost to Cut a Stick O(n) O(n) ✔️ ✔️ ✔️ ✔️ ✔️ ✔️ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 13 Design Parking System Design Parking System O(1) O(1) ✔️ ✔️ ❌ ❌ ✔️ ❌ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ ✔️ 14 Design Underground System Design Underground System O(1) O(n) ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ 15 Detonate the Maximum Bombs Detonate the Maximum Bombs O(n^2) O(n^2) ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ 16 Time Needed to Inform All Employees Time Needed to Inform All Employees O(n) O(n) ✔️ ✔️ ❌ ❌ ❌ ✔️ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 17 Number of Provinces Number of Provinces O(n^2) O(n) ✔️ ✔️ ✔️ ❌ ❌ ❌ ❌ ✔️ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ ✔️ ✔️ 18 Check If It Is a Straight Line Check If It Is a Straight Line O(n) O(1) ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ 19 Minimum Flips to Make a OR b Equal to c Minimum Flips to Make a OR b Equal to c O(1) O(1) ❌ ❌ ❌ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ :: 20 Count Negative Numbers in a Sorted Matrix Count Negative Numbers in a Sorted Matrix O(n) O(n) ❌ ✔️ ❌ ✔️ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 21 Find Smallest Letter Greater Than Target Find Smallest Letter Greater Than Target O(log n) O(1) ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ✔️ ❌ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 22 Maximum Value at a Given Index in a Bounded Array Maximum Value at a Given Index in a Bounded Array O(log n) O(1) ❌ ✔️ ✔️ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ 23 Snapshot Array Snapshot Array O(1) O(n) ✔️ ✔️ ✔️ ❌ ✔️ ❌ ❌ :heavy_checkx_mark: ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ ✔️ 24 Shortest Path in Binary Matrix Shortest Path in Binary Matrix O(n^2) O(n^2) ✔️ ✔️ ✔️ ✔️ ✔️ ✔️ ❌ ✔️ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ ✔️ 25 Can Make Arithmetic Progression From Sequence Can Make Arithmetic Progression From Sequence O(n log n) O(n) ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ 26 Design HashSet Design HashSet O(1) O(n) ❌ ✔️ ✔️ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ 27 Summary Ranges Summary Ranges O(n) O(n) ✔️ ❌ ❌ ✔️ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ 28 Equal Row and Column Pairs Equal Row and Column Pairs O(n^2) O(n^2) ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 29 Minimum Absolute Difference in BST Minimum Absolute Difference in BST O(n) O(n) ✔️ ✔️ ❌ ✔️ ❌ ❌ ❌ ❌ :: ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 30 Maximum Level Sum of a Binary Tree Maximum Level Sum of a Binary Tree O(n) O(n) ✔️ ✔️ ❌ ✔️ ✔️ ❌ ❌ ❌ :: ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ 31 Number of Ways to Reorder Array to Get Same BST Number of Ways to Reorder Array to Get Same BST O(n^2) O(n^2) ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ :: ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 32 Make Array Strictly Increasing Make Array Strictly Increasing O(n^2) O(n^2) ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ :: ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 33 Number of Increasing Paths in a Grid Number of Increasing Paths in a Grid O(n) O(n) ❌ ❌ ❌ ❌ ❌ ✔️ ❌ ❌ :: ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 34 Find the Highest Altitude Find the Highest Altitude O(n) O(n) ❌ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ :: ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 35 Minimum Cost to Make Array Equal Minimum Cost to Make Array Equal O(nlogn) O(nlogn) ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ :: ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ 36 Longest Arithmetic Subsequence Longest Arithmetic Subsequence O(n^2) O(n^2) ✔️ ❌ ✔️ ✔️ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ ❌ ✔️ ✔️ 37 Count All Possible Routes Count All Possible Routes O(n^2) O(n^2) ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 38 Total Cost to Hire K Workers Total Cost to Hire K Workers O(n) O(n) ✔️ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ :: ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 39 Path with Maximum Probability Path with Maximum Probability O(n) O(n) ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ :: ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 40 Shortest Path to Get All Keys Shortest Path to Get All Keys O(n^2) O(n^2) ✔️ ❌ ❌ ❌ ❌ ❌ ✔️ ❌ :: ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 41 Fair Distribution of Cookies Fair Distribution of Cookies O(n) O(n) ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ :: ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 42 Maximum Number of Achievable Transfer Requests Maximum Number of Achievable Transfer Requests O(2^n) O(n) ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ :: ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 43 Buddy Strings Buddy Strings O(n) O(n) ✔️ ❌ ❌ ✔️ ❌ ❌ ❌ ❌ :: ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 44 Single Number II Single Number II O(n) O(1) ✔️ ✔️ ✔️ ❌ ❌ ✔️ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 45 Longest Subarray of 1's After Deleting One Element Longest Subarray of 1's After Deleting One Element O(n) O(1) ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 46 Minimum Size Subarray Sum Minimum Size Subarray Sum O(n) O(1) ❌ ✔️ ✔️ ✔️ ❌ ✔️ ❌ ✔️ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 47 Put Marbles in Bags Put Marbles in Bags O(n) O(n) ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 48 Substring With Largest Variance Substring With Largest Variance O(n!) O(n) ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 49 Minimum Depth of Binary Tree Minimum Depth of Binary Tree O(n) O(n) ❌ ✔️ ❌ ✔️ ❌ ❌ ❌ ✔️ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 50 All Nodes Distance K in Binary Tree All Nodes Distance K in Binary Tree O(n) O(n) ✔️ ✔️ ✔️ ✔️ ✔️ ✔️ ❌ ✔️ ❌ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ ✔️ 51 Find Eventual Safe States Find Eventual Safe States O(n) O(n) ✔️ ✔️ ❌ ❌ ❌ ❌ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ 52 Course Schedule Course Schedule O(n) O(n) ✔️ ✔️ ✔️ ✔️ ✔️ ✔️ ❌ ✔️ ❌ ❌ ❌ ✔️ ❌ ❌ ✔️ ✔️ ❌ ✔️ ✔️ 53 Maximum Number of Achievable Transfer Requests Maximum Number of Achievable Transfer Requests O(n^2) O(n) ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 54 Maximum Number of Events That Can Be Attended II Maximum Number of Events That Can Be Attended II O(n^2) O(n) ✔️ ✔️ ❌ ❌ ❌ ❌ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ ❌ ✔️ 55 Smallest Sufficient Team Smallest Sufficient Team O(n^2) O(n^2) ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 56 Add Two Numbers II Add Two Numbers II O(n) O(n) ❌ ✔️ ❌ ✔️ ✔️ ✔️ ❌ ✔️ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ 57 Non-overlapping Intervals Non-overlapping intervals O(n) O(1) ✔️ ✔️ ✔️ ✔️ ✔️ ✔️ ✔️ ✔️ ✔️ ✔️ ✔️ ✔️ ✔️ ✔️ ✔️ ✔️ ✔️ ✔️ ❌ 58 Asteroid Collision Asteroid Collision O(n) O(n) ✔️ ✔️ ❌ ✔️ ✔️ ❌ ❌ ✔️ ✔️ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ ✔️ ✔️ 59 Number of Longest Increasing Subsequence Number of Longest Increasing Subsequence O(n^2) O(n) ✔️ ✔️ ✔️ ✔️ ✔️ ✔️ ✔️ ✔️ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ ✔️ ✔️ 60 Knight Probability in Chessboard Knight Probability in Chessboard O(n^2) O(n^2) ❌ ✔️ ❌ ❌ ✔️ ❌ ❌ ❌ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ 61 All Possible Full Binary Trees All Possible Full Binary Trees" O(2^n) O(2^n) ✔️ ✔️ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ 62 Pow(x, n) Pow(x, n) O(log n) O(log n) ✔️ ✔️ ✔️ ✔️ ✔️ ❌ ❌ ✔️ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ ✔️ ✔️ 63 Peak Index in a Mountain Array Peak Index in a Mountain Array O(log n) O(1) ✔️ ✔️ ✔️ ✔️ ❌ ✔️ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ ✔️ 64 Minimum Speed to Arrive on Time Minimum Speed to Arrive on Time O(nlogn) O(1) ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ 65 Maximum Running Time of N Computers Maximum Running Time of N Computers O(n log n) O(1) ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ 66 Soup Servings Soup Servings O(n^2) O(n^2) ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 67 Strange Printer Strange Printer O(n^2) O(n^2) ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ 68 Minimum ASCII Delete Sum for Two Strings Minimum ASCII Delete Sum for Two Strings O(n^2) O(n^2) ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ 69 Cominations Cominations O(n) O(n) ✔️ ✔️ ✔️ ✔️ ✔️ ✔️ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ 70 Permutations Permutations O(n!) O(n!) ✔️ ✔️ ✔️ ✔️ ❌ ❌ ❌ ✔️ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 71 Letter Combinations of a Phone Number Letter Combinations of a Phone Number O(2^n) O(2^n) ✔️ ✔️ ✔️ ✔️ ❌ ❌ ❌ ✔️ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 72 Word Break Word Break O(n) O(n) ✔️ ✔️ ✔️ ✔️ ❌ ❌ ❌ ✔️ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ ✔️ ✔️ 73 Unique Binary Search Trees II Unique Binary Search Trees II O(2^n) O(2^n) ✔️ ✔️ ✔️ ✔️ ✔️ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 74 Number of Music Playlists Number of Music Playlists O(n) O(n) ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 75 Search a 2D Matrix Search a 2D Matrix O(n log n) O(1) ✔️ ✔️ ✔️ ✔️ ❌ ❌ ❌ ✔️ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 76 Search in Rotated Sorted Array Search in Rotated Sorted Array O(log n) O(1) ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 77 Minimize the Maximum Difference of Pairs Minimize the Maximum Difference of Pairs O(n log n) O(n) ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 78 Search in Rotated Sorted Array II Search in Rotated Sorted Array II O(n) O(n) ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 79 Coin Change II Coin Change II O(n) O(n) ✔️ ✔️ ✔️ ✔️ ❌ ❌ ❌ ✔️ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 80 Unique Paths II Unique Paths II O(n) O(n) ✔️ ✔️ ❌ ✔️ ✔️ ❌ ❌ ✔️ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 81 Check if There is a Valid Partition For The Array Check if There is a Valid Partition For The Arra O(n) O(1) ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 82 Kth Largest Element in an Array Kth Largest Element in an Array O(n log n) O(1) ✔️ ✔️ ✔️ ✔️ ✔️ ✔️ ❌ ✔️ ❌ ✔️ ✔️ ❌ ❌ ✔️ ❌ ❌ ✔️ ❌ ✔️ 83 Sliding Window Maximum Sliding Window Maximum O(n) O(1) ✔️ ✔️ ✔️ ✔️ ❌ ✔️ ❌ ✔️ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ ✔️ 84 01 Matrix 01 Matrix O(n^2) O(n^2) ✔️ ✔️ ✔️ ✔️ ✔️ ✔️ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ ❌ ✔️ 85 Maximal Network Rank Maximal Network Rank O(n^2) O(n) ❌ ❌ ❌ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ ❌ ❌ ❌ ❌ 86 Find Critical and Pseudo-Critical Edges in Minimum Spanning Tree Find Critical and Pseudo-Critical Edges in Minimum Spanning Tree O(n log n) O(n) ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ ❌ ❌ ❌ ❌ 87 Sort Items by Groups Respecting Dependencies Sort Items by Groups Respecting Dependencies O(n) O(n) ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ ❌ ❌ ❌ ❌ 88 Repeated Substring Pattern Repeated Substring Pattern O(n) O(n) ✔️ ✔️ ✔️ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ 89 Excel Sheet Column Title Excel Sheet Column Title O(log n) O(log n) ✔️ ✔️ ✔️ ✔️ ✔️ ❌ ❌ ❌ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ 90 Reorganize String Reorganize String O(n) O(n log n) ✔️ ✔️ ✔️ ✔️ ✔️ ❌ ❌ ❌ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ ✔️ 91 Text Justification Text Justification O(n^2) O(n) ✔️ ✔️ ✔️ ✔️ ✔️ ❌ ❌ ❌ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ✔️ ✔️ ✔️ ✔️ 92 Interleaving String Interleaving String O(n^2) O(n^2) ✔️ ✔️ ✔️ ❌ ✔️ ✔️ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ ✔️ 93 Maximum Length of Pair Chain Maximum Length of Pair Chain O(n log n) O(n) ✔️ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ 94 Frog Jump Frog Jumo O(n^2) O(n^2 ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 95 Implement Stack using Queues Implement Stack using Queues O(n) O(1) ✔️ ✔️ ❌ ❌ ✔️ ❌ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ 96 Minimum Penalty for a Shop Minimum Penalty for a Shop O(n) O(n) ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ 97 Minimum Replacements to Sort the Array Minimum Replacements to Sort the Array O(1) O(n) ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 98 Minimum Number of Taps to Open to Water a Garden Minimum Number of Taps to Open to Water a Garden O(n) O(n) ❌ ✔️ ❌ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ ❌ ❌ 99 Counting Bits Counting Bits O(n) O(1) ✔️ ✔️ ✔️ ❌ ✔️ ✔️ ❌ ✔️ ❌ ✔️ ❌ ❌ ❌ ✔️ ❌ ❌ 100 Extra Characters in a String Extra Characters in a String O(n^2) O(n) ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 101 Unique Paths Unique Paths O(n^2) O(n^2) ✔️ ✔️ ✔️ ✔️ ✔️ ✔️ ❌ ✔️ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ✔️ 102 Copy List with Random Pointer Copy List with Random Pointer O(n) O(1) ✔️ ✔️ ✔️ ✔️ ✔️ ✔️ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ ✔️ 103 Split Linked List in Parts Split Linked List in Parts O(n) O(1) ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ ❌ 104 Reverse Linked List II Reverse Linked List II O(n) O(1) ✔️ ✔️ ✔️ ✔️ ✔️ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ 105 Pascal's Triangle Pascal's Triangle O(n^2) O(n^2) ✔️ ✔️ ✔️ ✔️ ✔️ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ 106 Combination Sum IV Combination Sum IV O(n) O(n) ✔️ ✔️ ✔️ ✔️ ✔️ ✔️ ✔️ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ ✔️ 107 Count All Valid Pickup and Delivery Options Count All Valid Pickup and Delivery Options O(n) O(1) ✔️ ✔️ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ 108 Group the People Given the Group Size They Belong To Group the People Given the Group Size They Belong To O(n) O(n) ❌ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ 109 Minimum Deletions to Make Character Frequencies Unique Minimum Deletions to Make Character Frequencies Unique O(n) O(n) ✔️ ❌ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ 110 Candy Candy O(n) O(n) ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 111 Reconstruct Itinerary Reconstruct Itinerary O (n log n) O(n) ✔️ ✔️ ✔️ ✔️ ❌ ❌ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ ❌ ✔️ 112 Min Cost to Connect All Points Min Cost to Connect All Points O(n^2) O(n) ❌ ✔️ ❌ ❌ ✔️ ❌ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ 113 Path With Minimum Effor Path With Minimum Effor O(n^2 log n) O(n^2) ✔️ ✔️ ❌ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ 114 Shortest Path Visiting All Nodes Shortest Path Visiting All Nodes O(n 2^n) O(n 2^n) ✔️ ✔️ ❌ ✔️ ✔️ ❌ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ ❌ 115 Find the Duplicate Number Find the Duplicate Number O(n) O(1) ✔️ ✔️ ✔️ ✔️ ✔️ ❌ ✔️ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ ✔️ 116 Minimum Operations to Reduce X to Zero Minimum Operations to Reduce X to Zero O(n) O(n) ✔️ ✔️ ✔️ ❌ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 117 Monotonic Array Monotonic Array O(n) O(1) ✔️ ✔️ ❌ ✔️ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ ❌ ❌ ❌ 118 132 Pattern 132 Pattern O(n) O(n) ✔️ ✔️ ✔️ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 119 Reverse Words in a String III Reverse Words in a String III O(n) O(n) ✔️ ✔️ ✔️ ✔️ ✔️ ❌ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 120 Decoded String at Index Decoded String at Index O(n) O(1) ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 121 Remove Colored Pieces if Both Neighbors are the Same Color Remove Colored Pieces if Both Neighbors are the Same Color O(n) O(1) ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ 122 Number of Good Pairs Number of Good Pairs O(n) O(n) ✔️ ✔️ ✔️ ✔️ ✔️ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ 123 Design HashMap Design HashMap O(1) O(n) ✔️ ✔️ ✔️ ✔️ ✔️ ✔️ ✔️ ✔️ ❌ ✔️ ✔️ ❌ ❌ ❌ ❌ ❌ ✔️ ❌ ✔️ 124 Majority Element II Majority Element II O(n) O(1) ✔️ ✔️ ✔️ ✔️ ✔️ ✔️ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ 125 Integer Break Integer Break O(n^2) O(n) ✔️ ✔️ ✔️ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ 126 Build Array Where You Can Find The Maximum Exactly K Comparisons Build Array Where You Can Find The Maximum Exactly K Comparisons O(n) O(n) ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ 127 Max Dot Product of Two Subsequences Max Dot Product of Two Subsequences O(n^2) O(n^2) ❌ ❌ ❌ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 128 Find First and Last Position of Element in Sorted Array Find First and Last Position of Element in Sorted Array O( logn ) O(1) ✔️ ✔️ ✔️ ✔️ ✔️ ✔️ ❌ ✔️ ❌ ❌ ✔️ ❌ ❌ ❌ ❌ ✔️ ❌ ✔️ ❌ 129 Minimum Number of Operations to Make Array Continuous Minimum Number of Operations to Make Array Continuous O(n log n) O(n) ❌ ✔️ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ 130 Number of Flowers in Full Bloom Number of Flowers in Full Bloom O(n log n) O(n) ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 131 Min Cost Climbing Stairs Min Cost Climbing Stairs O(n) O(n) ✔️ ✔️ ✔️ ❌ ✔️ ✔️ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 132 Number of Ways to Stay in the Same Place After Some Steps Number of Ways to Stay in the Same Place After Some Steps O(n^2) O(n^2) ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 133 Pascal's Triangle II Pascal's Triangle IIe O(n^2) O(n) ❌ ✔️ ❌ ❌ ✔️ ❌ ❌ ❌ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 134 Validate Binary Tree Nodes Validate Binary Tree Nodes O(n) O(n) ❌ ❌ ❌ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 135 Parallel Courses III Parallel Courses III O(n) O(n) ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ 136 Backspace String Compare Backspace String Compare O(n) O(n) ✔️ ✔️ ✔️ ✔️ ❌ ❌ ❌ ✔️ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ✔️ ❌ ❌ ✔️ 137 Flatten Nested List Iterator Flatten Nested List Iterator O(n) O(n) ✔️ ✔️ ✔️ ✔️ ✔️ ✔️ ✔️ ✔️ ❌ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ✔️ ✔️ ✔️ 138 Constrained Subsequence Sum Constrained Subsequence Sum O(n) O(n) ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ 139 Maximum Score of a Good Subarray Maximum Score of a Good Subarray O(n) O(1) ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ 140 Power of Four Power of Four O(1) O(1) ❌ ✔️ ✔️ ❌ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ 141 Find Largest Value in Each Tree Row Find Largest Value in Each Tree Row O(n) O(n) ❌ ❌ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 142 K-th Symbol in Grammar K-th Symbol in Grammar O(n) O(n) ✔️ ✔️ ✔️ ✔️ ❌ ✔️ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 143 Longest Palindromic Substring Longest Palindromic Substring O(n^2) O(1) ✔️ ✔️ ✔️ ✔️ ✔️ ✔️ ❌ ✔️ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ ✔️ 144 Count Vowels Permutation Count Vowels Permutation O(n) O(n) ✔️ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ 145 Poor Pigs Poor Pigs O(log n) O(1) ✔️ ✔️ ❌ ❌ ❌ ✔️ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 146 Sort Integers by The Number of 1 Bits Sort Integers by The Number of 1 Bits O(n log n) O(1) ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ 147 Find The Original Array of Prefix Xor Find The Original Array of Prefix Xor O(n) O(n) ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ 148 Find Mode in Binary Search Tree Find Mode in Binary Search Tree O(n) O(n) ✔️ ❌ ❌ ❌ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 149 Count Nodes Equal to Average of Subtree Count Nodes Equal to Average of Subtree O(n) O(n) ✔️ ✔️ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 150 Build an Array With Stack Operations Build an Array With Stack Operations O(n) O(n) ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 151 Diagonal Traverse II Diagonal Traverse II O(n) O(n) ✔️ ❌ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 152 Diagonal Traverse II Diagonal Traverse II O(n) O(n) ✔️ ❌ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 153 Count Nice Pairs in an Array Count Nice Pairs in an Array O(n) O(n) ❌ ✔️ ❌ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ ❌ 154 Reduction Operations to Make the Array Elements Equal here O(n log n) O(1) ❌ ❌ ❌ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 155 Minimum Amount of Time to Collect Garbage Minimum Amount of Time to Collect Garbage O(n) O(1) ❌ ✔️ ❌ ❌ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ ❌ 156 Frequency of the Most Frequent Element Frequency of the Most Frequent Element O(n log n) O(1) ✔️ ✔️ ✔️ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ ❌ 157 Minimize Maximum Pair Sum in Array Minimize Maximum Pair Sum in Array O(n log n) O(1) ✔️ ✔️ ✔️ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ ❌ 158 Find Unique Binary String Find Unique Binary String O(n) O(n) ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 159 Maximum Element After Decreasing and Rearranging Maximum Element After Decreasing and Rearranging O(n log n) O(1) ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 160 Unique Length-3 Palindromic Subsequences Unique Length-3 Palindromic Subsequences O(n) O(1) ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 161 Arithmetic Subarrays Arithmetic Subarrays O(n log n) O(n) ✔️ ✔️ ✔️ ✔️ ✔️ ❌ ✔️ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ ✔️ ✔️ 162 Sum of Absolute Differences in a Sorted Array Sum of Absolute Differences in a Sorted Array O(n) O(n) ❌ ❌ ❌ ❌ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 163 Largest Submatrix With Rearrangements Largest Submatrix With Rearrangements O(n log n) O(1) ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ 164 Knight Dialer Knight Dialer O(n) O(1) ✔️ ✔️ ❌ ✔️ ❌ ❌ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ 165 Number of Ways to Divide a Long Corridor Number of Ways to Divide a Long Corridor O (n) O(1) ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ 166 Minimum One Bit Operations to Make Integers Zero Minimum One Bit Operations to Make Integers Zero O(log n) O(1) ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ 167 Check If Two String Arrays are Equivalent Check If Two String Arrays are Equivalent O(n) O(n) ❌ ✔️ ✔️ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 168 Find Words That Can Be Formed by Characters Find Words That Can Be Formed by Characters O(n) O(n) ✔️ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ 169 Minimum Time Visiting All Points Minimum Time Visiting All Points O(n) O(1) ❌ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ 170 Largest 3-Same-Digit Number in Stringere Largest 3-Same-Digit Number in String O(n) O(1) ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ 171 Count of Matches in Tournament Count of Matches in Tournament O(1) O(1) ❌ ✔️ ❌ ❌ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ 172 Calculate Money in Leetcode Bank Calculate Money in Leetcode Bank O(1) O(1) ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ 173 Largest Rectangle in Histogram Largest Rectangle in Histogram O(n) O(1) ❌ ✔️ ❌ ❌ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 174 Construct String from Binary Tree Construct String from Binary Tree O(n) O(n) ❌ ✔️ ❌ ✔️ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 175 Transpose Matrix Transpose Matrix O(n) O(n) ❌ ✔️ ✔️ ❌ ❌ ❌ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ 176 Element Appearing More Than 25% In Sorted Array Element Appearing More Than 25% In Sorted Array O(n) O(1) ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 177 Maximum Product of Two Elements in an Array Maximum Product of Two Elements in an Array O(n) O(1) ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 178 Special Positions in a Binary Matrix Special Positions in a Binary Matrix O(n) O(n) ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 179 Difference Between Ones and Zeros in Row and Column Difference Between Ones and Zeros in Row and Column O(n^2) O(n) ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 180 Destination City Destination City O(n) O(n) ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ 181 Valid Anagram Valid Anagram O(n) O(n) ✔️ ✔️ ✔️ ✔️ ✔️ ✔️ ❌ ✔️ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ ✔️ 182 Design a Food Rating System Design a Food Rating System O(n log n) O(1) ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 183 Maximum Product Difference Between Two Pairs Maximum Product Difference Between Two Pairs O( n log n) O( 1 ) ❌ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 184 Image Smoother Image Smoother O(n^2) O(n^2) ❌ ✔️ ❌ ✔️ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 185 Buy Two Chocolates Buy Two Chocolates O(n^2) O(1) ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 186 Widest Vertical Area Between Two Points Containing No Points Widest Vertical Area Between Two Points Containing No Points O(n^2) O(1) ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 187 Maximum Score After Splitting a String Maximum Score After Splitting a String O(n) O(1) ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 188 Minimum Changes To Make Alternating Binary String Minimum Changes To Make Alternating Binary String O(n) O(1) ❌ ❌ ❌ ❌ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ ❌ ❌ ❌ ❌ 189 Decode Ways Decode Ways O(n) O(n) ✔️ ✔️ ✔️ ✔️ ✔️ ❌ ❌ ✔️ ❌ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ ✔️ 190 Number of Dice Rolls With Target Sum Number of Dice Rolls With Target Sum O(n^2) O(n) ✔️ ✔️ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 191 Minimum Time Visiting All Points Minimum Time Visiting All Points O(n) O(1) ❌ ✔️ ❌ ❌ ✔️ ❌ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ ❌ ❌ ❌ ✔️ 192 String Conversion II String Conversion II O(n^2) O(n) ❌ ✔️ ❌ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ 193 Minimum Difficulty of a Job Schedule Minimum Difficulty of a Job Schedule O(n^2) O(n) ❌ ✔️ ❌ ❌ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ ❌ ✔️ ✔️ 194 Redistribute Characters to Make All Strings Equal Redistribute Characters to Make All Strings Equal O(n) O(1) ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ 195 Largest Substring Between Two Equal Characters Largest Substring Between Two Equal Characters O(n) O(1) ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 196 Assign Cookies Assign Cookies O (n log n) O(1) ❌ ✔️ ✔️ ❌ ✔️ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ 197 Convert an Array Into a 2D Array With Conditions Convert an Array Into a 2D Array With Conditions O(n^2) O(n) ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 198 Number of Laser Beams in a Bank Number of Laser Beams in a Bank O(n^2) O(n) ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 199 Minimum Number of Operations to Make Array Empty Minimum Number of Operations to Make Array Empty O(n) O(1) ❌ ✔️ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 200 Longest Common Subsequence Longest Common Subsequence O(n) O(n) ❌ ❌ ❌ ❌ ❌ ✔️ ✔️ ✔️ ✔️ ✔️ ❌ ❌ ✔️ ❌ ✔️ ✔️ ✔️ ✔️ ✔️ 201 Maximum Profit in Job Scheduling Maximum Profit in Job Scheduling O(n log n) O(n) ✔️ ✔️ ✔️ ❌ ✔️ ✔️ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ ❌ ✔️ ✔️ 202 Arithmetic Slices II - Subsequence Arithmetic Slices II - Subsequence O(n^2) O(n^2) ❌ ❌ ❌ ❌ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ 203 Range Sum of BST Range Sum of BST O(n) O(n) ✔️ ❌ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 204 Leaf-Similar Trees Leaf-Similar Trees O(n) O(n) ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 205 Amount of Time for Binary Tree to Be Infected Amount of Time for Binary Tree to Be Infected O(n) O(n) ❌ ✔️ ❌ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ 206 Maximum Difference Between Node and Ancestor Maximum Difference Between Node and Ancestor O(n) O(n) ✔️ ✔️ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 207 Determine if String Halves Are Alike Determine if String Halves Are Alike O(n) O(1) ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 208 Minimum Number of Steps to Make Two Strings Anagram Minimum Number of Steps to Make Two Strings Anagram O(n) O(1) ❌ ✔️ ✔️ ✔️ ❌ ❌ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ ❌ ❌ 209 Determine if Two Strings Are Close Determine if Two Strings Are Close O(n) O(1) ✔️ ❌ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 210 Find Players With Zero or One Losses Find Players With Zero or One Losses O(n) O(n) ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ 211 Insert Delete GetRandom O(1) Insert Delete GetRandom O(1) O(1) O(n) ✔️ ✔️ ❌ ✔️ ❌ ✔️ ❌ ❌ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ ✔️ 212 Unique Number of Occurrences Unique Number of Occurrences O(n) O(n) ✔️ ✔️ ✔️ ❌ ❌ ✔️ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ ✔️ 213 Climbing Stairs Climbing Stairs O(n) O(1) ✔️ ✔️ ✔️ ✔️ ✔️ ✔️ ❌ ✔️ ❌ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ ✔️ 214 Minimum Falling Path Sum Minimum Falling Path Sum O(n^2) O(1) ✔️ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ 215 Sum of Subarry Minimums Sum of Subarry Minimums O(n) O(n) ❌ ✔️ ✔️ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ 216 House Robber House Robber O(n) O(n) ✔️ ✔️ ✔️ ✔️ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ 217 Set Mismatch Set Mismatch O(n) O(n) ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 218 Maximum Length of a Concatenated String with Unique Characters Maximum Length of a Concatenated String with Unique Characters O(n) O(n) ❌ ✔️ ❌ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ ❌ ❌ ✔️ ✔️ 219 Pseudo-Palindromic Paths in a Binary Tree Pseudo-Palindromic Paths in a Binary Tree O(n) O(n) ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 220 Longest Common Subsequence Longest Common Subsequence O(n^2) O(n) ✔️ ✔️ ✔️ ❌ ✔️ ✔️ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ ✔️ 221 Out of Boundary Paths Out of Boundary Paths O(n^2) O(n^2) ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 222 K Inverse Pairs Array K Inverse Pairs Array O(n^2) O(n^2) ✔️ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ 223 Number of Submatrices That Sum to Target Number of Submatrices That Sum to Target O(n^2) O(n^2) ✔️ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ 224 Implement Queue using Stacks Implement Queue using Stacksere O(1) O(n) ❌ ✔️ ✔️ ❌ ✔️ ❌ ❌ ✔️ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ 225 Evaluate Reverse Polish Notation Evaluate Reverse Polish Notation O(n) O(n) ❌ ✔️ ✔️ ✔️ ✔️ ✔️ ❌ ❌ ✔️ ❌ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ 226 Divide Array Into Arrays With Max Difference Divide Array Into Arrays With Max Difference O(n) O(n) ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 227 Sequential Digits Sequential Digits O(1) O(1) ❌ ✔️ ✔️ ❌ ❌ ❌ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ 228 Partition Array for Maximum Sum Partition Array for Maximum Sum O(n) O(n) ❌ ✔️ ❌ ✔️ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 229 Minimum Window Substring Minimum Window Substring O(n) O(n) ✔️ ✔️ ✔️ ✔️ ✔️ ✔️ ❌ ✔️ ❌ ❌ ✔️ ❌ ❌ ✔️ ❌ ✔️ ❌ ❌ ✔️ 230 First Unique Character in a String First Unique Character in a String O(n) O(1) ✔️ ✔️ ❌ ✔️ ✔️ ✔️ ❌ ✔️ ✔️ ✔️ ✔️ ✔️ ❌ ❌ ❌ ✔️ ❌ ✔️ ✔️ 231 Group Anagrams Group Anagrams O(n) O(n) ❌ ✔️ ✔️ ✔️ ✔️ ✔️ ✔️ ✔️ ✔️ ✔️ ✔️ ✔️ ✔️ ✔️ ❌ ✔️ ✔️ ✔️ ✔️ 232 Sort Characters By Frequency Sort Characters By Frequency O(n log n) O(n) ✔️ ✔️ ✔️ ✔️ ✔️ ✔️ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ 233 Perfect Squares Perfect Squares O(n) O(n) ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 234 Cherry Pickup II Cherry Pickup II O(n^2) O(n^2) ✔️ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ 235 Majority Element Majority Element O(n) O(1) ✔️ ✔️ ✔️ ✔️ ✔️ ✔️ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ ❌ ✔️ 236 Find First Palindromic String in the Array Find First Palindromic String in the Array O(n) O(1) ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 237 Find Polygon With the Largest Perimeter Find Polygon With the Largest Perimeter O(n log n) O(1) ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ 238 Least Number of Unique Integers after K Removals Least Number of Unique Integers after K Removals O(n log n) O(n) ❌ ✔️ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ 239 Furthest Building You Can Reach Furthest Building You Can Reach O(n log n) O(n) ✔️ ✔️ ✔️ ❌ ✔️ ❌ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ 240 Meeting Rooms III Meeting Rooms III O(n log n) O(n) ✔️ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ ✔️ 241 Power of Two Power of Two O(n log n) O(n) ✔️ ✔️ ✔️ ❌ ❌ ✔️ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ ✔️ 242 Missing Number Missing Number O(n log n) O(n) ✔️ ✔️ ❌ ❌ ✔️ ✔️ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ ✔️ 243 Bitwise AND of Numbers Range Bitwise AND of Numbers Range O(log n) O(1) ✔️ ✔️ ✔️ ❌ x: ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ 244 Find the Town Judge Find the Town Judge O(n) O(n) ❌ ❌ ✔️ ❌ ❌ ✔️ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ 246 Cheapest Flights Within K Stops Cheapest Flights Within K Stops O(n^2) O(n) ✔️ ✔️ ✔️ ✔️ ✔️ ❌ ✔️ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ ✔️ ❌ ✔️ 247 Find All People With Secret Find All People With Secret O(n log n) O(n) ✔️ ❌ ❌ ❌ ❌ ✔️ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 248 Greatest Common Divisor Traversal Greatest Common Divisor Traversal O(n) O(n) ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 249 Same Tree Same Tree O(log n) O(1) ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 250 Diameter of Binary Tree Diameter of Binary Tree O(n) O(n) ✔️ ✔️ ✔️ ✔️ ✔️ ✔️ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ 251 Find Bottom Left Tree Value Find Bottom Left Tree Value O(n) O(n) ❌ ✔️ ❌ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 252 Even Odd Tree Even Odd Tree O(n) O(n) ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 253 Rearrange Array Elements by Sign Rearrange Array Elements by Sign O(n) O(n) ❌ ✔️ ✔️ ❌ ❌ ✔️ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ ❌ 254 Squares of a Sorted Array Squares of a Sorted Array O(n) O(n) ✔️ ✔️ ✔️ ❌ ✔️ ✔️ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ ✔️ 255 Remove Nth Node From End of List Remove Nth Node From End of List O(n) O(1) ✔️ ✔️ ✔️ ❌ ✔️ ✔️ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ ✔️ 256 Bag of Tokens Bag of Tokens O(n log n) O(1) ✔️ ❌ ✔️ ❌ ❌ ❌ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 257 Minimum Length of String After Deleting Similar Ends Minimum Length of String After Deleting Similar Ends O(n) O(1) ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 258 Middle of the Linked List Middle of the Linked List O(n) O(1) ✔️ ✔️ ✔️ ❌ ❌ ✔️ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ ✔️ 259 Count Elements With Maximum Frequency Count Elements With Maximum Frequency O(n) O(n) ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ 260 Minimum Common Value Minimum Common Value O(n) O(1) ❌ ✔️ ✔️ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 261 Intersection of Two Ararys Intersection of Two Ararys O(n^2) O(n^2) ✔️ ✔️ ✔️ ❌ ❌ ❌ ❌ ✔️ ✔️ ✔️ ✔️ ✔️ ✔️ ✔️ ✔️ ✔️ ✔️ ✔️ ✔️ 262 Custom Sort String Custom Sort String O(n) O(n) ✔️ ✔️ ✔️ ✔️ ✔️ ✔️ ❌ ✔️ ❌ ✔️ ✔️ ❌ ❌ ✔️ ❌ ❌ ❌ ✔️ ✔️ 263 Remove Zero Sum Consecutive Nodes from Linked List Remove Zero Sum Consecutive Nodes from Linked List O(n) O(n) ✔️ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ ✔️ 264 Find the Pivot Integer Find the Pivot Integer O(n) O(1) ❌ ✔️ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 265 Binary Subarrays With Sum Binary Subarrays With Sum O(n) O(n) ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ ✔️ 267 Product of Array Except Self Product of Array Except Self O(n) O(n) ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 268 Contiguous Array Contiguous Array O(n) O(n) ✔️ ✔️ ✔️ ✔️ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ 269 Insert Interval Insert Interval O(n) O(n) ❌ ❌ ✔️ ❌ ✔️ ✔️ ✔️ ✔️ ✔️ ✔️ ✔️ ✔️ ✔️ ✔️ ✔️ ✔️ ✔️ ✔️ ✔️ 270 Minimum Number of Arrows to Burst Balloons Minimum Number of Arrows to Burst Balloons O(n log n) O(log n) ❌ ✔️ ✔️ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ ❌ 271 Task Scheduler Task Scheduler O(n) O(n) ✔️ ✔️ ✔️ ✔️ ✔️ ✔️ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ ❌ ✔️ ✔️ 272 Merge In Between Linked Lists Merge In Between Linked Lists O(n) O(1) ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ 273 Reverse Linked List Reverse Linked List O(n) O(n) ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 274 Palindrome Linked List Palindrome Linked List O(n) O(1) ✔️ ✔️ ✔️ ✔️ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ ❌ ❌ ❌ ❌ 275 Reorder List Reorder List O(n) O(1) ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 276 Find All Duplicates in an Array Find All Duplicates in an Array O(n) O(1) ✔️ ✔️ ✔️ ✔️ ✔️ ❌ ❌ ❌ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 277 First Missing Positive First Missing Positive O(n) O(1) ✔️ ✔️ ❌ ✔️ ✔️ ✔️ ❌ ✔️ ✔️ ✔️ ✔️ ✔️ ❌ ❌ ❌ ✔️ ❌ ✔️ ✔️ 278 Subarray Product Less Than K Subarray Product Less Than K O(n) O(1) ❌ ✔️ ❌ ✔️ ✔️ ❌ ❌ ✔️ ❌ ✔️ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ ✔️ 279 Length of Longest Subarray With at Most K Frequency Length of Longest Subarray With at Most K Frequency O(n) O(n) ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ 280 Count Subarrays Where Max Element Appears at Least K Times Count Subarrays Where Max Element Appears at Least K Times O(n) O(1) ❌ ❌ ❌ ❌ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 281 Subarrays with K Different Integers Subarrays with K Different Integers O(n) O(1) ✔️ ✔️ ✔️ ❌ ❌ ✔️ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ ✔️ 282 Isomorphic Strings Isomorphic Strings O(n) O(n) ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 283 Length of Last Word Length of Last Word O(n) O(n) ✔️ ✔️ ✔️ ✔️ ❌ ✔️ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ ✔️ 284 Count Subarrays With Fixed Bounds Count Subarrays With Fixed Bounds O(n) O(1) ✔️ ✔️ ✔️ ❌ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ 285 Maximum Nesting Depth of the Parentheses Maximum Nesting Depth of the Parentheses O(n) O(1) ❌ ✔️ ❌ ✔️ ❌ ❌ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ 286 Make The String Great Make The String Great O(n) O(n) ✔️ ❌ ❌ ❌ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 287 Minimum Remove to Make Valid Parentheses Minimum Remove to Make Valid Parentheses O(n) O(n) ✔️ ✔️ ❌ ✔️ ❌ ❌ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ ❌ ❌ 288 Valid Parenthesis String Valid Parenthesis String O(n) O(1) ✔️ ❌ ❌ ❌ ✔️ ❌ ❌ ❌ ✔️ ✔️ ✔️ ✔️ ✔️ ✔️ ✔️ ❌ ✔️ ✔️ ✔️ 289 Number of Students Unable to Eat Lunch Number of Students Unable to Eat Lunch O(n) O(1) ✔️ ❌ ✔️ ❌ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ 290 Time Needed to Buy Tickets Time Needed to Buy Tickets O(n) O(1) ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ ❌ 291 Reveal Cards In Increasing Order Reveal Cards In Increasing Order O(n log n) O(n) ✔️ ❌ ✔️ ❌ ❌ ✔️ ❌ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 292 Remove K Digits Remove K Digits ✔️ ✔️ ✔️ ✔️ ❌ ✔️ ✔️ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ ❌ 293 Trapping Rain Water Trapping Rain Water O(n^2) O(n) ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ ✔️ ❌ ❌ ❌ ❌ 294 Maximl Rectangle Maximal Rectangle O(n) (n) ✔️ ❌ ❌ ✔️ ✔️ ✔️ ❌ ❌ ✔️ ❌ ✔️ ✔️ ✔️ ✔️ ❌ ✔️ ✔️ ✔️ ✔️ 295 Sum of Left Leaves Sum of Left Leaves O(n) O(1) ✔️ ✔️ ❌ ✔️ ❌ ❌ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 296 Sum Root to Leaf Numbers Sum Root to Leaf Numbers O(n) O(1) ❌ ✔️ ❌ ✔️ ✔️ ❌ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 297 Add One Row to Tree Add One Row to Tree O(n) O(1) ✔️ ❌ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 298 Smallest Sufficient Team Smallest Sufficient Team O(n^2) O(n) ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 299 Island Perimeter Island Perimeter O(n^2) O(1) ✔️ ✔️ ✔️ ❌ ✔️ ✔️ ✔️ ✔️ ✔️ ✔️ ❌ ❌ ✔️ ❌ ✔️ ✔️ ✔️ ✔️ ✔️ 300 Number of Islands Number of Islands O(n^2) O(n^2) ✔️ ✔️ ✔️ ✔️ ✔️ ✔️ ✔️ ✔️ ✔️ ✔️ ✔️ ✔️ ✔️ ✔️ ✔️ ✔️ ✔️ ✔️ ❌ 301 Find All Groups of Farmland Find All Groups of Farmland O(n^2) O(n^2) ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 302 Find if Path Exists in Graph Find if Path Exists in Graph O(n) O(n) ✔️ ❌ ❌ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 303 Open the Lock Open the Lock O(n) O(n) ✔️ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ ✔️ 304 Minimum Height Trees Minimum Height Trees O(n) O(n) ✔️ ✔️ ❌ ✔️ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ 305 N-th Tribonacci Number N-th Tribonacci Number O(n) O(1) ❌ ❌ ✔️ ❌ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ 306 Longest Ideal Subsequence Longest Ideal Subsequence O(n) O(1) ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ 307 Minimum Falling Path Sum II Minimum Falling Path Sum II O(n^2) O(n) ✔️ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 308 Freedom Trail Freedom Trail O(n^2) O(n^2) ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 309 Sum of Distances in Tree Sum of Distances in Tree O(n) O(n) ✔️ ❌ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 310 Minimum Number of Operations to Make Array Empty Minimum Number of Operations to Make Array Empty O(n) O(1) ✔️ ❌ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 311 Number of Wonderful Substrings Number of Wonderful Substrings O(n) O(1) ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 312 Reverse Prefix of Word Reverse Prefix of Word O(n) O(nn) ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ 313 Largest Positive Integer That Exists With Its Negative Largest Positive Integer That Exists With Its Negative O(n) O(n) ❌ ❌ ❌ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 314 Compare Version Numbers Compare Version Numbers O(n) O(n) ❌ ✔️ ✔️ ❌ ✔️ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ ❌ ❌ ✔️ 315 Boats to Save People Boats to Save People O(n log n) O(1) ✔️ ✔️ ✔️ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ 316 Delete Node in a Linked List Delete Node in a Linked List O(1) O(1) ✔️ ✔️ ✔️ ✔️ ✔️ ✔️ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ 317 Remove Nodes From Linked List Remove Nodes From Linked List O(n) O(n) ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 318 Double a Number Represented as a Linked List Double a Number Represented as a Linked List O(n) O(1) ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ 319 Relative Ranks Relative Ranks O(n log n) O(n) ✔️ ✔️ ❌ ❌ ✔️ ✔️ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 320 Maximize Happiness of Selected Children Maximize Happiness of Selected Children O(n log n) O(1) ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 321 K-th Smallest Prime Fraction K-th Smallest Prime Fraction O(n log n) O(n) ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ 322 Path Crossing Path Crossing O(n) O(n) ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 323 Minimum Cost to Hire K Workers Minimum Cost to Hire K Workers O(n log n) O(n) ✔️ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ 324 Largest Local Values in a Matrix Largest Local Values in a Matrix O(n^2) O(n^2) ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 325 Score After Flipping Matrix Score After Flipping Matrix O(n^2) O(1) ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ 326 Path with Maximum Gold Path with Maximum Gold O(2^n) O(n) ✔️ ❌ ✔️ ✔️ ❌ ❌ ❌ ❌ ❌ ✔️ ❌ ✔️ ❌ ❌ ❌ ❌ ✔️ ❌ ❌ 327 Find the Safest Path in a Grid here (n^2) O(n^2) ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ 328 Evaluate Boolean Binary Tree Evaluate Boolean Binary Tree (n) O(1) ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ 329 Delete Leaves With a Given Value Delete Leaves With a Given Value (n) O(1) ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 330 Distribute Coins in Binary Tree Solved Distribute Coins in Binary Tree Solved (n) O(1) ✔️ ✔️ ❌ ✔️ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ 331 Find the Maximum Sum of Node Values Find the Maximum Sum of Node Values (n log n) O(n) ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ 332 Sum of All Subset XOR Totals Sum of All Subset XOR Totals (2^n) O(n) ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 333 Palindrome Partitioning Palindrome Partitioning O(2^n) O(n) ✔️ ✔️ ✔️ ✔️ ❌ ✔️ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ ✔️ 334 The Number of Beautiful Subsets The Number of Beautiful Subsets O(2^n) O(n) ❌ ❌ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ 335 Maximum Score Words Formed by Letters Maximum Score Words Formed by Letters O(2^n) O(n) ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 336 Word Break II Word Break II O(n^2) O(n) ✔️ ✔️ ❌ ✔️ ✔️ ✔️ ✔️ ✔️ ✔️ ❌ ✔️ ✔️ ✔️ ❌ ✔️ ✔️ ❌ ✔️ ✔️ 337 Student Attendance Record II Student Attendance Record II O(n) O(n) ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ 338 Special Array With X Elements Greater Than or Equal X Special Array With X Elements Greater Than or Equal X O(n^2) O(1) ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ 339 Get Equal Substrings Within Budget Get Equal Substrings Within Budget O(n) O(1) ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ 340 Number of Steps to Reduce a Number in Binary Representation to One Number of Steps to Reduce a Number in Binary Representation to One O(n) O(1) ❌ ✔️ ❌ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 341 Count Triplets That Can Form Two Arrays of Equal XOR Count Triplets That Can Form Two Arrays of Equal XOR (n^2) O(n) ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 341 Single Number III Single Number III O(n) O(1) ❌ ❌ ❌ ✔️ ❌ ✔️ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 342 Score of a String Score of a String O(n) O(1) ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 343 Reverse String Reverse String O(n) O(1) ✔️ ✔️ ✔️ ✔️ ✔️ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 344 Append Characters to String to Make Subsequence Append Characters to String to Make Subsequence O(n) O(1) ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 345 Longest Palindrome Longest Palindrome O(n) O(1) ✔️ ✔️ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 346 Find Common Characters Find Common Characters O(n) O(1) ✔️ ✔️ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 347 Hand of Straights Hand of Straights O(n log n) O(n) ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 348 Replace Words Replace Words O(n) O(n) ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 349 Continuous Subarray Sum Continuous Subarray Sum O(n) O(n) ✔️ ✔️ ✔️ ✔️ ❌ ✔️ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 350 Subarray Sums Divisible by K Subarray Sums Divisible by K O(n) O(n) ✔️ ✔️ ✔️ ✔️ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 351 Height Checker Height Checker O(n log n) O(n) ✔️ ❌ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 352 Relative Sort Array Relative Sort Array O(n log n) O(n) ❌ ✔️ ✔️ ❌ ❌ ❌ ❌ ✔️ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 353 Sort Colors Sort Colors O(n) O(1) ✔️ ✔️ ✔️ ✔️ ✔️ ✔️ ✔️ ✔️ ✔️ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 354 Minimum Increment to Make Array Unique Minimum Increment to Make Array Unique O(n log n) O(1) ✔️ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 355 Minimum Number of Moves to Seat Everyone Minimum Number of Moves to Seat Everyone O(n log n) O(1) ❌ ✔️ ✔️ ❌ ❌ ❌ ❌ ✔️ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 356 IPO IPO O(n log n) O(n) ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 357 Patching Array Patching Array O(n) O(1) ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 358 Sum of Square Numbers Sum of Square Numbers O(n) O(1) ✔️ ✔️ ✔️ ✔️ ❌ ❌ ❌ ✔️ ❌ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 359 Most Profit Assigning Work Most Profit Assigning Work O(n log n) O(n) ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 360 Minimum Number of Days to Make m Bouquets Minimum Number of Days to Make m Bouquets O(n) O(1) ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 361 Magnetic Force Between Two Balls Magnetic Force Between Two Balls O(n log n) O(1) ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 362 Grumpy Bookstore Owner Grumpy Bookstore Owner O(n) O() ❌ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 363 Minimum Number of K Consecutive Bit Flipse Minimum Number of K Consecutive Bit Flipse O(n) O(n) ❌ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 364 Binary Search Tree to Greater Sum Tree Binary Search Tree to Greater Sum Tree O(n) O(n) ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 365 Balance a Binary Search Tree Balance a Binary Search Tree O(n) O(n) ✔️ ❌ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 366 Find Center of Star Graph Find Center of Star Graph O(n) O(n) ❌ ❌ ❌ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 367 Maximum Total Importance of Roads Maximum Total Importance of Roads O(n log n) O(n) ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 368 All Ancestors of a Node in a Directed Acyclic Graph All Ancestors of a Node in a Directed Acyclic Graph O(n log n) O(n) ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 369 Remove Max Number of Edges to Keep Graph Fully Traversable Remove Max Number of Edges to Keep Graph Fully Traversable O(n) O(n) ✔️ ❌ ❌ ❌ ✔️ ✔️ ❌ ❌ ❌ 370 Longest Continuous Subarray With Absolute Diff Less Than or Equal to Limit Longest Continuous Subarray With Absolute Diff Less Than or Equal to Limit O(n) O(n) ✔️ ✔️ ❌ ❌ ✔️ ❌ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 371 Three Consecutive Odds Three Consecutive Odds O(n) O(1) ✔️ ✔️ ❌ ✔️ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 372 Intersection of Two Arrays II Intersection of Two Arrays II O(n) O(n) ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 373 Minimum Difference Between Largest and Smallest Value in Three Moves Minimum Difference Between Largest and Smallest Value in Three Moves O(n log n) O(1) ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 374 Merge Nodes in Between Zeros Merge Nodes in Between Zeros O(n) O(1) ❌ ❌ ❌ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 375 Find the Minimum and Maximum Number of Nodes Between Critical Points Find the Minimum and Maximum Number of Nodes Between Critical Points O(n) O(1) ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 376 Pass the Pillowe Pass the Pillow O(1) O(1) ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 377 Water Bottles Water Bottles O(log n) O(1) ❌ ❌ ❌ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 378 Find the Winner of the Circular Game Find the Winner of the Circular Game O(n) O(1) ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 379 Average Waiting Time Average Waiting Time O(n) O(1) ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 380 Crawler Log Folder Crawler Log Folder O(n) O(1) ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 381 Reverse Substrings Between Each Pair of Parentheses Reverse Substrings Between Each Pair of Parentheses O(n) O(n) ❌ ❌ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 382 Maximum Score From Removing Substrings Maximum Score From Removing Substrings O(n) O(n) ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 383 Robot Collisions Robot Collisions O(n) O(n) ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 384 Number of Atoms Number of Atoms O(n) O(n) ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 385 Create Binary Tree From Descriptions Create Binary Tree From Descriptions O(n) O(n) ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 386 Step-By-Step Directions From a Binary Tree Node to Another Step-By-Step Directions From a Binary Tree Node to Another O(n) O(n) ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 387 Delete Nodes And Return Forest Delete Nodes And Return Forest O(n) O(n) ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 388 Number of Good Leaf Nodes Pairs Number of Good Leaf Nodes Pairs O(n) O(n) ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 389 Lucky Numbers in a Matrix Lucky Numbers in a Matrix O(n) O(n) ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 390 Find Valid Matrix Given Row and Column Sums Find Valid Matrix Given Row and Column Sums O(n)^2 O(n^2) ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 391 Build a Matrix With Conditions Build a Matrix With Conditions O(n)^2 O(n^2) ✔️ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 392 Sort the People Sort the People O(n log n) O(n) ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 393 Sort Array by Increasing Frequency Sort Array by Increasing Frequency O(n log n) O(n) ❌ ✔️ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 394 Sort the Jumbled Numbers Sort the Jumbled Numbers O(n log n) O(n) ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 395 Sort an Array Sort an Array O(n log n) O(n) ❌ ✔️ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 396 Find the City With the Smallest Number of Neighbors at a Threshold Distance Find the City With the Smallest Number of Neighbors at a Threshold Distance O(n^2) O(n^2) ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ :X: ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 397 Minimum Cost to Convert String I Minimum Cost to Convert String I O(n) O(n) ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 398 Second Minimum Time to Reach Destination Second Minimum Time to Reach Destination O(n log n) O(n) ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 399 Count Number of Teams Count Number of Teams O(n log n) O(n) ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 400 Minimum Deletions to Make String Balanced Minimum Deletions to Make String Balanced O(n) O(1) ❌ ❌ ❌ ❌ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 401 Filling Bookcase Shelves Filling Bookcase Shelves O(n^2) O(n) ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 402 Number of Senior Citizens Number of Senior Citizens O(n) O(1) ❌ ❌ ❌ ❌ ❌ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 403 Minimum Swaps to Group All 1's Together II Minimum Swaps to Group All 1's Together II O(n) O(n) ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 404 Make Two Arrays Equal by Reversing Subarrays Make Two Arrays Equal by Reversing Subarrays O(n) O(n) ❌ ❌ ❌ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 405 Range Sum of Sorted Subarray Sums Range Sum of Sorted Subarray Sums O(log n) O(n) ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 406 Kth Distinct String in an Array Kth Distinct String in an Array O(n) O(n) ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 407 Minimum Number of Pushes to Type Word II Minimum Number of Pushes to Type Word II O(n) O(1) ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 408 Spiral Matrix III Spiral Matrix III O(n) O(n) ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 409 Magic Squares In Grid Magic Squares In Grid O(n) O(n) ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 410 Regions Cut By Slashes Regions Cut By Slashes O(n^2) O(n^2) ✔️ ✔️ ✔️ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ ✔️ 411 Minimum Number of Days to Disconnect Island Minimum Number of Days to Disconnect Island O(n^2) O(n) ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ 412 Find K-th Smallest Pair Distance Find K-th Smallest Pair Distance O(n log n) O(n) ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ 413 Lemonade Change Lemonade Change O(n) O(1) ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ 414 {Maximum Distance in Arrays](https://leetcode.com/problems/maximum-distance-in-arrays/) Maximum Distance in Arrays O(n) O(1) ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ 415 Maximum Number of Points with Cost Maximum Number of Points with Cost (n) O(n) ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ 416 Ugly Number II Ugly Number II O(n) O(n) ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 417 2 Keys Keyboard 2 Keys Keyboard O(n) O(1) ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 418 Number Complement Number Complement O(1) O(1) ❌ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ 419 Fraction Addition and Subtraction Fraction Addition and Subtraction O(n) O(n) ❌ ❌ :hx: ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ 420 Find the Closest Palindrome Find the Closest Palindrome O(1) O(1) ❌ ❌ :hx: ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ ❌ 421 Binary Tree Postorder Traversal Binary Tree Postorder Traversal O(n) O(1) ❌ ❌ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 422 Count Sub Islands Count Sub Islands O(n^2) O(n^2) ❌ ❌ ❌ :x ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ 423 Most Stones Removed with Same Row or Column Most Stones Removed with Same Row or Column O(n) O(n) ✔️ ✔️ ❌ :x ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ ❌ ❌ ✔️ 424 Modify Graph Edge Weights Modify Graph Edge Weights O(n^2) O(n^2) ❌ ❌ ❌ :x ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 425 Convert 1D Array Into 2D Array Convert 1D Array Into 2D Array O(n^2) O(n^2) ✔️ ✔️ ❌ :x ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 426 Find the Student that Will Replace the Chalk [Find the Student that Will Replace the Chalk]](https://github.com/aurimas13/Solutions-To-Problems/blob/main/LeetCode/Java%20Solutions/Find%20the%20Student%20that%20Will%20Replace%20the%20Chalk/find.java) O(n) O(1) ❌ ❌ ❌ :x ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 437 Sum of Digits of String After Convert Sum of Digits of String After Convert O(n) O(n) ❌ ❌ ❌ :x ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 438 [Walking Robot Simulation]( https://leetcode.com/problems/walking-robot-simulation/) Walking Robot Simulation O(n) O(n) ❌ ❌ ❌ :x ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ 439 Find Missing Observations Find Missing Observations O(n) O(n) ❌ ❌ ❌ :x ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 440 Delete Nodes From Linked List Present in Array Delete Nodes From Linked List Present in Array O(n) O(1) ✔️ ❌ ❌ :x ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 441 Linked List in Binary Tree Linked List in Binary Tree O(n) O(1) ❌ ❌ ❌ :x ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ 442 Spiral Matrix IV Spiral Matrix IV O(n^2) O(n^2) ❌ ❌ ❌ :x ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 443 Insert Greatest Common Divisors in Linked List Insert Greatest Common Divisors in Linked List O(n) O(1) ❌ ❌ ❌ :x ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 444 Minimum Bit Flips to Convert Number Minimum Bit Flips to Convert Number O(n) O(n) ✔️ ❌ ❌ :x ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 445 XOR Queries of a Subarray XOR Queries of a Subarray O(n) O(n) ✔️ ✔️ ❌ :x ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 446 Count the Number of Consistent Strings Count the Number of Consistent Strings O(1) O(1) ✔️ ❌ ❌ :x ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 447 Longest Subarray With Maximum Bitwise AND Longest Subarray With Maximum Bitwise AND O(n) O(1) ❌ ✔️ ❌ :x ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 448 Find the Longest Substring Containing Vowels in Even Counts Find the Longest Substring Containing Vowels in Even Counts O(n) O(1) ❌ ✔️ ❌ :x ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 449 Largest Number Largest Number O(log n) O(n) ✔️ ❌ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 450 Different Ways to Add Parentheses Different Ways to Add Parentheses O(2^n) O(2^n) ✔️ ✔️ ❌ ✔️ ✔️ ❌ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 451 Shortest Palindrome Shortest Palindrome O(n^2) O(n) ✔️ ✔️ ❌ ❌ ❌ ✔️ ❌ ✔️ ❌ ✔️ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 452 Sum of Prefix Scores of Strings Sum of Prefix Scores of Strings O(n) O(n) ✔️ ❌ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 453 Design Circular Deque Design Circular Deque O(1) O(1) ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 454 All O`one Data Structure All O`one Data Structure O(1) O(1) ❌ ❌ ❌ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 455 All O`one Data Structure All O`one Data Structure O(n) O(1) ❌ ❌ ❌ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 456 Design a Stack With Increment Operation Design a Stack With Increment Operation O(1) O(1) ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 457 Check If Array Pairs Are Divisible by k Check If Array Pairs Are Divisible by k O(n) O(1) ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 458 My Calendar I My Calendar I O(log n) O(n) ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ ✔️ 459 Make Sum Divisible by P Make Sum Divisible by P O(n) O(n) ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ 460 Sentence Similarity III Sentence Similarity III O(n) O(1) ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 461 Minimum Number of Swaps to Make the String Balanced Minimum Number of Swaps to Make the String Balanced O(n) O(1) ❌ ❌ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ 462 [Maximal Score After Applying K Operations] Maximal Score After Applying K Operations O(n) O(n) ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ ❌ ❌ ❌ 463 Separate Black and White Balls Separate Black and White Balls O(n) O(1) ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ 464 Rotating the Box Rotating the Box O(n) O(1) ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ✔️ ❌ ❌ 465 Adding Spaces to a String Adding Spaces to a String O(n) O(n) ❌ ❌ ❌ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 466 Two Best Non-Overlapping Events Two Best Non-Overlapping Events O(n log n) O(n log n) ✔️ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 467 Special Array II Special Array II O(n) O(n) ✔️ ✔️ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ 468 Find Longest Special Substring That Occurs Thrice Find Longest Special Substring That Occurs Thrice O(^2) O(n^2) ✔️ :x ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌