This repository is a collection of various algorithms implemented in Node.js using TypeScript.
â„– | Problem Title | LeetCode | Solution | Ideal O(Time) | Ideal O(Space) |
---|---|---|---|---|---|
1 | Two Sum | Link | Link | ||
2 | Longest Substring Without Repeating Characters | Link | Link | ||
3 | Longest Palindromic Substring | Link | Link | ||
4 | Palindrome Number | Link | Link | ||
5 | Valid Parentheses | Link | Link | ||
6 | Generate Parentheses | Link | Link | ||
7 | Merge k Sorted Lists | Link | Link | ||
8 | Remove Element | Link | Link | ||
9 | Find the Index of the First Occurrence in a String | Link | Link | ||
10 | Search in Rotated Sorted Array | Link | Link | ||
11 | Trapping Rain Water | Link | Link | ||
12 | Group Anagrams | Link | Link | ||
13 | Merge Intervals | Link | Link | ||
14 | Simplify Path | Link | Link | ||
15 | Minimum Window Substring | Link | Link | $O( | |
16 | Merge Sorted Array | Link | Link | ||
17 | Validate Binary Search Tree | Link | Link | ||
18 | Symmetric Tree | Link | Link | ||
19 | Maximum Depth of Binary Tree | Link | Link | ||
20 | Best Time to Buy and Sell Stock | Link | Link | ||
21 | Binary Tree Maximum Path Sum | Link | Link | ||
22 | Valid Palindrome | Link | Link | ||
23 | Single Number | Link | Link | ||
24 | LRU Cache | Link | Link | ||
25 | Evaluate Reverse Polish Notation | Link | Link | ||
26 | Min Stack | Link | Link | ||
27 | One Edit Distance | Link | Link | ||
28 | Majority Element | Link | Link | ||
29 | Binary Tree Right Side View | Link | Link | ||
30 | Number of Islands | Link | Link | ||
31 | Isomorphic Strings | Link | Link | ||
32 | Reverse Linked List | Link | Link | ||
33 | Summary Ranges | Link | Link | ||
34 | Lowest Common Ancestor of a Binary Tree | Link | Link | ||
35 | Product of Array Except Self | Link | Link | ||
36 | Meeting Rooms II | Link | Link | ||
37 | Move Zeroes | Link | Link | ||
38 | Longest Increasing Subsequence | Link | Link | ||
39 | Remove Invalid Parentheses | Link | Link | ||
40 | Reconstruct Itinerary | Link | Link | ||
41 | Longest Substring with At Most K Distinct Characters | Link | Link | ||
42 | Flatten Nested List Iterator | Link | Link | ||
43 | Intersection of Two Arrays | Link | Link | ||
44 | Intersection of Two Arrays II | Link | Link | ||
45 | Line Reflection | Link | Link | ||
46 | Design Hit Counter | Link | Link | ||
47 | Insert Delete GetRandom O(1) | Link | Link | ||
48 | Is Subsequence | Link | Link | ||
49 | Find All Anagrams in a String | Link | Link | ||
50 | String Compression | Link | Link | ||
51 | Max Consecutive Ones | Link | Link | ||
52 | Max Consecutive Ones II | Link | Link | ||
53 | Subarray Sum Equals K | Link | Link | ||
54 | Permutation in String | Link | Link | ||
55 | Find Duplicate Subtrees | Link | Link | ||
56 | Robot Return to Origin | Link | Link | ||
57 | Find K Closest Elements | Link | Link | ||
58 | Valid Palindrome II | Link | Link | ||
59 | Maximize Distance to Closest Person | Link | Link | ||
60 | Number of Recent Calls | Link | Link | ||
61 | Squares of a Sorted Array | Link | Link | ||
62 | Interval List Intersections | Link | Link | ||
63 | Max Consecutive Ones III | Link | Link | ||
64 | Sort the Matrix Diagonally | Link | Link | ||
65 | Destination City | Link | Link | ||
66 | Longest Subarray of 1's After Deleting One Element | Link | Link | ||
67 | Design an ATM Machine | Link | Link | ||
68 | Promise Pool | Link | Link | ||
69 | Flatten Deeply Nested Array | Link | Link | ||
70 | Find the Prefix Common Array of Two Arrays | Link | Link | ||
71 | Event Emitter | Link | Link |