Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Leet Code

Download as xlsx, pdf, or txt
Download as xlsx, pdf, or txt
You are on page 1of 12

Title Solutions

Minimum Absolute Difference in BST Solution


Detect Capital Solution
Relative Ranks Solution
Base 7 Solution
Find Mode in Binary Tree Solution
Keyboard Row Solution
Construct the Rectangle Solution
Max Consecutive Ones Solution
Number Complement Solution
Island Perimeter Solution
Hamming Distance Solution
Repeated Substring Pattern Solution
Poor Pigs Solution
Assign Cookies Solution
Minimum Moves to Equal Array Elements Solution
Find All Numbers Disappeared in an Array
Solution
Number of Boomerangs Solution
Arranging Coins Solution
Find All Anagrams in a String Solution
Path Sum III Solution
Number of Segments in a String Solution
Valid Word Square Solution
Add Strings Solution
Third Maximum Number Solution
Fizz Buzz Solution
Valid Word Abbreviation Solution
Sum of Left Leaves Solution
Binary Watch Solution
Integer Replacement Solution
Rotate Function Solution
Find the Difference Solution
First Unique Character in a String Solution
Guess Number Higher or Lower Solution
Sum of Two Integers Solution
Logger Rate Limiter Solution
Intersection of Two Arrays II Solution
Intersection of Two Arrays Solution
Moving Average from Data Stream Solution
Nested List Weight Sum Solution
Range Sum Query - Immutable Solution
Bulls and Cows Solution
Flip Game Solution
Nim Game Solution
Word Pattern Solution
Unique Word Abbreviation Solution
Move Zeroes Solution
First Bad Version Solution
Paint Fence Solution
Closest Binary Search Tree Value Solution
Missing Number Solution
Palindrome Permutation Solution
Ugly Number Solution
Add Digits Solution
Meeting Rooms Solution
Strobogrammatic Number Solution
Delete Node in a Linked List Solution
Lowest Common Ancestor of a Binary Search Solution
Tree
Invert Binary Tree Solution
Implement Stack using Queues Solution
Rectangle Area Solution
Contains Duplicate II Solution
Contains Duplicate Solution
Reverse Linked List Solution
Isomorphic Strings Solution
Count Primes Solution
Happy Number Solution
House Robber Solution
Reverse Bits Solution
Rotate Array Solution
Factorial Trailing Zeroes Solution
Excel Sheet Column Number Solution
Two Sum III - Data structure design Solution
Majority Element Solution
Excel Sheet Column Title Solution
Compare Version Numbers Solution
Intersection of Two Linked Lists Solution
Read N Characters Given Read4 Solution
Min Stack Solution
Linked List Cycle Solution
Implement Queue using Stacks Solution
Valid Palindrome Solution
Best Time to Buy and Sell Stock Solution
Pascal's Triangle II Solution
Pascal's Triangle Solution
Path Sum Solution
Minimum Depth of Binary Tree Solution
Balanced Binary Tree Solution
Binary Tree Level Order Traversal II Solution
Maximum Depth of Binary Tree Solution
Binary Tree Level Order Traversal Solution
Climbing Stairs Solution
Sqrt(x) Solution
Add Binary Solution
Plus One Solution
Length of Last Word Solution
Count and Say Solution
Implement strStr() Solution
Remove Element Solution
Remove Duplicates from Sorted ArraySolution
Swap Nodes in Pairs Solution
Merge Two Sorted Lists Solution
Valid Parentheses Solution
Longest Common Prefix Solution
Roman to Integer Solution
Palindrome Number Solution
String to Integer (atoi) Solution
Reverse Integer Solution
ZigZag Conversion Solution
Two Sum Solution
Time Space Difficulty Tag
O(n) O(n) Easy DFS
O(n) O(1) Easy
O(nlogn) O(n) Easy
O(1) O(1) Easy
O(n) O(k) Easy Binary Tree
O(n) O(1) Easy
O(n) O(1) Easy Array
O(n) O(1) Easy Array
O(n) O(1) Easy Bit Manipulation
O(m*n) O(1) Easy
O(n) O(1) Easy
O(n) O(n) Easy KMP
O(1) O(1) Easy Math
O(n) O(1) Easy
O(n) O(1) Easy
O(n) O(1) Easy Array, HashMap
O(n^2) O(n) Easy HashMap
O(n) O(1) Easy
O(n) O(1) Easy
O(n^2) O(n) Easy DFS, recursion
O(n) O(1) Easy
O(n) O(1) Easy
O(n) O(1) Easy
O(n) O(1) Easy
O(n) O(1) Easy
O(n) O(1) Easy
O(n) O(h) Easy
O(1) O(1) Easy
? ? Easy BFS
O(1)
2) could be optimized to O(n) Easy
O(n) O(1) Easy
O(n) O(n) Easy HashMap
O(logn) O(1) Easy Binary Search
O(n) O(1) Easy
amortized O(1) O(k) Easy HashMap
O((m+n)) could be optimized
O(m+n) EasyHashMap, Binary Search
O(m+n) O(min(m,n)) Easy
Two Pointers, Binary Search
O(1) O(w)) Easy Queue
O(n) O(h)) Easy DFS
O(n) O(1) Easy
O(n) O(1) Easy
O(n) O(1) Easy
O(1) O(1) Easy
O(n) O(n) Easy
O(n) O(1) Easy
O(n) O(1) Easy
O(logn) O(1) Easy Binary Search
O(n) O(1) Easy DP
O(h) O(1) Easy DFS
O(n) O(1) Easy HashMap
O(n) O(1) Easy
O(n) O(1) Easy
O(1) O(1) Easy
O(nlogn) O(1) Easy
O(n) O(1) Easy
O(1) O(1) Easy LinkedList
O(h) O(1) Easy DFS
O(n) O(h) Easy DFS, recursion
O(n) O(n) Easy Stack, Queue
O(1) O(1) Easy
O(n) O(n) Easy HashMap
O(n) O(n) Easy HashSet
O(n) O(1) Easy
O(n) O(1) Easy
O(?) O(?) Easy
O(k) O(k) Easy
O(n) O(n) Easy DP
O(n) O(1) Easy Bit Manipulation
O(n),
O(n) could be optimized toEasy
O(1)
O(logn) O(1) Easy
O(n) O(1) Easy
O(n) O(n) Easy
O(n) O(1) Easy
O(n) O(1) Easy
O(n) O(1) Easy
O(m+n) O(1) Easy Linked List
O(n) O(1) Easy
O(1) O(n) Easy Stack
O(n) O(1) Easy Linked List
O(n) O(n) Easy Stack, Queue
O(n) O(1) Easy Two Pointers
O(n) O(1) Easy DP
O(n^2) O(1) Easy
O(n^2) O(1) Easy
O(n) O(1) Easy DFS
O(n) O(1)~O(h) Easy BFS, DFS
O(n) O(1)~O(h) Easy DFS
O(nlogn) O(h) Easy BFS
O(n) O(h) Easy DFS
O(n) O(h) Easy BFS
O(n) O(n) Easy DP
O(logn) O(1) Easy
O(n) O(1) Easy
O(n) O(1) Easy
O(n) O(1) Easy
O(n*2^n) O(2^n) Easy Recursion, LinkedList
O(n) O(1) Easy String
O(n) O(1) Easy
O(n) O(1) Easy
O(n) O(1) Easy Recursion, LinkedList
O(n) O(1) Easy
O(n) O(n) Easy Stack
min(wordLength in this O(1)
array)) Easy
O(1) O(1) Easy
O(logn)/(n) O(1) Easy
O(n) O(1) Easy
O(1) O(1) Easy
O(n) O(n) Easy
O(n)/O(n^2) O(1)/O(n) Easy HashMap
ulation
ary Search
nary Search
ulation
nkedList

nkedList

You might also like