Skip to content

shumarb/leetcode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 

Repository files navigation

LeetCode

Overview

This repository contains my LeetCode submissions, with entries sorted by:

The concepts applied to solve these questions are explained in my Learning repository.

(Note: Rank indicates the percentage of submissions that my code outperforms in terms of runtime.)

Category Content
Challenges Blind 75, Grind 75, Grind 169, NeetCode 150, SQL 45
Courses AlgoMonster, Grokking Data Structures & Algorithms for Coding Interviews, Leetcode Top Interview Questions (Easy Collection)
Topics Array, Backtracking, Binary Indexed Tree, Binary Search, Binary Search Tree, Binary Tree, Bit Manipulation, Bitmask, Brainteaser, Breadth First Search, Bucket Sort, Combinatorics, Counting, Counting Sort, Data Stream, Database, Depth First Search, Design, Divide and Conquer, Doubly Linked List, Dynamic Programming, Enumeration, Game Theory, Geometry, Graph, Greedy, Hash Function, Hash Table, Heap (Priority Queue), Interactive, Iterator, Linked List, Math, Matrix, Memoization, Merge Sort, Monotonic Queue, Monotonic Stack, Number Theory, Ordered Set, Prefix Sum, Probability and Statistics, Queue, Quick Select, Radix Sort, Randomized, Recursion, Reservoir Sampling, Rolling Hash, Segment Tree, Simulation, Sliding Window, Sorting, Stack, String, String Matching, Topological Sort, Tree, Trie, Two Pointers, Union Find

Performance

Umar's LeetCode Statistics

Submissions

Easy

Question Submission Runtime Rank
A Number After a Double Reversal Java 0ms 100%
Absolute Difference Between Maximum and Minimum K Elements Java 1ms 100%
Account Balance After Rounded Purchase Java 0ms 100%
Add Binary Java 2ms 99.94%
Add Digits Java 0ms 100%
Add Strings Java 2ms 61.51%
Add Two Integers Java 0ms 100%
Add to Array-Form of Integer Java 2ms 99.20%
Adjacent Increasing Subarrays Detection I Java 2ms 38.87%
Alternating Digit Sum Java 0ms 100%
Alternating Groups I Java 1ms 97.05%
Ant on the Boundary Java 0ms 100%
Apple Redistribution into Boxes Java 1ms 100%
Apply Operations to an Array Java 1ms 95.99%
Arranging Coins Java 9ms 9.79%
Array Partition Java 12ms 97.33%
Article Views I SQL 619ms 51.14%
Assign Cookies Java 11ms 35.51%
Available Captures for Rook Java 0ms 100%
Average Salary Excluding the Minimum and Maximum Salary Java 0ms 100%
Average Value of Even Numbers That Are Divisible by Three Java 0ms 100%
Average of Levels in Binary Tree Java 2ms 94.44%
Backspace String Compare Java 1ms 78.15%
Balanced Binary Tree Java 0ms 100%
Base 7 Java 1ms 70.47%
Baseball Game Java 2ms 96.48%
Best Poker Hand Java 0ms 100%
Best Time To Buy And Sell Stock Java 2ms 72.40%
Big Countries SQL 461ms 66.33%
Biggest Single Number SQL 406ms 82.18%
Binary Gap Java 1ms 40.09%
Binary Number with Alternating Bits Java 0ms 100%
Binary Prefix Divisible by 5 Java 3ms 98.17%
Binary Search Java 0ms 100%
Binary Tree Inorder Traversal Java 0ms 100%
Binary Tree Paths Java 1ms 98.42%
Binary Tree Postorder Traversal Java 0ms 100%
Binary Tree Preorder Traversal Java 0ms 100%
Binary Tree Tilt Java 0ms 100%
Bitwise OR of Even Numbers in an Array Java 0ms 100%
Buddy Strings Java 1ms 99.49%
Build Array from Permutation Java 1ms 99.07%
Button with Longest Push Time Java 0ms 100%
Buy Two Chocolates Java 1ms 100%
Calculate Amount Paid in Taxes Java 0ms 100%
Calculate Delayed Arrival Time Java 0ms 100%
Calculate Digit Sum of a String Java 1ms 92.62%
Calculate Money in Leetcode Bank Java 3ms 5.77%
Can Make Arithmetic Progression From Sequence Java 2ms 98.24%
Can Place Flowers Java 1ms 97.29%
Capitalize the Title Java 3ms 88.41%
Categorize Box According to Criteria Java 0ms 100%
Cells in a Range on an Excel Sheet Java 1ms 100%
Cells with Odd Values in a Matrix Java 1ms 85.31%
Check Array Formation Through Concatenation Java 0ms 100%
Check Balanced String Java 1ms 98.64%
Check Distances Between Same Letters Java 1ms 90.31%
Check Divisibility by Digit Sum and Product Java 0ms 100%
Check If All 1's Are at Least K Places Away Java 1ms 100%
Check If Digits Are Equal in String After Operations I Java 8ms 78.87%
Check If It Is a Straight Line Java 0ms 100%
Check If N And Its Double Exist Java 1ms 99.29%
Check If String Is a Prefix of Array Java 1ms 87.61%
Check If Two String Arrays are Equivalent Java 0ms 100%
Check If a Word Occurs As a Prefix of Any Word in a Sentence Java 0ms 100%
Check Whether Two Strings are Almost Equivalent Java 0ms 100%
Check if All A's Appears Before All B's Java 0ms 100%
Check if All Characters Have Equal Number of Occurrences Java 1ms 99.69%
Check if All the Integers in a Range Are Covered Java 0ms 100%
Check if Any Element Has Prime Frequency Java 0ms 100%
Check if Array is Good Java 2ms 74.84%
Check if Array Is Sorted and Rotated Java 0ms 100%
Check if Binary String Has at Most One Segment of Ones Java 0ms 100%
Check if Bitwise OR Has Trailing Zeros Java 0ms 100%
Check if Every Row and Column Contains All Numbers Java 4ms 92.01%
Check if Grid Satisfies Conditions Java 4ms 92.01%
Check if Matrix Is X-Matrix Java 0ms 100%
Check if Number Has Equal Digit Count and Digit Value Java 0ms 100%
Check if Numbers Are Ascending in a Sentence Java 0ms 100%
Check if One String Swap Can Make Strings Equal Java 0ms 100%
Check if Strings Can be Made Equal With Operations I Java 1ms 99.28%
Check if The Number is Fascinating Java 0ms 100%
Check if Two Chessboard Squares Have the Same Colour Java 0ms 100%
Check if Word Equals Summation of Two Words Java 0ms 100%
Check if a String Is an Acronym of Words Java 1ms 100%
Check if the Sentence Is Pangram Java 0ms 100%
Circular Sentence Java 1ms 93.68%
Classes More Than 5 Students SQL 471ms 96.18%
Clear Digits Java 1ms 100%
Climbing Stairs Java 0ms 100%
Combine Two Tables SQL 629ms 96.12%
Complement of Base 10 Integer Java 0ms 100%
Compute Alternating Sum Java 1ms 94.44%
Compute Decimal Representation Java 1ms 100%
Concatenate Non-Zero Digits and Multiply By Sum I Java 1ms 99.92%
Concatenation of Array Java 1ms 96.28%
Consecutive Characters Java 1ms 99.83%
Contains Duplicate Java 9ms 99.19%
Contains Duplicate II Java 18ms 89.16%
Convert 1D Array into 2D Array Java 2ms 100%
Convert Binary Number in a Linked List to Integer Java 0ms 100%
Convert Date to Binary Java 4ms 66.45%
Convert Integer to the Sum of Two No-Zero Integers Java 0ms 100%
Convert Sorted Array to Binary Search Tree Java 0ms 100%
Convert the Temperature Java 0ms 100%
Count Binary Strings Java 7ms 97.26%
Count Common Words With One Occurrence Java 6ms 89.98%
Count Complete Tree Nodes Java 0ms 100%
Count Distinct Numbers on Board Java 0ms 100%
Count Elements With Maximum Frequency Java 0ms 100%
Count Elements With Strictly Smaller and Greater Elements Java 0ms 100%
Count Equal and Divisible Pairs in an Array Java 3ms 99.52%
Count Good Triplets Java 10ms 79.74%
Count Integers With Even Digit Sum Java 1ms 86.87%
Count Items Matching a Rule Java 3ms 98.81%
Count Largest Group Java 3ms 96.75%
Count Negative Numbers in a Sorted Matrix Java 0ms 100%
Count Number of Pairs With Absolute Difference K Java 1ms 98.63%
Count Odd Numbers in an Interval Range Java 0ms 100%
Count Operations to Obtain Zero Java 1ms 90.10%
Count Pairs Of Similar Strings Java 58ms 41.34%
Count Pairs That Form a Complete Day I Java 1ms 97.87%
Count Pairs Whose Sum is Less than Target Java 1ms 100%
Count Partitions with Even Sum Difference Java 0ms 100%
Count Prefix and Suffix Pairs I Java 2ms 99.94%
Count Prefixes of a Given String Java 0ms 100%
Count Special Quadruplets Java 12ms 86.95%
Count Square Sum Triples Java 4ms 96.87%
Count Subarrays of Length Three With a Condition Java 1ms 100%
Count Substrings That Satisfy K-Constraint I Java 2ms 52.78%
Count Symmetric Integers Java 44ms 25.05%
Count Tested Devices After Test Operations Java 0ms 100%
Count Vowel Substrings of a String Java 6ms 69.73%
Count of Matches in Tournament Java 0ms 100%
Count the Digits That Divide a Number Java 0ms 100%
Count the Number of Consistent Strings Java 6ms 86.92%
Count the Number of Special Characters I Java 1ms 100%
Count the Number of Vowel Strings in Range Java 1ms 100%
Counting Bits Java 2ms 95%
Counting Words With a Given Prefix Java 0ms 100%
Coupon Code Validator Java 20ms 49.03%
Cousins in Binary Tree Java 1ms 26.22%
Crawler Log Folder Java 1ms 99.52%
Create Target Array in the Given Order Java 0ms 100%
Customers Placing The Largest Number Of Orders SQL 799ms 87.57%
Customers Who Never Order SQL 908ms 93.29%
Decode XORed Array Java 1ms 99.27%
Decode the Message Java 4ms 93.90%
Decompress Run-Length Encoded List Java 0ms 100%
Decrypt String from Alphabet to Integer Mapping Java 1ms 79.11%
Defanging an IP Address Java 0ms 100%
Defuse the Bomb Java 4ms 6.06%
Degree of an Array Java 5ms 95.49%
Delete Characters to Make Fancy String Java 25ms 81.54%
Delete Columns to Make Sorted Java 8ms 64.79%
Delete Greatest Value in Each Row Java 4ms 91.17%
Design HashMap Java 32ms 39.02%
Design HashSet Java 12ms 97.83%
Design Neighbor Sum Service Java 15ms 96.61%
Design Parking System Java 7ms 100%
Design an Ordered Stream Java 76ms 99.56%
Destination City Java 2ms 100%
Detect Capital Java 0ms 100%
Detect Pattern of Length M Repeated K or More Times Java 0ms 100%
Determine Color of a Chessboard Square Java 0ms 100%
Determine Whether Matrix Can Be Obtained By Rotation Java 0ms 100%
Determine if String Halves Are Alike Java 1ms 99.74%
Determine if Two Events Have Conflict Java 0ms 100%
Determine the Winner of a Bowling Game Java 1ms 100%
Diameter of Binary Tree Java 0ms 100%
Difference Between Element Sum and Digit Sum of an Array Java 2ms 98.35%
Distance Between Bus Stops Java 0ms 100%
Distribute Candies Java 31ms 55.24%
Distribute Candies Among Children I Java 12ms 32.40%
Distribute Candies to People Java 1ms 97.73%
Distribute Elements Into Two Arrays I Java 1ms 100%
Divide Array Into Equal Pairs Java 1ms 99.99%
Divide a String Into Groups of Size K Java 0ms 100%
Divisible and Non-divisible Sums Difference Java 0ms 100%
Duplicate Emails SQL 865ms 11.83%
Duplicate Zeros Java 3ms 44.61%
Earliest Time to Finish One Task Java 0ms 100%
Element Appearing More Than 25% In Sorted Array Java 0ms 100%
Employee Bonus SQL 1659ms 64.38%
Employees Earning More Than Their Managers SQL 1429ms 10.98%
Equal Score Substrings Java 1ms 100%
Evaluate Boolean Binary Tree Java 0ms 100%
Existence of a Substring in a String and Its Reverse Java 1ms 100%
Fair Candy Swap Java 3ms 99.76%
Faulty Keyboard Java 3ms 98.26%
Fibonacci Number Java 0ms 100%
Fill Square Submatrix Vertically Java 1ms 58.12%
Final Prices With a Special Discount in a Shop Java 2ms 65.61%
Final Value of Variable After Performing Operations Java 1ms 74.56%
Find All K-Distant Indices in an Array Java 28ms 22.21%
Find All Numbers Disappeared in an Array Java 3ms 99.85%
Find Center of Star Graph Java 3ms 34.14%
Find Closest Number to Zero Java 2ms 85.15%
Find Closest Person Java 0ms 100%
Find Common Characters Java 2ms 91.04%
Find Common Elements Between Two Arrays Java 1ms 100%
Find First Palindromic String in the Array Java 1ms 100%
Find Greatest Common Divisor of Array Java 0ms 100%
Find Indices With Index and Value Difference I Java 1ms 99.01%
Find Indices of Stable Mountains Java 1ms 100%
Find Lucky Integer in an Array Java 1ms 100%
Find Maximum Number of String Pairs Java 2ms 90.55%
Find Minimum Operations to Make All Elements Divisible by Three Java 0ms 100%
Find Missing Elements Java 1ms 100%
Find Missing and Repeated Values Java 1ms 100%
Find Mode in Binary Search Tree Java 6ms 43.24%
Find Most Frequent Vowel and Consonant Java 1ms 100%
Find N Unique Integers Sum up to Zero Java 0ms 100%
Find Numbers with Even Number of Digits Java 1ms 98.93%
Find Pivot Index Java 1ms 94.56%
Find Resultant Array After Removing Anagrams Java 1ms 100%
Find Smallest Letter Greater Than Target Java 0ms 100%
Find Special Substring of Length K Java 1ms 97.39%
Find Subarrays With Equal Sum Java 1ms 99.86%
Find Subsequence of Length K With the Largest Sum Java 8ms 62.37%
Find Target Indices After Sorting Array Java 0ms 100%
Find The Least Frequent Digit Java 1ms 97.93%
Find Valid Pair of Adjacent Digits in String Java 2ms 88.14%
Find Winner on a Tic Tac Toe Game Java 0ms 100%
Find Words Containing Character Java 1ms 100%
Find Words That Can Be Formed by Characters Java 5ms 87.08%
Find X-Sum of All K-Long Subarrays I Java 7ms 96.27%
Find a Corresponding Node of a Binary Tree in a Clone of That Tree Java 1ms 98.35%
Find if Digit Game Can Be Won Java 0ms 100%
Find if Path Exists in Graph Java 53ms 88.29%
Find the Array Concatenation Value Java 1ms 96.03%
Find the Child Who Has the Ball After K Seconds Java 0ms 100%
Find the Difference Java 1ms 99.40%
Find the Difference of Two Arrays Java 2ms 99.85%
Find the Distance Value Between Two Arrays Java 4ms 59.73%
Find the Distinct Difference Array Java 5ms 93.20%
Find the Encrypted String Java 1ms 100%
Find the Highest Altitude Java 0ms 100%
Find the Index of the First Occurrence in a String Java 0ms 100%
Find the Integer Added to Array I Java 0ms 100%
Find the K-Beauty of a Number Java 1ms 40.75%
Find the K-or of an Array Java 6ms 13.61%
Find the K-th Character in String Game I Java 4ms 56.59%
Find the Key of the Numbers Java 1ms 94.40%
Find the Largest Almost Missing Integer Java 1ms 100%
Find the Longest Balanced Substring of a Binary String Java 1ms 100%
Find the Losers of the Circular Game Java 1ms 100%
Find the Maximum Achievable Number Java 1ms 100%
Find the Maximum Divisibility Score Java 175ms 95.38%
Find the Middle Index in Array Java 0ms 100%
Find the Number of Good Pairs I Java 1ms 100%
Find the Number of Winning Players Java 1ms 100%
Find the Peaks Java 1ms 100%
Find the Pivot Integer Java 1ms 70.60%
Find the Sum of Encrypted Integers Java 1ms 100%
Find the Town Judge Java 2ms 100%
Find the Width of Columns of a Grid Java 2ms 97.87%
Find the Winning Player in Coin Game Java 0ms 100%
Find the XOR of Numbers Which Appear Twice Java 1ms 98.52%
Finding 3-Digit Even Number Java 3ms 94.61%
First Bad Version Java 24ms 98.13%
First Letter to Appear Twice Java 0ms 100%
First Unique Character in a String Java 5ms 94.83%
FizzBuzz Java 1ms 99.52%
Flipping an Image Java 0ms 100%
Form Smallest Number From Two Digit Arrays Java 1ms 85.14%
Fruits into Baskets II Java 1ms 100%
GCD of Odd and Even Sums Java 0ms 100%
Generate Tag for Video Caption Java 9ms 62.01%
Generate a String With Characters That Have Odd Counts Java 1ms 83.40%
Get Maximum in Generated Array Java 0ms 100%
Goal Parser Interpretation Java 0ms 100%
Goat Latin Java 1ms 99.87%
Greatest Common Divisor of Strings Java 0ms 100%
Greatest English Letter in Upper and Lower Case Java 4ms 72.30%
Guess Number Higher or Lower Java 0ms 100%
Hamming Distance Java 0ms 100%
Happy Number Java 0ms 100%
Harshad Number Java 0ms 100%
Height Checker Java 2ms 88.86%
How Many Numbers Are Smaller Than the Current Number Java 5ms 83.20%
Implement Queue Using Stacks Java 0ms 100%
Implement Stack Using Queues Java 0ms 100%
Increasing Decreasing String Java 2ms 100%
Increasing Order Search Tree Java 0ms 100%
Intersection of Multiple Arrays Java 2ms 100%
Intersection of Two Arrays Java 1ms 98.80%
Intersection of Two Arrays II Java 1ms 98.51%
Intersection of Two Linked Lists Java 1ms 99.90%
Invert Binary Tree Java 0ms 100%
Is Subsequence Java 1ms 92.35%
Isomorphic Strings Java 13ms 52.01%
Jewels and Stones Java 1ms 60.50%
K Items With the Maximum Sum Java 1ms 89.54%
Keep Multiplying Found Values by Two Java 0ms 100%
Keyboard Row Java 0ms 100%
Kids With the Greatest Number of Candies Java 1ms 87.73%
Kth Distinct String in an Array Java 6ms 86.06%
Kth Largest Element in a Stream Java 21ms 53.45%
Kth Missing Positive Number Java 2ms 11.57%
Largest 3-Same-Digit Number in String Java 2ms 83.21%
Largest Local Values in a Matrix Java 2ms 100%
Largest Number After Digit Swaps by Parity Java 0ms 100%
Largest Number At Least Twice of Others Java 0ms 100%
Largest Odd Number in String Java 1ms 99.64%
Largest Perimeter Triangle Java 38ms 6.78%
Largest Positive Integer That Exists With Its Negative Java 6ms 61.28%
Largest Substring Between Two Equal Characters Java 1ms 86.43%
Largest Triangle Area Java 4ms 99.15%
Last Stone Weight Java 1ms 97.76%
Last Visited Integers Java 1ms 100%
Leaf-Similar Trees Java 0ms 100%
Left and Right Sum Differences Java 2ms 98.18%
Lemonade Change Java 2ms 93.83%
Length of Last Word Java 0ms 100%
Lexicographically Smallest Palindrome Java 5ms 100%
Lexicographically Smallest String After a Swap Java 2ms 32.43%
License Key Formatting Java 11ms 79.25%
Linked List Cycle Java 0ms 100%
Long Pressed Name Java 1ms 82.56%
Longer Contiguous Segments of Ones than Zeros Java 0ms 100%
Longest Alternating Subarray Java 1ms 100%
Longest Common Prefix Java 1ms 64%
Longest Continuous Increasing Subsequence Java 1ms 99.68%
Longest Even Odd Subarray With Threshold Java 4ms 98.16%
Longest Harmonious Subsequence Java 16ms 56.21%
Longest Nice Substring Java 37ms 17.29%
Longest Palindrome Java 7ms 52.78%
Longest Strictly Increasing or Strictly Decreasing Subarray Java 1ms 90.29%
Longest Subsequence With Limited Sum Java 7ms 22.61%
Longest Uncommon Subsequence I Java 0ms 100%
Longest Unequal Adjacent Groups Subsequence I Java 1ms 92.54%
Lucky Numbers in a Matrix Java 3ms 46.62%
Majority Element Java 2ms 99.80%
Majority Frequency Characters Java 1ms 100%
Make Array Zero by Subtracting Equal Amounts Java 0ms 100%
Make The String Great Java 3ms 62.40%
Make Two Arrays Equal by Reversing Subarrays Java 1ms 99.44%
Make a Square with the Same Color Java 0ms 100%
Matrix Cells in Distance Order Java 13ms 66.60%
Matrix Diagonal Sum Java 0ms 100%
Matrix Similarity After Cyclic Shifts Java 1ms 97.69%
Max Consecutive Ones Java 2ms 93.86%
Max Pair Sum in an Array Java 3ms 93.95%
Maximize Expression of Three Elements Java 1ms 99.82%
Maximize Sum Of Array After K Negations Java 1ms 100%
Maximize Sum of At Most K Distinct Elements Java 7ms 69.64%
Maximum 69 Number Java 0ms 100%
Maximum Area of Longest Diagonal Rectangle Java 1ms 91.72%
Maximum Ascending Subarray Sum Java 0ms 100%
Maximum Average Subarray I Java 5ms 51.11%
Maximum Containers on a Ship Java 0ms 100%
Maximum Count of Positive Integer and Negative Integer Java 0ms 100%
Maximum Depth of Binary Tree Java 0ms 100%
Maximum Depth of N-Ary Tree Java 0ms 100%
Maximum Difference Between Adjacent Elements in a Circular Array Java 1ms 99.43%
Maximum Difference Between Even and Odd Frequency I Java 1ms 100%
Maximum Difference Between Increasing Elements Java 0ms 100%
Maximum Height of a Triangle Java 0ms 100%
Maximum Length Substring With Two Occurrences Java 38ms 5.28%
Maximum Nesting Depth of the Parentheses Java 0ms 100%
Maximum Number of Balloons Java 2ms 92.98%
Maximum Number of Balls in a Box Java 13ms 97.88%
Maximum Number of Operations With the Same Score I Java 0ms 100%
Maximum Number of Pairs in Array Java 0ms 100%
Maximum Number of Words Found in Sentences Java 3ms 83.48%
Maximum Number of Words You Can Type Java 1ms 108%
Maximum Odd Binary Number Java 1ms 100%
Maximum Population Year Java 2ms 26.45%
Maximum Product Difference Between Two Pairs Java 2ms 98.79%
Maximum Product of Three Numbers Java 2ms 99.10%
Maximum Product of Two Digits Java 1ms 95.36%
Maximum Product of Two Elements in an Array Java 0ms 100%
Maximum Repeating Substring Java 0ms 100%
Maximum Score After Splitting a String Java 2ms 38.65%
Maximum Strong Pair XOR I Java 2ms 97.49%
Maximum Subarray With Equal Products Java 4ms 16.89%
Maximum Sum With Exactly K Elements Java 1ms 100%
Maximum Unique Subarray Sum After Deletion Java 1ms 99.89%
Maximum Units on a Truck Java 8ms 95.90%
Maximum Value of a String in an Array Java 0ms 100%
Maximum Value of an Ordered Triplet I Java 3ms 40.06%
Mean of Array After Removing Some Elements Java 3ms 97.86%
Merge Similar Items Java 3ms 98.07%
Merge Sorted Array Java 0ms 100%
Merge Strings Alternately Java 1ms 82.95%
Merge Two 2D Arrays by Summing Values Java 1ms 84.70%
Merge Two Binary Trees Java 0ms 100%
Merge Two Sorted Lists Java 0ms 100%
Middle of the Linked List Java 0ms 100%
Min Cost Climbing Stairs Java 0ms 100%
Min Max Game Java 1ms 64.55%
Minimize String Length Java 3ms 100%
Minimum Absolute Difference Java 17ms 91.38%
Minimum Absolute Difference in BST Java 0ms 100%
Minimum Amount of Time to Fill Cups Java 3ms 11.87%
Minimum Average of Smallest and Largest Elements Java 2ms 97.31%
Minimum Bit Flips to Convert Number Java 0ms 100%
Minimum Changes To Make Alternating Binary String Java 3ms 89.47%
Minimum Common Value Java 2ms 86.22%
Minimum Cost of Buying Candies With Discount Java 2ms 98.80%
Minimum Cost to Reach Every Position Java 1ms 96.63%
Minimum Deletions for At Most K Distinct Characters Java 2ms 97.55%
Minimum Depth of Binary Tree Java 2ms 89.35%
Minimum Difference Between Highest and Lowest of K Scores Java 5ms 97.12%
Minimum Distance Between BST Nodes Java 0ms 100%
Minimum Distance Between Three Equal Elements I Java 1ms 100%
Minimum Distance to the Target Element Java 0ms 100%
Minimum Element After Replacement With Digit Sum Java 1ms 100%
Minimum Index Sum of Two Lists Java 8ms 95.80%
Minimum Moves to Convert String Java 1ms 71.27%
Minimum Moves to Equal Array Elements III Java 1ms 98.80%
Minimum Number Game Java 3ms 41.37%
Minimum Number of Chairs in a Waiting Room Java 1ms 100%
Minimum Number of Flips to Reverse Binary String Java 1ms 99.99%
Minimum Number of Moves to Seat Everyone Java 1ms 100%
Minimum Number of Operations to Make Elements in Array Distinct Java 1ms 95.72%
Minimum Operations to Collect Elements Java 1ms 99.04%
Minimum Operations to Equalize Array Java 0ms 100%
Minimum Operations to Exceed Threshold Value I Java 0ms 100%
Minimum Operations to Make Array Sum Divisible by K Java 1ms 92.04%
Minimum Operations to Make Array Values Equal to K Java 1ms 100%
Minimum Operations to Make Columns Strictly Increasing Java 1ms 100%
Minimum Operations to Make the Array Increasing Java 3ms 87.17%
Minimum Pair Removal to Sort Array I Java 2ms 79.90%
Minimum Positive Sum Subarray Java 3ms 74.01%
Minimum Recolors to Get K Consecutive Black Blocks Java 0ms 100%
Minimum Right Shifts to Sort the Array Java 1ms 100%
Minimum String Length After Removing Substrings Java 5ms 56.70%
Minimum Subsequence in Non-Increasing Order Java 2ms 98.90%
Minimum Sum of Four Digit Number After Splitting Digits Java 0ms 100%
Minimum Sum of Mountain Triplets I Java 1ms 100%
Missing Number Java 0ms 100%
Modify the Matrix Java 1ms 100%
Monotonic Stack Java 1ms 98.82%
Most Common Word Java 17ms 43.61%
Most Frequent Even Element Java 6ms 99.88%
Most Frequent Number Following Key In an Array Java 1ms 100%
Move Zeroes Java 1ms 99.74%
N-Ary Tree Postorder Traversal Java 0ms 100%
N-Ary Tree Preorder Traversal Java 0ms 100%
N-Repeated Element in Size 2N Array Java 0ms 100%
N-th Tribonacci Number Java 0ms 100%
Neither Minimum nor Maximum Java 4ms 99.50%
Next Greater Element I Java 3ms 92.50%
Not Boring Movies SQL 495ms 47.80%
Number Complement Java 0ms 100%
Number of 1 Bits Java 0ms 100%
Number of Arithmetic Triplets Java 17ms 33.88%
Number of Beautiful Pairs Java 18ms 52.42%
Number of Bit Changes to Make Two Integers Equal Java 2ms 10.05%
Number of Changing Keys Java 1ms 100%
Number of Common Factors Java 1ms 44.28%
Number of Different Integers in a String Java 3ms 78.75%
Number of Distinct Averages Java 1ms 99.35%
Number of Employees Who Met the Target Java 0ms 100%
Number of Equivalent Domino Pairs Java 3ms 82.93%
Number of Even and Odd Bits Java 2ms 23.78%
Number of Good Pairs Java 0ms 100%
Number of Lines to Write String Java 0ms 100%
Number of Segments in a String Java 1ms 44.98%
Number of Senior Citizens Java 0ms 100%
Number of Steps to Reduce a Number to Zero Java 0ms 100%
Number of Strings That Appear as Substrings in Word Java 0ms 100%
Number of Students Doing Homework at a Given Time Java 0ms 100%
Number of Students Unable to Eat Lunch Java 0ms 100%
Number of Unequal Triplets in Array Java 5ms 85.76%
Number of Valid Words in a Sentence Java 8ms 76.44%
Occurrences After Bigram Java 0ms 100%
Odd String Difference Java 2ms 59.44%
Palindrome Linked List Java 4ms 83.80%
Palindrome Number Java 4ms 100%
Partition Array Into Three Equal Parts With Equal Sum Java 1ms 100%
Pascal's Triangle Java 0ms 100%
Pascal's Triangle II Java 1ms 66.61%
Pass the Pillow Java 0ms 100%
Path Crossing Java 1ms 99.70%
Path Sum Java 0ms 100%
Patients With a Condition SQL 386ms 29.66%
Percentage of Letter in String Java 0ms 100%
Perfect Number Java 2ms 83.64%
Permutation Difference between Two Strings Java 1ms 100%
Plus One Java 0ms 100%
Points That Intersect With Cars Java 2ms 74.65%
Positions of Large Groups Java 1ms 100%
Power of Four Java 0ms 100%
Power of Three Java 7ms 100%
Power of Two Java 0ms 100%
Prime Number of Set Bits in Binary Representation Java 66ms 10.43%
Prime in Diagonal Java 10ms 26.91%
Product Sales Analysis I SQL 1896ms 83.84%
Project Employees I SQL 1032ms 62.20%
Range Addition II Java 0ms 100%
Range Sum Query - Immutable Java 7ms 100%
Range Sum of BST Java 0ms 100%
Rank Transform of an Array Java 25ms 86.01%
Ransom Note Java 1ms 99.14%
Rearrange Characters to Make Target String Java 0ms 100%
Rearrange Spaces Between Words Java 2ms 75.99%
Recyclable and Low Fat Products SQL 501ms 52.32%
Redistribute Characters to Make All Strings Equal Java 2ms 94.26%
Reformat Date Java 1ms 97.59%
Reformat Phone Number Java 1ms 100%
Reformat the String Java 4ms 76.42%
Relative Ranks Java 9ms 61.66%
Relative Sort Array Java 0ms 100%
Remove All Adjacent Duplicates In String Java 36ms 48.71%
Remove Digit From Number to Maximize Result Java 2ms 72.81%
Remove Duplicates from Sorted Array Java 0ms 100%
Remove Duplicates from Sorted List Java 0ms 100%
Remove Element Java 0ms 100%
Remove Letter To Equalize Frequency Java 1ms 49.79%
Remove Linked List Elements Java 1ms 94%
Remove One Element to Make the Array Strictly Increasing Java 76ms 5.17%
Remove Outermost Parentheses Java 4ms 57.35%
Remove Trailing Zeros From a String Java 1ms 100%
Remove Zeros in Decimal Representation Java 1ms 98.59%
Repeated Substring Pattern Java 74ms 56.66%
Replace All ?'s to Avoid Consecutive Repeating Characters Java 1ms 100%
Replace All Digits with Characters Java 0ms 100%
Replace Elements with Greatest Element on Right Side Java 3ms 58.23%
Reshape the Matrix Java 0ms 100%
Restore Finishing Order Java 1ms 100%
Reverse Bits Java 2ms 10.28%
Reverse Degree of a String Java 1ms 100%
Reverse Linked List Java 0ms 100%
Reverse Only Letters Java 0ms 100%
Reverse Prefix of Word Java 1ms 52.92%
Reverse String Java 0ms 100%
Reverse String II Java 1ms 80.89%
Reverse Vowels of a String Java 4ms 50.91%
Reverse Words in a String III Java 4ms 86.63%
Richest Customer Wealth Java 0ms 100%
Rings and Rods Java 0ms 100%
Robot Return to Origin Java 2ms 100%
Root Equals Sum of Children Java 0ms 100%
Rotate String Java 0ms 100%
Row With Maximum Ones Java 1ms 100%
Running Sum of 1d Array Java 0ms 100%
Same Tree Java 0ms 100%
Score of a String Java 1ms 99.49%
Search Insert Position Java 0ms 100%
Search in a Binary Search Tree Java 0ms 100%
Second Largest Digit in a String Java 0ms 100%
Second Minimum Node In a Binary Tree Java 0ms 100%
Self Dividing Numbers Java 1ms 100%
Semi-Ordered Permutation Java 1ms 100%
Separate the Digits in an Array Java 5ms 74.92%
Set Mismatch Java 2ms 95.73%
Shift 2D Grid Java 12ms 8.53%
Shortest Completing Word Java 4ms 81.11%
Shortest Distance Target String in a Circular Array Java 0ms 100%
Shortest Distance to a Character Java 1ms 98.82%
Shortest Subarray With OR at Least K I Java 1ms 96.86%
Shuffle String Java 0ms 100%
Shuffle the Array Java 0ms 100%
Sign of the Product of an Array Java 0ms 100%
Single Number Java 1ms 99.93%
Slowest Key Java 1ms 99.66%
Smallest Absent Positive Greater Than Average Java 2ms 100%
Smallest Divisible Digit Product I Java 1ms 65.70%
Smallest Even Multiple Java 0ms 100%
Smallest Index With Digit Sum Equal to Index Java 1ms 99.99%
Smallest Index With Equal Value Java 0ms 100%
Smallest Missing Integer Greater Than Sequential Prefix Sum Java 1ms 92.66%
Smallest Missing Multiple of K Java 0ms 100%
Smallest Number With All Set Bits Java 1ms 30.35%
Snake in Matrix Java 2ms 91.68%
Sort Array By Parity Java 0ms 100%
Sort Array By Parity II Java 2ms 99.96%
Sort Array by Increasing Frequency Java 4ms 98.04%
Sort Even and Odd Indices Independently Java 4ms 52.74%
Sort Integers by Binary Reflection Java 12ms 73.27%
Sort Integers by The Number of 1 Bits Java 7ms 74.98%
Sort the People Java 4ms 97.69%
Sorting the Sentence Java 0ms 100%
Special Array I Java 0ms 100%
Special Positions in a Binary Matrix Java 2ms 83.84%
Split Strings by Separator Java 6ms 84.62%
Split With Minimum Sum Java 0ms 100%
Split a String in Balanced Strings Java 0ms 100%
Split the Array Java 0ms 100%
Sqrt(x) Java 1ms 86%
Squares of a Sorted Array Java 1ms 100%
Stone Removal Game Java 0ms 100%
String Matching in an Array Java 4ms 89.02%
Strong Password Checker II Java 1ms 67.43%
Student Attendance Record I Java 0ms 100%
Subarrays Distinct Element Sum of Squares I Java 3ms 98.91%
Substring Matching Pattern Java 2ms 48.35%
Substrings of Size Three with Distinct Characters Java 0ms 100%
Subtract the Product and Sum of Digits of an Integer Java 0ms 100%
Subtree of Another Tree Java 2ms 97.86%
Sum Multiples Java 3ms 63.36%
Sum of All Odd Length Subarrays Java 2ms 66.79%
Sum of All Subset XOR Totals Java 6ms 17.81%
Sum of Digits in Base K Java 0ms 100%
Sum of Digits of String After Convert Java 0ms 100%
Sum of Elements With Frequency Divisible by K Java 1ms 99.96%
Sum of Good Numbers Java 1ms 100%
Sum of Left Leaves Java 0ms 100%
Sum of Root To Leaf Binary Number Java 0ms 100%
Sum of Squares of Special Elements Java 1ms 100%
Sum of Unique Elements Java 0ms 100%
Sum of Values at Indices With K Set Bits Java 1ms 100%
Sum of Variable Length Subarrays Java 1ms 98.79%
Summary Ranges Java 5ms 80.55%
Swap Sex of Employees SQL 218ms 88.25%
Symmetric Tree Java 0ms 100%
Take Gifts From the Richest Pile Java 6ms 52.37%
Teemo Attacking Java 3ms 83.20%
The Employee That Worked on the Longest Task Java 1ms 100%
The K Weakest Rows in a Matrix Java 2ms 76.03%
The Latest Login in 2020 SQL 695ms 17.09%
The Two Sneaky Numbers of Digitville Java 1ms 100%
Third Maximum Number Java 1ms 97.13%
Thousand Separator Java 0ms 100%
Three Consecutive Odds Java 0ms 100%
Three Divisors Java 1ms 61.86%
Time Needed to Buy Tickets Java 0ms 100%
To Lower Case Java 0ms 100%
Toeplitz Matrix Java 0ms 100%
Transform Array by Parity Java 1ms 100%
Transformed Array Java 1ms 96.44%
Transpose Matrix Java 0ms 100%
Trionic Array I Java 0ms 100%
Truncate Sentence Java 1ms 79.33%
Two Furthest Houses With Different Colors Java 2ms 50.45%
Two Out of Three Java 1ms 100%
Two Sum Java 2ms 98.93%
Two Sum IV - Input is a BST Java 1ms 96.19%
Type of Triangle Java 1ms 39.67%
Ugly Number Java 0ms 100%
Uncommon Words from Two Sentences Java 3ms 50.44%
Unique 3-Digit Even Numbers Java 7ms 17.93%
Unique Email Addresses Java 5ms 99.15%
Unique Morse Code Words Java 1ms 100%
Unique Number of Occurrences Java 2ms 97.94%
Univalued Binary Tree Java 0ms 100%
Valid Anagram Java 1ms 99.65%
Valid Boomerang Java 0ms 100%
Valid Mountain Array Java 2ms 71.67%
Valid Palindrome Java 2ms 98.56%
Valid Palindrome II Java 4ms 99.71%
Valid Parentheses Java 2ms 97.66%
Valid Perfect Square Java 0ms 100%
Valid Word Java 1ms 99.05%
Verifying an Alien Dictionary Java 0ms 100%
Water Bottles Java 0ms 100%
Word Pattern Java 1ms 82.52%
XOR Operation in an Array Java 0ms 100%
X of a Kind in a Deck of Cards Java 2ms 98.93%
Zigzag Grid Traversal With Skip Java 1ms 100%

Medium

Question Submission Runtime Rank
3Sum Java 30ms 69.14%
Add Two Numbers Java 1ms 100%
Add Two Numbers II Java 3ms 39.24%
Adding Spaces to a String Java 11ms 98.01%
All Elements in Two Binary Search Trees Java 16ms 88.19%
All Paths From Source to Target Java 1ms 100%
Arithmetic Slices Java 0ms 100%
Balance a Binary Search Tree Java 2ms 95.99%
Beautiful Arrangement Java 39ms 69.34%
Beautiful Array Java 0ms 100%
Binary Search Tree Iterator Java 16ms 99.65%
Binary String With Substrings Representing 1 to N Java 0ms 100%
Binary Tree Level Order Traversal Java 1ms 89.68%
Binary Tree Level Order Traversal II Java 1ms 93.85%
Binary Tree Right Side View Java 1ms 71.44%
Binary Tree ZigZag Level Order Traversal Java 1ms 69.75%
Boats to Save People Java 6ms 98.19%
Build an Array With Stack Operations Java 0ms 100%
Bulls and Cows Java 1ms 100%
Calculate Score After Performing Instructions Java 1ms 100%
Check Completeness of a Binary Tree Java 0ms 100%
Check If Array Pairs Are Divisible by k Java 2ms 99.45%
Check If a String Contains All Binary Codes of Size K Java 138ms 67.85%
Check if Number is a Sum of Powers of Three Java 0ms 100%
Coin Change Java 24ms 31.86%
Coin Change II Java 7ms 71.94%
Combination Sum Java 1ms 99.89%
Combination Sum II Java 2ms 99.59%
Combination Sum III Java 0ms 100%
Combination Sum IV Java 1ms 71.15%
Combinations Java 17ms 86.97%
Compare Strings by Frequency of the Smallest Character Java 810ms 7.09%
Construct Binary Search Tree from Preorder Traversal Java 0ms 100%
Construct Binary Tree from Preorder and Inorder Traversal Java 1ms 95.87%
Container With Most Water Java 5ms 74.40%
Continuous Subarray Sum Java 24ms 67.47%
Convert Sorted List to Binary Search Tree Java 0ms 100%
Count Alternating Subarrays Java 3ms 95.26%
Count Beautiful Substrings I Java 51ms 81.88%
Count Complete Subarrays in an Array Java 24ms 39.10%
Count Days Without Meetings Java 37ms 86.60%
Count Good Nodes in Binary Tree Java 1ms 100%
Count Nice Pairs in an Array Java 31ms 92.75%
Count Number of Bad Pairs Java 45ms 23.08%
Count Number of Distinct Integers After Reverse Operations Java 33ms 98.46%
Count Number of Homogenous Substrings Java 11ms 55.99%
Count Number of Nice Subarrays Java 7ms 95.59%
Count Pairs That Form a Complete Day II Java 3ms 100%
Count Primes Java 94ms 82.87%
Count Subarrays With Majority Element I Java 34ms 79.84%
Count Substrings Starting and Ending with Given Character Java 1ms 100%
Count Substrings With K-Frequency Characters I Java 39ms 31.92%
Count Unhappy Friends Java 2ms 95.12%
Count of Substrings Containing Every Vowel and K Consonants I Java 8ms 61.03%
Count the Number of Special Characters II Java 35ms 49.81%
Custom Sort String Java 4ms 22.05%
Daily Temperatures Java 77ms 26.55%
Deepest Leaves Sum Java 1ms 100%
Delete Node in a BST Java 0ms 100%
Delete Node in a Linked List Java 0ms 100%
Delete Nodes From Linked List Present in Array Java 4ms 95.87%
Delete the Middle Node of a Linked List Java 3ms 99.75%
Design Add and Search Words Data Structure Java 162ms 94.15%
Design Browser History Java 69ms 15.58%
Design Circular Deque Java 5ms 26.13%
Design Circular Queue Java 4ms 100%
Design Front Middle Back Queue Java 8ms 34.76%
Design Linked List Java 6ms 99.03%
Design a Food Rating System Java 337ms 7.16%
Design a Number Container System Java 70ms 90.71%
Design a Stack With Increment Operation Java 5ms 91.76%
Diagonal Traverse Java 7ms 25.66%
Diagonal Traverse II Java 16ms 99.60%
Difference Between Ones and Zeros in Row and Column Java 9ms 78.44%
Distant Barcodes Java 15ms 83.05%
Divide Array In Sets of K Consecutive Numbers Java 215ms 39.47%
Divide Array Into Arrays With Max Difference Java 7ms 100%
Divide Players Into Teams of Equal Skill Java 5ms 96.36%
Divide Two Integers Java 4ms 5.52%
Double a Number Represented as a Linked List Java 18ms 15.32%
Employee Importance Java 4ms 99.25%
Elimination Game Java 1ms 100%
Equal Row and Column Pairs Java 12ms 88.41%
Even Odd Tree Java 17ms 23.05%
Extra Characters in a String Java 46ms 87.58%
Factorial Trailing Zeroes Java 0ms 100%
Find All Anagrams in a String Java 9ms 91.31%
Find All Duplicates in an Array Java 5ms 94.05%
Find All Lonely Numbers in the Array Java 12ms 99.88%
Find Bottom Left Tree Value Java 0ms 100%
Find Consecutive Integers from a Data Stream Java 26ms 68.56%
Find Eventual Safe States Java 3ms 99.90%
Find First and Last Position of Element in Sorted Array Java 0ms 100%
Find Good Days to Rob the Bank Java 5ms 88.83%
Find K Closest Elements Java 4ms 96.68%
Find Largest Value in Each Tree Row Java 2ms 80.79%
Find Longest Special Substring That Occurs Thrice I Java 35ms 27.51%
Find Minimum in Rotated Sorted Array Java 0ms 100%
Find Occurrences of an Element in an Array Java 5ms 90.21%
Find Original Array From Doubled Array Java 56ms 86.73%
Find Peak Element Java 0ms 100%
Find Players With Zero or One Losses Java 44ms 93.03%
Find Three Consecutive Integers That Sum to a Given Number Java 0ms 100%
Find Triangular Sum of an Array Java 48ms 29.56%
Find Unique Binary String Java 0ms 100%
Find the Divisibility Array of a String Java 7ms 83.98%
Find the Duplicate Number Java 4ms 88.75%
Find the First Player to win K Games in a Row Java 1ms 100%
Find the Kth Largest Integer in the Array Java 16ms 95.51%
Find the Minimum Number of Fibonacci Numbers Whose Sum Is K Java 2ms 58.72%
Find the Minimum and Maximum Number of Nodes Between Critical Points Java 4ms 100%
Find the Most Common Response Java 143ms 51.44%
Find the N-th Value After K Seconds Java 196ms 78.19%
Find the Power of K-Size Subarrays I Java 1ms 100%
Find the Power of K-Size Subarrays II Java 3ms 100%
Find the Prefix Common Array of Two Arrays Java 3ms 60.99%
Find the Winner of an Array Game Java 0ms 100%
Finding Pairs With a Certain Sum Java 153ms 42.29%
First Completely Painted Row or Column Java 4ms 94.20%
Flatten Binary Tree to Linked List Java 1ms 18.41%
Frequency Tracker Java 44ms 49.19%
Frequency of the Most Frequent Element Java 11ms 99.39%
Generate Binary Strings Without Adjacent Zeros Java 2ms 90.13%
Generate Parentheses Java 0ms 100%
Group Anagrams Java 7ms 65.30%
Group the People Given the Group Size They Belong To Java 8ms 51.20%
Hand of Straights Java 63ms 27.26%
Implement Trie (Prefix Tree) Java 33ms 85.89%
Insert Delete GetRandom O(1) Java 25ms 98.76%
Insert Greatest Common Divisors in Linked List Java 2ms 57.29%
Insert Interval Java 2ms 31.53%
Insert into a Binary Search Tree Java 0ms 100%
Insertion Sort List Java 28ms 8.25%
Invalid Transactions Java 77ms 16.45%
Jump Game Java 2ms 84.17%
K Closest Points to Origin Java 30ms 63.52%
K-diff Pairs in an Array Java 11ms 59.51%
K-th Smallest Prime Fraction Java 344ms 44.26%
Kth Largest Element in an Array Java 3ms 98.86%
Kth Largest Sum in a Binary Tree Java 45ms 83.54%
Kth Smallest Element In A Sorted Matrix Java 11ms 65.35%
Kth Smallest Element in a BST Java 0ms 100%
Largest Palindromic Number Java 10ms 80.47%
Least Number of Unique Integers after K Removals Java 38ms 93.18%
Length of the Longest Alphabetical Continuous Substring Java 11ms 80.20%
Letter Case Permutation Java 3ms 47.09%
Letter Combinations of a Phone Number Java 0ms 100%
Lexicographically Minimum String After Removing Stars Java 102ms 86.78%
Linked List Components Java 1ms 100%
Linked List Cycle II Java 0ms 100%
Linked List Random Node Java 9ms 100%
Longest Arithmetic Subsequence Java 383ms 69.83%
Longest Balanced Subarray I Java 157ms 93.88%
Longest Consecutive Sequence Java 31ms 56.92%
Longest Mountain in Array Java 2ms 99.72%
Longest Palindromic Substring Java 18ms 51.89%
Longest Substring Of All Vowels in Order Java 19ms 77.61%
Longest Substring Without Repeated Characters Java 6ms 70.55%
Longest Univalue Path Java 2ms 95.73%
Lowest Common Ancestor of a Binary Search Tree Java 5ms 100%
Lowest Common Ancestor of a Binary Tree Java 6ms 100%
Majority Element II Java 12ms 38.35%
Make Number of Distinct Characters Equal Java 13ms 39.22%
Map Sum Pairs Java 10ms 97.30%
Max Number of K-Sum Pairs Java 24ms 45.50%
Max Sum of a Pair With Equal Sum of Digits Java 54ms 36.20%
Maximal Score After Applying K Operations Java 130ms 63.04%
Maximum Binary Tree Java 1ms 100%
Maximum Consecutive Floors Without Special Floors Java 30ms 94.41%
Maximum Difference Between Node and Ancestor Java 0ms 100%
Maximum Distance in Arrays Java 6ms 87.20%
Maximum Gap Java 11ms 93.10%
Maximum Ice Cream Bars Java 6ms 88.17%
Maximum Length of Pair Chain Java 9ms 80.63%
Maximum Length of Repeated Subarray Java 24ms 66.86%
Maximum Length of a Concatenated String with Unique Characters Java 11ms 60.59%
Maximum Level Sum of a Binary Tree Java 8ms 89.06%
Maximum Matching of Players With Trainers Java 26ms 61.51%
Maximum Number of Occurrences of a Substring Java 37ms 75.61%
Maximum Number of Vowels in a Substring of Given Length Java 13ms 73.89%
Maximum Points You Can Obtain from Cards Java 2ms 98.84%
Maximum Prime Difference Java 0ms 100%
Maximum Product After K Increments Java 291ms 48.57%
Maximum Product Subarray Java 1ms 90.84%
Maximum Product of Word Lengths Java 242ms 19.79%
Maximum Subarray Java 1ms 99.51%
Maximum Sum With at Most K Elements Java 245ms 26.60%
Maximum Sum of Distinct Subarrays With Length K Java 4ms 99.46%
Maximum Twin Sum of a Linked List Java 5ms 65.21%
Merge In Between Linked Lists Java 2ms 31.02%
Merge Intervals Java 7ms 97.71%
Merge Nodes in Between Zeros Java 5ms 83.64%
Min Stack Java 4ms 97.18%
Minimize Maximum Pair Sum in Array Java 12ms 96.61%
Minimum Absolute Difference Between Mirror Pairs Java 48ms 92.88%
Minimum Add to Make Parentheses Valid Java 1ms 51.13%
Minimum Consecutive Cards to Pick Up Java 16ms 96.94%
Minimum Distance Between Three Equal Elements II Java 58ms 93.75%
Minimum Increment to Make Array Unique Java 10ms 90.87%
Minimum Moves to Equal Array Elements II Java 11ms 12.02%
Minimum Number of Steps to Make Two Strings Anagram Java 6ms 98.87%
Minimum Number of Steps to Make Two Strings Anagram II Java 11ms 96.36%
Minimum Number of Vertices to Reach All Nodes Java 8ms 99.23%
Minimum Operations to Exceed Threshold Value II Java 144ms 74.64%
Minimum Operations to Half Array Sum Java 172ms 82.34%
Minimum Operations to Make Binary Array Elements Equal to One I Java 7ms 57.49%
Minimum Path Sum Java 3ms 71.06%
Minimum Size Subarray Sum Java 1ms 99.72%
Minimum Sum of Mountain Triplets II Java 2ms 100%
Most Frequent Subtree Sum Java 3ms 98.36%
My Calendar I Java 19ms 83.88%
N-Ary Tree Level Order Traversal Java 3ms 71.32%
Next Greater Element II Java 9ms 94.03%
Next Greater Node In Linked List Java 16ms 92.23%
Non-decreasing Array Java 0ms 100%
Non-decreasing Subsequences Java 9ms 60.28%
Non-overlapping Intervals Java 46ms 82.48%
Number of Matching Subsequences Java 55ms 74.33%
Number of Pairs of Strings With Concatenation Equal to Target Java 3ms 91.55%
Number of Provinces Java 1ms 88.40%
Number of Smooth Descent Periods of a Stock Java 2ms 98.50%
Number of Sub-arrays of Size K and Average Greater than or Equal to Threshold Java 2ms 99.85%
Number of Subarrays With GCD Equal to K Java 5ms 91.72%
Number of Subarrays With LCM Equal to K Java 14ms 61.11%
Number of Subarrays with Bounded Maximum Java 3ms 99.79%
Number of Substrings Containing All Three Characters Java 15ms 42.72%
Number of Substrings With Only 1s Java 4ms 88.42%
Number of Zero-Filled Subarrays Java 3ms 95.56%
Pair of Songs With Total Durations Divisible by 60 Java 2ms 96.88%
Palindrome Partitioning Java 7ms 96.05%
Palindromic Substrings Java 5ms 96.54%
Partition Array According to Given Pivot Java 5ms 75.52%
Partition List Java 0ms 100%
Path Sum II Java 1ms 99.84%
Path Sum III Java 19ms 28.31%
Peak Index in a Mountain Array Java 0ms 100%
People Whose List of Favourite Companies Is Not a Subset of Another List Java 279ms 66.51%
Permutation in String Java 6ms 86.31%
Permutations Java 1ms 92.71%
Permutations II Java 1ms 99.88%
Populating Next Right Pointers in Each Node Java 3ms 35.47%
Populating Next Right Pointers in Each Node II Java 2ms 37.45%
Pow(x, n) Java 0ms 100%
Prime Pairs With Target Sum Java 132ms 74.11%
Print Words Vertically Java 1ms 80.69%
Product of Array Except Self Java 2ms 89.32%
Product of the Last K Numbers Java 16ms 100%
Random Pick Index Java 58ms 99.02%
Random Pick with Weight Java 21ms 99.89%
Rank Teams by Votes Java 5ms 84.98%
Reachable Nodes With Restrictions Java 47ms 87.43%
Rearrange Array Elements by Sign Java 3ms 100%
Rearrange Words in a Sentence Java 22ms 87.96%
Reconstruct Original Digits from English Java 4ms 78.33%
Recover Binary Search Tree Java 1ms 100%
Reduce Array Size to The Half Java 17ms 92.02%
Reduction Operations to Make the Array Elements Equal Java 34ms 70.37%
Remove All Adjacent Duplicates In String II Java 31ms 52.93%
Remove Duplicate Letters Java 2ms 94.48%
Remove Duplicates from Sorted List II Java 0ms 100%
Remove Nodes From Linked List Java 7ms 73.29%
Remove Nth Node From End of List Java 0ms 100%
Remove Stones to Minimize the Total Java 335ms 88.82%
Remove Zero Sum Consecutive Nodes from Linked List Java 2ms 91.55%
Removing Minimum and Maximum From Array Java 2ms 100%
Removing Stars From a String Java 30ms 87.41%
Reorder List Java 4ms 12.39%
Reorganize String Java 3ms 65.10%
Repeated DNA Sequences Java 19ms 54.02%
Repeated String Match Java 269ms 25.27%
Replace Elements in an Array Java 13ms 98.85%
Replace Words Java 46ms 44.44%
Report Spam Message Java 38ms 97.12%
Restore the Array From Adjacent Pairs Java 99ms 66.23%
Resulting String After Adjacent Removals Java 81ms 93.01%
Reverse Integer Java 0ms 100%
Reverse Linked List II Java 0ms 100%
Reverse Odd Levels of Binary Tree Java 0ms 100%
Reverse Words in a String Java 6ms 86.18%
Reward Top K Students Java 65ms 86.25%
Rotate Array Java 0ms 100%
Rotate List Java 0ms 100%
Search Suggestions System Java 38ms 36.75%
Search a 2D Matrix Java 0ms 100%
Search a 2D Matrix II Java 5ms 99.37%
Search in Rotated Sorted Array Java 0ms 100%
Search in Rotated Sorted Array II Java 0ms 100%
Seat Reservation Manager Java 33ms 89.31%
Second Highest Salary SQL 480ms 64.38%
Sender With Largest Word Count Java 49ms 78.74%
Serialize and Deserialize BST Java 10ms 39.11%
Set Matrix Zeroes Java 1ms 73.86%
Shortest Unsorted Continuous Array Java 1ms 91.16%
Shuffle an Array Java 51ms 80.62%
Simple Bank System Java 95ms 96.22%
Simplify Path Java 5ms 51.87%
Single Element in a Sorted Array Java 0ms 100%
Sliding Subarray Beauty Java 41ms 36.53%
Smallest Number in Infinite Set Java 16ms 33.15%
Smallest Palindromic Rearrangement I Java 43ms 36.19%
Smallest String Starting From Leaf Java 1ms 99.86%
Smallest Subsequence of Distinct Characters Java 2ms 98.61%
Smallest Value of the Rearranged Number Java 0ms 100%
Sort Characters By Frequency Java 8ms 87.71%
Sort Colors Java 0ms 100%
Sort Integers by The Power Value Java 36ms 82.14%
Sort List Java 9ms 94.52%
Sort Matrix by Diagonals Java 5ms 58.74%
Sort Vowels in a String Java 74ms 27.49%
Sort an Array Java 5ms 97.68%
Sort the Matrix Diagonally Java 2ms 96.51%
Sort the Students by Their Kth Score Java 2ms 94.15%
Spiral Matrix Java 0ms 100%
Statistics from a Large Sample Java 1ms 99%
Stock Price Fluctuation Java 109ms 52.64%
Strictly Palindromic Number Java 0ms 100%
String Without AAA or BBB Java 0ms 100%
Subarray Product Less Than K Java 4ms 99.98%
Subarray Sum Equals K Java 24ms 75.04%
Subsets Java 0ms 100%
Subsets II Java 1ms 99.93%
Sum Root to Leaf Numbers Java 0ms 100%
Sum in a Matrix Java 13ms 99.35%
Sum of Absolute Differences in a Sorted Array Java 5ms 44.72%
Sum of Beauty of All Substrings Java 1153ms 5.02%
Sum of Even Numbers After Queries Java 4ms 99.66%
Sum of Matrix After Queries Java 3ms 100%
Sum of Square Numbers Java 3ms 93.35%
Sum of Two Integers Java 0ms 100%
Swap Nodes in Pairs Java 0ms 100%
Swapping Nodes in a Linked List Java 2ms 53.34%
Top K Frequent Elements Java 6ms 99.18%
Top K Frequent Words Java 6ms 98%
Total Characters in String After Transformations I Java 141ms 42.47%
Two Sum II - Input Array Is Sorted Java 2ms 92.54%
Ugly Number II Java 2ms 98.25%
Unique Paths Java 0ms 100%
Unique Paths II Java 0ms 100%
Validate Binary Search Tree Java 2ms 98.25%
Wiggle Sort II Java 3ms 96.79%
Word Break Java 1ms 99.36%
Word Subsets Java 14ms 45.41%

Hard

Question Submission Runtime Rank
Bus Routes Java 49ms 79.54%
Find K-th Smallest Pair Distance Java 7ms 81.55%
Find Median from Data Stream Java 99ms 63.65%
Find Minimum in Rotated Sorted Array II Java 0ms 100%
Find in Mountain Array Java 0ms 100%
First Missing Positive Java 1ms 100%
Insert Delete GetRandom O(1) - Duplicates allowed Java 31ms 84.09%
Make Array Empty Java 51ms 84.31%
Merge k Sorted Lists Java 4ms 74%
Minimum Window Substring Java 14ms 70.35%
Number of Visible People in a Queue Java 63ms 34.82%
Permutation Sequence Java 511ms 14.28%
Random Pick with Blacklist Java 43ms 83.32%
Reverse Nodes in k-Group Java 1ms 30.85%
Serialize and Deserialize Binary Tree Java 17ms 39.28%
Sliding Window Maximum Java 7ms 99.46%

Releases

No releases published

Packages

No packages published

Languages