Deprecated: Function get_magic_quotes_gpc() is deprecated in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 99

Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 619

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1169

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176
8000 GitHub - orifake/leetcode-js: Javascript solutions for Leetcode
Nothing Special   »   [go: up one dir, main page]

Skip to content

orifake/leetcode-js

Folders and files

< 233 td class="react-directory-row-commit-cell">
 
NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
< 1098D /td>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

leetcode-js

Javascript solutions for Leetcode [] Todos

Algorithms

Bit Manipulation

# Title Solution Time Space Difficulty Note
0067 Add Binary js O(n) O(1) Easy
0089 Gray Code js O(n^2) O(n) Medium
0136 Single Number js O(n) O(1) Easy
0190 Reverse Bits js O(1) O(1) Easy
0191 Number of 1 Bits js O(1) O(1) Easy
0231 Power of Two js O(1) O(1) Easy
0260 Single Number III js O(n) O(1) Medium
0326 Power of Three js O(1) O(1) Easy
0342 Power of Four js O(1) O(1) Easy
0371 Sum of Two Integers js O(1) O(1) Easy
0389 Find the Difference js O(n) O(1) Easy
0405 Convert a Number to Hexadecimal js O(1) O(1) Easy
0461 Hamming Distance js O(1) O(1) Easy
0476 Number Complement js O(1) O(1) Easy
0504 Base 7 js O(1) O(1) Easy

Array

# Title Solution Time Space Difficulty Note
0026 Remove Duplicates from Sorted Array js O(n) O(1) Easy Two Pointer
0027 Remove Element js O(n) O(1) Easy Two Pointer
0056 Merge Intervals js O(n) O(n) Medium Sorting
0056 Insert Interval js O(n) O(n) Medium
0066 Plus One js O(n) O(1) Easy
0088 Merge Sorted Array js O(m+n) O(1) Easy Two Pointers
0118 Pascal's Triangle js O(n^2) O(1) Easy
0119 Pascal's Triangle II js O(n^2) O(1) Easy
0121 Best Time to Buy and Sell Stock js O(n) O(1) Easy
0130 Surrounded Regions js O(n) O(1) Medium
0164 Maximum Gap js O(n) O(n) Medium Radix Sort
0167 Two Sum II - Input Array Is Sorted js O(n) O(1) Medium Two Pointers
0169 Majority Element js O(n) O(1) Easy
0200 Number of Islands js O(n!) O(1) Medium Depth-First Search
0215 Kth Largest Element in an Array js O(nlogk) O(k) Medium Heap
0228 Summary Ranges js O(n) O(1) Easy
0238 Product of Array Except Self js O(n) O(n) Medium
0274 H-Index js O(n) O(n) Medium
0287 Find the Duplicate Number js O(n) O(1) Medium Two Pointers
0283 Move Zeroes js O(n) O(1) Easy Two Pointers
0303 Range Sum Query - Immutable js O(n) O(1) Easy
0396 Rotate Function js O(n) O(1) Medium Dynamic Programming
0412 Fizz Buzz js O(n) O(1) Easy
0414 Third Maximum Number js O(n) O(1) Easy
0424 Longest Repeating Character Replacement js O(n) O(1) Medium
0463 Island Perimeter js O(n) O(1) Easy
0448 Find All Numbers Disappeared in an Array js O(n) O(1) Easy
0495 Teemo Attacking js O(n) O(1) Easy
0500 Keyboard Row js O(n) O(1) Easy
0525 Contiguous Array js O(n) O(n) Medium Hash Table
0528 Random Pick with Weight js O(n) O(n) Medium
0539 Minimum Time Difference js O(nlogn) O(n) Medium Sorting
0561 Array Partition js O(nlogn) O(1) Easy Greedy
0566 Reshape the Matrix js O(m*n) O(m*n) Easy
0581 Shortest Unsorted Continuous Subarray js O(n) O(1) Medium Two Pointers
0695 Max Area of Islands js O(n!) O(1) Medium Depth-First Search

String

# Title Solution Time Space Difficulty Note
0005 Longest Palindromic Substring js O(n^2) O(1) Medium Two Pointers
0006 Zigzag Conversion js O(n) O(1) Medium
0014 Longest Common Prefix js O(n*k) O(1) Easy
0028 Implement strStr() js O(n+k) O(k) Easy Two Pointers
0038 Count and Say js O(n * 2^n) O(2^n) Easy
0058 Length of Last Word js O(n) O(1) Easy
0071 Simp 233 lify Path js O(n) O(1) Medium stack
0151 Reverse Words in a String js O(n) O(1) Medium Two Pointers
0165 Compare Version Numbers js O(n) O(n) Medium
0344 Reverse String js O(n) O(1) Easy Two Pointers
0345 Reverse Vowels of a String js O(n) O(1) Easy Two Pointers
0383 Ransom Note js O(n) O(1) Easy Hash Map
0388 Longest Absolute File Path js O(n) O(1) Medium
0394 Decode String js O(n) O(1) Medium
0395 Longest Substring with At Least K Repeating Characters js O(n) O(1) Medium Sliding Window
0415 Add Strings js O(n) O(1) Easy
0434 Number of Segments in a String js O(n) O(1) Easy
0459 Repeated Substring Pattern js O(n) O(n) Easy
0482 License Key Formatting js O(n) O(1) Easy
0520 Detect Capital js O(n) O(1) Easy
0521 Longest Uncommon Subsequence I js O(min(a, b)) O(1) Easy
0535 Encode and Decode TinyURL js O1 O(n) Medium Hash Table
0541 Reverse String II js O(n) O(1) Easy
0551 Student Attendance Record I js O(n) O(1) Easy
0557 Reverse Words in a String III js O(n) O(n) Easy
0796 Rotate String js O(n) O(1) Easy

Linked List

# Title Solution Time Space Difficulty Note
0002 Add Two Numbers js O(n) O(1) Medium
0019 Remove Nth Node From End of List js O(n) O(1) Medium Two Pointers
0021 Merge Two Sorted Lists js O(n) O(1) Easy Two Pointers
0023 Merge k Sorted Lists js O(n*k) O(n) Hard
0024 Swap Nodes in Pairs js O(n) O(1) Medium Recursion
0025 Reverse Nodes in k-Group js O(n) O(1) Hard Recursion
0061 Rotate List js O(n) O(1) Medium Two Pointers
0082 Remove Duplicates from Sorted List II js O(n) O(1) Medium Two Pointers
0083 Remove Duplicates from Sorted List js O(n) O(1) Easy Two Pointers
0086 Partition List js O(n) O(1) Medium Two Pointers
0092 Reverse Linked List II js O(n) O(1) Easy
0138 Copy List with Random Pointer js O(n) O(n) Medium
0141 Linked List Cycle js O(n) O(1) Easy Two Pointers
0142 Linked List Cycle II js O(n) O(1) Medium Two Pointers
0143 Reorder List js O(n) O(1) Medium Two Pointers
0147 Insertion Sort List js O(n^2) O(n) Medium Two Pointers
0148 Sort List js O(nlogn) O(logn) Medium Merge sort
0160 Intersection of Two Linked Lists js O(m+n) O(1) Easy Two Pointers
0203 Remove Linked List Elements js O(n) O(1) Easy
0206 Reverse Linked List js O(n) O(1) Easy
0234 Palindrome Linked List js O(n) O(1) Easy Two Pointers
0237 Delete Node in a Linked List js O(1) O(1) Easy
0328 Odd Even Linked List js O(n) O(1) Medium
0382 Linked List Random Node js O(n) O(1) Medium
0430 Flatten a Multilevel Doubly Linked List js O(n) O(n) Medium Depth-First Search
0876 Middle of the Linked List js O(n) O(1) Easy Two Pointers
1290 Convert Binary Number in a Linked List to Integer js O(n) O(1) Easy
1721 Swapping Nodes in a Linked List js O(n) O(1) Mediun

Stack

# Title Solution Time Space Difficulty Note
0020 Valid Parentheses js O(n) O(1) Easy
0150 Evaluate Reverse Polish Notation js O(n) O(1) Medium
0227 Basic Calculator II js O(n) O(n) Medium
0316 Remove Duplicate Letters js O(n) O(n) Medium
0385 Mini Parser js O(n) O(1) Medium
0496 Next Greater Element I js O(n) O(n) Easy
0503 Next Greater Element II js O(n) O(n) Medium
0682 Baseball Game js O(n) O(n) Easy
0739 Daily Temperatures js O(n) O(n) Medium
0844 Backspace String Compare js O(n) O(1) Easy
0921 Minimum Add to Make Parentheses Valid js O(n) O(1) Medium
01047 Remove All Adjacent Duplicates In String js O(n) O(n) Easy
01021 Remove Outermost Parentheses js O(n) O(1) Easy
01541 Minimum Insertions to Balance a Parentheses String js O(n) O(1) Medium
01544 Make The String Great js O(n) O(n) Easy
01598 Crawler Log Folder js O(n) O(1) Easy
01614 Maximum Nesting Depth of the Parentheses js O(n) O(1) Easy
01700 Number of Students Unable to Eat Lunch js O(n) O(1) Easy

Queue

# Title Solution Time Space Difficulty Note

Binary Heap

# Title Solution Time Space Difficulty Note

Tree

# Title Solution Time Space Difficulty Note
094 Binary Tree Inorder Traversal js O(n) O(h) Easy Depth-First Search
098 Validate Binary Search Tree js O(logn) O(logn) Easy Depth-First Search
0100 Same Tree js O(n) O(logn) Easy
0101 Symmetric Tree js O(n) O(h) Easy
0102 Binary Tree Level Order Traversal js O(n) O(n) Medium Breadth-First Search
0103 Binary Tree Zigzag Level Order Traversal js O(n) O(n) Medium Breadth-First Search
0104 Maximum Depth of Binary Tree js O(n) O(1) Easy Depth-First Search
0107 Binary Tree Level Order Traversal II js O(n) O(n) Medium Breadth-First Search
0110 Balanced Binary Tree js O(n) O(logn) Easy Depth-First Search
0111 Minimum Depth of Binary Tree js O(n) O(logn) Easy Depth-First Search
0112 Path Sum js O(n) O(h) Easy Depth-First Search
0113 Path Sum II js O(n) O(h) Medium Depth-First Search
0114 Binary Tree Preorder Traversal js O(n) O(h) Easy Depth-First Search
0116 Populating Next Right Pointers in Each Node js O(n) O(h) Medium Depth-First Search
0117 Populating Next Right Pointers in Each Node II js O(n) O(h) Medium Depth-First Search
0129 Sum Root to Leaf Numbers js O(n) O(h) Medium Depth-First Search
0145 Binary Tree Postorder Traversal js O(n) O(h) Easy Depth-First Search
0173 Binary Search Tree Iterator js O(n) O(h) Medium Binary Search Tree
0199 Binary Tree Right Side View js O(n) O(h) Medium Depth-First Search
0222 Count Complete Tree Nodes js O(logn*logn) O(logn) Easy
0226 Invert Binary Tree js O(n) O(h), O(w) Easy
0235 Lowest Common Ancestor of a Binary Search Tree js O(n) O(h), O(w) Medium Depth-First Search
0236 Lowest Common Ancestor of a Binary Tree js O(n) O(h), O(w) Medium Depth-First Search
0257 Binary Tree Paths js O(n*h) O(h) Easy Depth-First Search
0404 Sum of Left Leaves js O(n) O(h) Easy
0429 N-ary Tree Level Order Traversal js O(n) O(n) Easy Breadth-First Search
0501 Find Mode in Binary Search Tree js O(n) O(h) Easy
0513 Find Bottom Left Tree Value js O(n) O(h) Medium
0515 Find Largest Value in Each Tree Row js O(n) O(h) Medium Breadth-First Search
0530 Minimum Absolute Difference in BST js O(n) O(h) Easy
0543 Diameter of Binary Tree js O(n) O(h) Easy
0559 Maximum Depth of N-ary Tree js O(n) O(h) Easy
0563 Binary Tree Tilt js O(n) O(h) Easy
0572 Subtree of Another Tree js O(m*n) O(h) Easy
0589 N-ary Tree Preorder Traversal js O(n) O(n) Easy
0590 N-ary Tree Postorder Traversal js O(n) O(n) Easy

Hash Table

# Title Solution Time Space Difficulty Note
0001 Two Sum js O(n) O(n) Easy
0003 Longest Substring Without Repeating Characters js O(n) O(1) Medium Sliding Window
0049 Group Anagrams js O(n^2logn) O(n) Medium
0128 Longest Consecutive Sequence js O(n) O(n) Medium
0187 Repeated DNA Sequences js O(n) O(n) Medium
0205 Isomorphic Strings js O(n) O(1) Easy
0217 Contains Duplicate js O(n) O(n) Easy
0219 Contains Duplicate II js O(n) O(n) Easy
0229 Majority Element II js O(n) O(n) Medium
0242 Valid Anagram js O(n) O(1) Easy
0290 Word Pattern js O(n) O(1) Easy
0299 Bulls and Cows js O(n) O(1) Medium
0349 Intersection of Two Arrays js O(n) O(n)) Easy
0387 First Unique Character in a String js O(n) O(1) Easy
0409 Longest Palindrome js O(n) O(1) Easy
0575 Distribute Candies js O(n) O(n) Easy

Math

# Title Solution Time Space Difficulty Note
0007 Reverse Integer js O(n) O(1) Medium
0009 Palindrome Number js O(n) O(1) Easy
0012 Integer to Roman js O(n) O(1) Medium
0013 Roman to Integer js O(n) O(1) Easy Hash Map
0029 Divide Two Integers js O(1) O(1) Medium
0043 Multiply Strings js O(m*n) O(m+n) Medium Simulation
0050 Pow(x, n) js O(1) O(1) Medium Recursion
0166 Fraction to Recurring Decimal js O(n) O(1) Medium Hash Table
0168 Excel Sheet Column Title js O(n) O(1) Easy
0171 Excel Sheet Column Number js O(n) O(1) Easy
0172 Factorial Trailing Zeroes js O(1) O(1) Medium
0202 Happy Number js O(n) O(1) Easy Hash Map
0204 Count Primes js O(n^2) O(n) Medium
0223 Rectangle Area js O(1) O(1) Medium Geometry
0258 Add Digits js O(1) O(1) Easy
0263 Ugly Number js O(n) O(1) Easy
0268 Missing Number js O(n) O(1) Easy
0292 Nim Game js O(1) O(1) Easy
0372 Super Pow js O(1) O(1) Medium
0400 Nth Digit js O(1) O(1) Medium
0441 Arranging Coins js O(n) ) O(1) Easy
1025 Divisor Game js O(1) ) O(1) Easy

Sort

# Title Solution Time Space Difficulty Note

Two Pointers

# Title Solution Time Space Difficulty Note
0005 Longest Palindromic Substring js O(n) O(1) Easy
0015 3Sum js O(n^2) O(1) Medium
0016 3Sum Closest js O(n^2) O(1) Medium
0018 4Sum js O(n^2) O(1) Medium
0031 Next Permutation js O(n) O(1) Medium
0075 Sort Colors js O(n) O(1) Medium
0125 Valid Palindrome js O(n) O(1) Easy
0189 Rotate Array js O(n) O(1) Medium
0209 Minimum Size Subarray Sum js O(n^2) O(1) Medium
Sliding Window
0350 Intersection of Two Arrays II js O(m + n) O(1) Easy
0392 Is Subsequence js O(n) O(1) Easy
0443 String Compression js O(n) O(1) Medium

Recursion

# Title Solution Time Space Difficulty Note

Binary Search

# Title Solution Time Space Difficulty Note
0033 Search in Rotated Sorted Array js O(logn) O(1) Medium
0034 Find First and Last Position of Element in Sorted Array js O(logn) O(1) Medium
0035 Search Insert Position js O(logn) O(1) Easy
0069 Sqrt(x) js O(logn) O(1) Easy
0081 Search in Rotated Sorted Array II js O(logn) O(1) Medium
0153 Find Minimum in Rotated Sorted Array js O(logn) O(1) Medium
0162 Find Peak Element js O(logn) O(1) Medium
0278 First Bad Version js O(logn) O(1) Easy
0367 Valid Perfect Square js O(logn) O(1) Easy
0374 Guess Number Higher or Lower js O(logn) O(1) Easy
0475 Heaters js O(nlogn) O(1) Easy
0704 Binary Search js O(logn) O(1) Easy
0744 Find Smallest Letter Greater Than Target js O(logn) O(1) Easy

Breadth-First Search

# Title Solution Time Space Difficulty Note

Depth-First Search

# Title Solution Time Space Difficulty Note
0386 Lexicographical Numbers js O(n) O(1) Medium

Backtracking

# Title Solution Time Space Difficulty Note
0017 Letter Combinations of a Phone Number js O(n) Medium
0022 Generate Parentheses js O(n) Medium
0039 Combination Sum js O(n) Medium
0040 Combination Sum II js O(n) Medium
0046 Permutations js O(n) Medium
0047 Permutations II js O(n) Medium
0077 Combinations js O(n) Medium
0078 Subsets js O(n) Medium
0079 Word Search js O(n) Medium
0090 Subsets II js O(n) Medium
0093 Restore IP Addresses js O(n) Medium
0216 Combination Sum III js O(n) Medium
0306 Additive Number js O(2^n*n) O(n) Medium
0491 Non-decreasing Subsequences js O(n*n) O(n) Medium Hash Table

Dynamic Programming

# Title Solution Time Space Difficulty Note
0053 Maximum Subarray js O(n) O(1) Medium
0062 Unique Paths js O(n) O(1) Medium
0070 Climbing Stairs js O(n) O(1) Easy
0198 House Robber js O(n) O(1) Medium
0121 Best Time to Buy and Sell Stock js O(n) O(1) Easy
0122 Best Time to Buy and Sell Stock II js O(n) O(1) Medium
0300 Longest Increasing Subsequence js O(n^2) O(n) Medium
0322 Coin Change js O(n*m) O(n) Medium
0509 Fibonacci Number js O(n) O(1) Easy
0746 Min Cost Climbing Stairs js O(n) O(1) Easy
1137 N-th Tribonacci Number js O(n) O(1) Easy

Greedy

# Title Solution Time Space Difficulty Note
0045 Jump Game II js O(n) O(1) Medium
0055 Jump Game js O(n) O(1) Medium
0179 Largest Number js O(nlogn) O(n) Medium

Graph

# Title Solution Time Space Difficulty Note

Geometry

# Title Solution Time Space Difficulty Note

Design

# Title Solution Time Space Difficulty Note
0146 LRU Cache js O(1) O(1) Medium
0208 Implement Trie (Prefix Tree) js O(1) O(1) Medium Hash Table
0211 Design Add and Search Words Data Structure js O(1) O(1) Medium
0225 Implement Stack using Queues js O(1) O(1) Easy
0233 Implement Queue using Stacks js O(1) O(1) Easy
0284 Peeking Iterator js O(1) O(1) Medium
0307 Range Sum Query - Mutable js O(1) O(1) Medium Binary Indexed Tree
0341 Flatten Nested List Iterator js O(1) O(1) Medium Stack
0355 Design Twitter js O(1) O(1) Medium Hash Table
0384 Shuffle an Array js O(1) O(1) Medium Randomized
0380 Insert Delete GetRandom O(1) js O(1) O(1) Medium Hash Table
0398 Random Pick Index js O(n) O(1) Medium

Concurrency

# Title Solution Time Space Difficulty Note

Other

# Title Solution Time Space Difficulty Note

About

Javascript solutions for Leetcode

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0