Skip to content

zyx4843/leetcode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 

Repository files navigation

leetcode

My C++ solution about https://oj.leetcode.com question

Title Solution Difficulty Run Time
Min Stack cpp Easy 240ms
Find Minimum in Rotated Sorted Array II cpp Hard 28ms
Find Minimum in Rotated Sorted Array cpp Medium 16ms
Maximum Product Subarray cpp Medium 16ms
Reverse Words in a String cpp Medium 12ms
Evaluate Reverse Polish Notation cpp Medium 52ms
Max Points on a Line cpp Hard 56ms
Sort List cpp Medium 220ms
Insertion Sort List cpp Medium 100ms
LRU Cache cpp Hard 428ms
Binary Tree Postorder Traversal cpp Hard 8ms
Binary Tree Preorder Traversal cpp Medium 8ms
Reorder List cpp Medium 236ms
Linked List Cycle II cpp Medium 84ms
Linked List Cycle cpp Medium 64ms
Word Break II cpp Hard 48ms
Word Break cpp Medium 20ms
Copy List with Random Pointer cpp Hard 360ms
Single Number II cpp Medium 48ms
Single Number cpp Medium 60ms
Candy cpp Hard 112ms
Gas Station cpp Medium 40ms
Clone Graph cpp Medium 276ms
Palindrome Partitioning II cpp Hard 106ms
Palindrome Partitioning cpp Medium 60ms
Surrounded Regions cpp Medium 88ms
Sum Root to Leaf Numbers cpp Medium 16ms
Longest Consecutive Sequence cpp Hard 60ms
Word Ladder II cpp Hard 1340ms
Word Ladder cpp Medium 864ms
Valid Palindrome cpp Easy 56ms
Binary Tree Maximum Path Sum cpp Hard 116ms
Best Time to Buy and Sell Stock III cpp Hard 28ms
Best Time to Buy and Sell Stock II cpp Medium 48ms
Best Time to Buy and Sell Stock cpp Medium 76ms
Triangle cpp Medium 44ms
Pascal's Triangle II cpp Easy 28ms
Pascal's Triangle cpp Easy 4ms
Populating Next Right Pointers in Each Node II cpp Hard 144ms
Populating Next Right Pointers in Each Node cpp Medium 100ms
Distinct Subsequences cpp Hard 40ms
Flatten Binary Tree to Linked List cpp Medium 24ms
Path Sum cpp Easy 68ms
Path Sum II cpp Medium 88ms
Minimum Depth of Binary Tree cpp Easy 56ms
Balanced Binary Tree cpp Easy 56ms
Convert Sorted List to Binary Search Tree cpp Medium 112ms
Convert Sorted Array to Binary Search Tree cpp Medium 72ms
Binary Tree Level Order Traversal II cpp Easy 40ms
Construct Binary Tree from Inorder and Postorder Traversal cpp Medium 68ms
Construct Binary Tree from Preorder and Inorder Traversal cpp Medium 60ms
Maximum Depth of Binary Tree cpp Easy 44ms
Binary Tree Zigzag Level Order Traversal cpp Medium 12ms
Binary Tree Level Order Traversal cpp Easy 40ms
Symmetric Tree cpp Easy 60ms
Same Tree cpp Easy 4ms
Recover Binary Search Tree cpp Hard 256ms
Validate Binary Search Tree cpp Medium 92ms
Interleaving String cpp Hard 16ms
Unique Binary Search Trees II cpp Medium 96ms
Unique Binary Search Trees cpp Medium 0ms
Binary Tree Inorder Traversal cpp Medium 12ms
Restore IP Addresses cpp Medium 32ms
Reverse Linked List II cpp Medium 8ms
Subsets II cpp Medium 20ms
Decode Ways cpp Medium 14ms
Gray Code cpp Medium 7ms
Merge Sorted Array cpp Easy 12ms
Scramble String cpp Hard 145ms
Partition List cpp Medium 15ms
Maximal Rectangle cpp Hard 28ms
Largest Rectangle in Histogram cpp Hard 33ms
Remove Duplicates from Sorted List II cpp Medium 18ms
Remove Duplicates from Sorted List cpp Easy 21ms
Search in Rotated Sorted Array II cpp Medium 22ms
Remove Duplicates from Sorted Array II cpp Medium 42ms
Word Search cpp Medium 73ms
Subsets cpp Medium 10ms
Combinations cpp Medium 17ms
Minimum Window Substring cpp Hard 25ms
Sort Colors cpp Medium 4ms
Search a 2D Matrix cpp Medium 24ms
Set Matrix Zeroes cpp Medium 83ms
Edit Distance cpp Hard 51ms
Simplify Path cpp Medium 12ms
Climbing Stairs cpp Easy 2ms
Sqrt(x) cpp Medium 18ms
Text Justification cpp Hard 3ms
Plus One cpp Easy 5ms
Valid Number cpp Hard 18ms
Add Binary cpp Easy 8ms
Merge Two Sorted Lists cpp Easy 19ms
Minimum Path Sum cpp Medium 26ms
Unique Paths II cpp Medium 13ms
Unique Paths cpp Medium 3ms
Rotate List cpp Medium 18ms
Permutation Sequence cpp Medium 4ms
Spiral Matrix II cpp Medium 6ms
Length of Last Word cpp Easy 4ms
Insert Interval cpp Hard 17ms
Merge Intervals cpp Hard 17ms
Jump Game cpp Medium 18ms
Spiral Matrix cpp Medium 3ms
Maximum Subarray cpp Medium 12ms
N-Queens II cpp Hard 4ms
N-Queens cpp Hard 8ms
Pow(x, n) cpp Medium 4ms
Search in Rotated Sorted Array cpp Hard 12ms
Remove Duplicates from Sorted Array cpp Easy 37ms

Releases

No releases published

Packages

No packages published

Languages