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 entries were used to solve challenges listed in my Programming repository.

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

Umar's LeetCode Statistics

Easy

Question Submission Runtime Rank
Add Binary Java 5ms 19%
Add Digits Java 0ms 100%
Alternating Digit Sum Java 0ms 100%
Apply Operations to an Array Java 1ms 95.99%
Base 7 Java 1ms 70.47%
Best Time To Buy And Sell Stock Java 2ms 72.40%
Binary Number with Alternating Bits Java 1ms 10.77%
Binary Search Java 0ms 100%
Check if All Characters Have Equal Number of Occurrences Java 1ms 100%
Check if Every Row and Column Contains All Numbers Java 4ms 92.01%
Check if Matrix Is X-Matrix Java 0ms 100%
Check If N And Its Double Exist Java 2ms 94.12%
Concatenation of Array Java 1ms 96.28%
Contains Duplicate Java 10ms 88.34%
Contains Duplicate II Java 18ms 82.31%
Convert Binary Number in a Linked List to Integer Java 0ms 100%
Convert Date to Binary Java 4ms 66.45%
Convert the Temperature Java 0ms 100%
Count Integers With Even Digit Sum Java 1ms 86.87%
Count Negative Numbers In A Sorted Matrix Java 0ms 100%
Count the Number of Consistent Strings Java 6ms 86.92%
Counting Bits Java 10ms 9.36%
Destination City Java 2ms 100%
Difference Between Element Sum and Digit Sum of an Array Java 2ms 98.35%
Faulty Keyboard Java 3ms 98.26%
Fibonacci Number Java 0ms 100%
Find All Numbers Disappeared In An Array Java 3ms 99.85%
Find Indices of Stable Mountains Java 1ms 100%
Find Letter to Appear Twice Java 0ms 100%
Find Numbers with Even Number of Digits Java 1ms 98.93%
Find Pivot Index Java 1ms 94.56%
Find the Difference Java 2ms 62.27%
Find the Difference of Two Arrays Java 11ms 45.10%
Find the Distinct Difference Array Java 5ms 93.20%
Find the Highest Altitude Java 0ms 100%
Find the Index of the First Occurrence in a String Java 0ms 100%
Find the Middle Index in Array Java 0ms 100%
Find the Peaks Java 1ms 100%
First Bad Version Java 24ms 98.13%
First Unique Character in a String Java 5ms 93.93%
FizzBuzz Java 1ms 99.29%
Happy Number Java 0ms 100%
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%
Intersection of Multiple Arrays Java 2ms 100%
Intersection of Two Arrays Java 1ms 98.70%
Intersection of Two Arrays II Java 1ms 98.45%
Is Subsequence Java 1ms 93.37%
Isomorphic Strings Java 13ms 52.01%
Kth Missing Positive Number Java 2ms 11.57%
Left and Right Sum Differences Java 2ms 98.18%
Linked List Cycle Java 0ms 100%
Longest Common Prefix Java 1ms 64.40%
Majority Element Java 2ms 99.80%
Matrix Diagonal Sum Java 0ms 100%
Maximum Count of Positive Integer and Negative Integer Java 0ms 100%
Maximum Depth of Binary Tree Java 0ms 100%
Merge Two Sorted Lists Java 0ms 100%
Middle of the Linked List Java 0ms 100%
Minimum Common Value Java 2ms 86.22%
Missing Number Java 1ms 36.78%
Most Frequent Even Element Java 12ms 93.70%
Move Zeroes Java 1ms 99.85%
Next Greater Element I Java 3ms 92.50%
Number of 1 Bits Java 0ms 100%
Number of Common Factors Java 1ms 44.28%
Palindrome Number Java 6ms 30.91%
Percentage of Letter in String Java 0ms 100%
Permutation Difference between Two Strings Java 1ms 100%
Power of Four Java 0ms 100%
Power of Three Java 7ms 100%
Power of Two Java 0ms 100%
Range Sum Query - Immutable Java 8ms 65.10%
Ransom Note Java 1ms 99.52%
Remove Duplicates from Sorted Array Java 1ms 64.98%
Remove Element Java 0ms 100%
Remove Linked List Elements Java 1ms 94%
Reverse Linked List Java 4ms 98.74%
Reverse String Java 0ms 100%
Reverse Vowels of a String Java 4ms 50.91%
Richest Customer Wealth Java 0ms 100%
Row With Maximum Ones Java 5ms 27.61%
Running Sum of 1d Array Java 0ms 100%
Search Insert Position Java 0ms 100%
Separate the Digits in an Array Java 5ms 74.92%
Set Mismatch Java 2ms 95.73%
Smallest Even Multiple Java 0ms 100%
Smallest Missing Integer Greater Than Sequential Prefix Sum Java 1ms 92.66%
Sort the People Java 0ms 94.45%
Sqrt(x) Java 1ms 87.09%
Squares of a Sorted Array Java 1ms 100%
Sum of Digits in Base K Java 0ms 100%
Sum of Digits of String After Convert Java 1ms 89.59%
Sum of Squares of Special Elements Java 1ms 100%
Sum of Unique Elements Java 0ms 100%
Third Maximum Number Java 6ms 25.57%
Three Divisors Java 1ms 61.86%
To Lower Case Java 0ms 100%
Two Sum Java 1ms 98.25%
Ugly Number Java 0ms 100%
Valid Anagram Java 3ms 90.36%
Valid Palindrome Java 4ms 54.42%
Valid Parentheses Java 2ms 97.66%
Valid Perfect Square Java 0ms 100%
Word Pattern Java 1ms 82.52%
XOR Operation in an Array Java 0ms 100%
Zigzag Grid Traversal With Skip Java 1ms 100%
Article Views I SQL 619ms 51.14%
Big Countries SQL 461ms 66.33%
Biggest Single Number SQL 406ms 82.18%
Classes More Than 5 Students SQL 471ms 96.18%
Combine Two Tables SQL 629ms 96.12%
Customers Placing The Largest Number Of Orders SQL 799ms 87.57%
Customers Who Never Order SQL 908ms 93.29%
Duplicate Emails SQL 865ms 11.83%
Employee Bonus SQL 1659ms 64.38%
Employees Earning More Than Their Managers SQL 1429ms 10.98%
Not Boring Movies SQL 495ms 47.80%
Product Sales Analysis I SQL 1896ms 83.84%
Project Employees I SQL 1032ms 62.20%

Medium

Question Submission Runtime Rank
Add Two Numbers Java 11ms 4.35%
Check if Number is a Sum of Powers of Three Java 0ms 100%
Container With Most Water Java 5ms 74.40%
Count Primes Java 94ms 82.87%
Daily Temperatures Java 77ms 31.05%
Divide Two Integers Java 4ms 5.66%
Find All Anagrams in a String Java 9ms 91.31%
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 Minimum in Rotated Sorted Array Java 0ms 100%
Find Peak Element Java 0ms 100%
Find the Duplicate Number Java 4ms 88.06%
Kth Largest Element In An Array Java 39ms 73.11%
Kth Smallest Element In A Sorted Matrix Java 15ms 55.37%
Longest Substring Without Repeated Characters Java 6ms 70.02%
Majority Element II Java 10ms 45.32%
Next Greater Element II Java 9ms 94.03%
Peak Index in a Mountain Array Java 0ms 100%
Product of Array Except Self Java 2ms 89.32%
Reverse Integer Java 0ms 100%
Search in Rotated Sorted Array Java 0ms 100%
Search in Rotated Sorted Array II Java 0ms 100%
Set Matrix Zeroes Java 1ms 73.86%
Smallest Number in Infinite Set Java 16ms 33.15%
Sort Characters By Frequency Java 13ms 74.79%
Sort an Array Java 41ms 26.79%
Spiral Matrix Java 0ms 100%
Sum of Square Numbers Java 3ms 93.35%
Sum of Two Integers Java 0ms 100%
Top K Frequent Elements Java 14ms 57.29%
Top K Frequent Words Java 6ms 98.00%
Two Input Sum II - Input Array Is Sorted Java 2ms 93.40%
Ugly Number II Java 2ms 98.25%
Second Highest Salary SQL 480ms 64.38%

Hard

Question Submission Runtime Rank
Find in Mountain Array Java 0ms 100%
First Missing Positive Java 1ms 100%
Merge k Sorted Lists Java 5ms 35.39%