1 |
Jewels and Stones |
Easy |
Divide and Conquer |
JewelsAndStones.java |
2 |
Range Sum of BST |
Easy |
Tree |
RangeSumOfBST.java |
3 |
To Lower Case |
Easy |
String |
ToLowerCase.java |
4 |
Unique Morse Code Words |
Easy |
String |
UniqueMorseCodeWords.java |
5 |
N-Repeated Element in Size 2N Array |
Easy |
Array |
NRepeatedElementInSize2NArray.java |
6 |
Sort Array By Parity |
Easy |
Array |
SortArrayByParity.java |
7 |
Unique Email Addresses |
Easy |
String |
UniqueEmailAddresses.java |
8 |
Squares of a Sorted Array |
Easy |
Sort |
SquaresOfASortedArray.java |
9 |
Flipping an Image |
Easy |
Array |
FlippingAnImage.java |
10 |
Hamming Distance |
Easy |
Bit Manipulation |
HammingDistance.java |
11 |
DI String Match |
Easy |
String |
DIStringMatch.java |
12 |
Merge Two Binary Trees |
Easy |
Tree |
MergeTwoBinaryTrees.java |
13 |
Self Dividing Numbers |
Easy |
Math |
SelfDividingNumbers.java |
14 |
Peak Index in a Mountain Array |
Easy |
Array |
PeakIndexInAMountainArray.java |
15 |
Array Partition I |
Easy |
Array |
ArrayPartitionI.java |
16 |
Search in a Binary Search Tree |
Easy |
Binary Search |
SearchInABinarySearchTree.java |
17 |
Sort Array By Parity II |
Easy |
Sort |
SortArrayByParityII.java |
18 |
Fibonacci Number |
Easy |
Array |
FibonacciNumber.java |
19 |
Available Captures for Rook |
Easy |
Array |
AvailableCapturesForRook.java |
20 |
Find Common Characters |
Easy |
Array |
FindCommonCharacters.java |
21 |
Sum of Even Numbers After Queries |
Easy |
Queue |
SumOfEvenNumbersAfterQueries.java |
22 |
Middle of the Linked List |
Easy |
Linked List |
MiddleOfTheLinkedList.java |
23 |
Reverse String |
Easy |
String |
ReverseString.java |
24 |
Single Number |
Easy |
Hash Table |
SingleNumber.java |
25 |
Reverse Linked List |
Easy |
Linked List |
ReverseLinkedList.java |
26 |
Move Zeroes |
Easy |
Array |
MoveZeroes.java |
27 |
Find All Numbers Disappeared in an Array |
Easy |
Array |
FindAllNumbersDisappearedInAnArray.java |
28 |
Majority Element |
Easy |
Array |
MajorityElement.java |
29 |
Roman to Integer |
Easy |
Math |
RomanToInteger.java |
30 |
Valid Anagram |
Easy |
Hash Table |
ValidAnagram.java |
31 |
Two Sum II - Input array is sorted |
Easy |
Two-pointers |
TwoSumII.java |
32 |
Two Sum |
Easy |
Two-pointers |
TwoSum.java |
32 |
Palindrome Number |
Easy |
Math |
PalindromeNumber.java |
33 |
Remove Duplicates from Sorted Array |
Easy |
Sort |
RemoveDuplicatesFromSortedArray.java |
34 |
Find All Anagrams in a String |
Easy |
String |
FindAllAnagramsInAString.java |
35 |
Valid Parentheses |
Easy |
Stack |
ValidParentheses.java |
36 |
Shortest Unsorted Continuous Subarray |
Easy |
Array |
ShortestUnsortedContinuousSubarray.java |
37 |
Rotate Array |
Easy |
Array |
RotateArray.java |
38 |
Reverse Integer |
Easy |
Math |
ReverseInteger.java |
39 |
N-ary Tree Preorder Traversal |
Easy |
Tree |
NAryTreePreorderTraversal.java |
40 |
Implement Queue using Stacks |
Easy |
Queue |
ImplementQueueUsingStacks.java |
41 |
Implement Stack using Queues |
Easy |
Stack |
ImplementStackUsingQueues.java |
42 |
Lemonade Change |
Easy |
Queue |
LemonadeChange.java |
43 |
Min Stack |
Easy |
Stack |
MinimumStack.java |
44 |
Climbing Stairs |
Easy |
Dynamic Programming |
ClimbingStairs.java |
45 |
Binary Search |
Easy |
Binary Search |
BinarySearch.java |
46 |
First Bad Version |
Easy |
Binary Search |
FirstBadVersion.java |
47 |
Valid Perfect Square |
Easy |
Math |
ValidPerfectSquare.java |
48 |
Sqrt(x) |
Easy |
Math |
Sqrt.java |
49 |
Search Insert Position |
Easy |
Binary Search |
SearchInsertPosition.java |
50 |
Non-decreasing Array |
Easy |
Array |
NonDecreasingArray.java |
51 |
Monotonic Array |
Easy |
Array |
MonotonicArray.java |
52 |
Valid Mountain Array |
Easy |
Array |
ValidMountainArray.java |
53 |
Univalued Binary Tree |
Easy |
Binary Search |
UnivaluedBinaryTree.java |
54 |
Invert Binary Tree |
Easy |
Binary Search |
InvertBinarySearch.java |
55 |
Max Increase to Keep City Skyline |
Medium |
Array |
MaxIncreaseKeepingSkyline.java |
56 |
Encode and Decode TinyURL |
Medium |
Hash Table |
Codec.java |
57 |
Reveal Cards In Increasing Order |
Medium |
Array |
RevealCardsInIncreasingOrder.java |
58 |
Sort an Array |
Medium |
Sort |
SortAnArray.java |
59 |
Find All Duplicates in an Array |
Medium |
Array |
FindAllDuplicatesInAnArray.java |
60 |
Single Element in a Sorted Array |
Medium |
Sort |
SingleElementInASortedArray.java |
61 |
Remove Duplicates from Sorted Array II |
Medium |
Array |
RemoveDuplicatesFromSortedArrayII.java |
62 |
Capacity To Ship Packages Within D Days (TODO) |
Medium |
Binary Search |
CapacityShipWithinDays.java |
63 |
Kth Smallest Element in a BST |
Medium |
Binary Search |
KthSmallest.java |
64 |
Time Based Key-Value Store |
Medium |
Binary Search |
TimeMap.java |
65 |
Longest Palindromic Substring |
Medium |
String |
LongestPalindromicSubstring.java |
66 |
Longest Substring Without Repeating Characters |
Medium |
String |
LongestSubstring.java |
67 |
Find First and Last Position of Element in Sorted Array |
Medium |
Array |
FirstAndLastIndices.java |
68 |
Count Primes |
Easy |
Math |
CountPrimes.java |
69 |
Minimum Size Subarray Sum |
Medium |
Array |
MinimumSizeSubarraySum.java |
70 |
Word Search |
Medium |
Array |
WordSearch.java |
71 |
Intersection of Linked Lists |
Easy |
Linked list |
IntersectionOfTwoLinkedLists.java |
72 |
House Robber |
Easy |
Dynamic Programming |
HouseRobber.java |
73 |
Time Based Key-Value Store (TODO) |
Medium |
Binary Search |
TimeMap.java |
74 |
Find Mode In Binary Search Tree |
Easy |
Binary Search |
FindModeInBinarySearchTree.java |
75 |
Kth Largest Element in an Array |
Medium |
Heap |
KthLargestElementInAList.java |
76 |
Remove Nth Node From End of List |
Medium |
Linked List |
RemoveNthNodeFromEndOfList.java |
77 |
Add Two Numbers |
Medium |
Linked List |
AddTwoNumbers.java |
78 |
Remove Zero Sum Consecutive Nodes from Linked List |
Medium |
Linked List |
RemoveZeroSumSublists.java |
79 |
Buddy Strings |
Easy |
String |
BuddyStrings.java |
80 |
Validate Binary Search Tree |
Medium |
Tree |
ValidateBinarySearchTree.java |
81 |
Convert Sorted List to Binary Search Tree |
Medium |
Tree |
ConvertSortedListToBinarySearchTree.java |
82 |
Maximum Product of Three Numbers |
Easy |
Math |
MaximumProductOfThreeNumbers.java |
83 |
Sort Colors |
Medium |
Sort |
SortColors.java |
84 |
Maximum Binary Tree |
Medium |
Tree |
MaximumBinaryTree.java |
85 |
Merge Intervals |
Medium |
Sort |
MergeIntervals.java |
86 |
Construct Binary Tree from Preorder and Inorder Traversal |
Medium |
Tree |
ConstructBinaryTreeFromPreorderAndInorderTraversal.java |
87 |
Reverse Words in a String |
Medium |
String |
ReverseWordsInAString.java |
88 |
Group Anagrams |
Medium |
Hash Table |
GroupAnagrams.java |
89 |
Product of Array Except Self |
Medium |
Array |
ProductOfArrayExceptSelf.java |
90 |
Continuous Subarray Sum |
Medium |
Math |
ContinuousSubarraySum.java |
91 |
Maximum Subarray |
Easy |
Dynamic Programming |
MaximumSubarray.java |
92 |
3Sums |
Medium |
Array |
ThreeSum.java |
93 |
Construct Binary Tree from Preorder and Postorder Traversal |
Medium |
Tree |
ConstructBinaryTreeFromPreorderAndPostorderTraversal.java |
94 |
Construct Binary Tree from Inorder and Postorder Traversal |
Medium |
Tree |
ConstructBinaryTreeFromPreorderAndPostorderTraversal.java |
95 |
Symmetric Tree |
Easy |
Tree |
SymmetricTree.java |
96 |
H-Index |
Medium |
Array |
HIndex.java |
97 |
Valid Palindrome |
Easy |
String |
ValidPalindrome.java |
98 |
Largest Number |
Medium |
Sort |
LargestNumber.java |
99 |
Number of 1 Bits |
Easy |
Bit Manipulation |
NumberOf1Bits.java |