Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/harish-aka-shivi/algo-ds
Data structures implementations, algorithms, leetcode solutions, etc
https://github.com/harish-aka-shivi/algo-ds
algorithms data-structures dynamic-programming leetcode recursion typescript
Last synced: 7 days ago
JSON representation
Data structures implementations, algorithms, leetcode solutions, etc
- Host: GitHub
- URL: https://github.com/harish-aka-shivi/algo-ds
- Owner: harish-aka-shivi
- License: wtfpl
- Created: 2023-04-30T03:53:56.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-06-22T11:42:18.000Z (over 1 year ago)
- Last Synced: 2024-10-08T09:23:19.469Z (29 days ago)
- Topics: algorithms, data-structures, dynamic-programming, leetcode, recursion, typescript
- Language: TypeScript
- Homepage:
- Size: 208 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![License: WTFPL](https://img.shields.io/badge/License-WTFPL-brightgreen.svg)](http://www.wtfpl.net/about/)
Solutions for leetcode problem that I solve. Language used is typescript
# Arrays
- 704: Binary Search [Leetcode](https://leetcode.com/problems/binary-search/) [Solution](https://github.com/harish-aka-shivi/algo-ds/blob/main/arrays/binarySearch.ts)
- 344: Reverse String [Leetcode](https://leetcode.com/problems/reverse-string/) [Solution](https://github.com/harish-aka-shivi/algo-ds/blob/main/arrays/arrayReverse.ts)
- 828: Count Unique Characters of All Substrings of a Given String [Leetcode](https://leetcode.com/problems/count-unique-characters-of-all-substrings-of-a-given-string/) [Solution](https://github.com/harish-aka-shivi/algo-ds/blob/main/arrays/countUniqueCharacters.ts)
- 34: Find First and Last Position of Element in Sorted Array [Leetcode](https://leetcode.com/problems/find-first-and-last-position-of-element-in-sorted-array/) [Solution](https://github.com/harish-aka-shivi/algo-ds/blob/main/arrays/firstAndLastElement.ts)
- 189: Rotate Array [Leetcode](https://leetcode.com/problems/rotate-array/) [Solution](https://github.com/harish-aka-shivi/algo-ds/blob/main/arrays/kRotate.ts)
- 53: Maximum Subarray [Leetcode](https://leetcode.com/problems/maximum-subarray/) [Solution](https://github.com/harish-aka-shivi/algo-ds/blob/main/arrays/maxSubarraySum.ts)
- 912: Sort an Array [Leetcode](https://leetcode.com/problems/sort-an-array/description/) [Solution](https://github.com/harish-aka-shivi/algo-ds/blob/main/arrays/mergeSort.ts)
- 7: Reverse Integer [Leetcode](https://leetcode.com/problems/reverse-integer/) [Solution](https://github.com/harish-aka-shivi/algo-ds/blob/main/arrays/reverseInteger.ts)
- 901: Online Stock Span [Leetcode](https://leetcode.com/problems/online-stock-span/) [Solution](https://github.com/harish-aka-shivi/algo-ds/blob/main/arrays/stockSpanner.ts)
- 15: 3Sum [Leetcode](https://leetcode.com/problems/3sum/) [Solution](https://github.com/harish-aka-shivi/algo-ds/blob/main/arrays/threeSum.ts)
- 172: Factorial Trailing Zeroes [Leetcode](https://leetcode.com/problems/factorial-trailing-zeroes/) [Solution](https://github.com/harish-aka-shivi/algo-ds/blob/main/arrays/trailingZero.ts)
- 1: Two Sum [Leetcode](https://leetcode.com/problems/two-sum/) [Solution](https://github.com/harish-aka-shivi/algo-ds/blob/main/arrays/twoSum.ts)
- 5: Longest Palindromic Substring [Leetcode](https://leetcode.com/problems/longest-palindromic-substring/) [Solution](https://github.com/harish-aka-shivi/algo-ds/blob/main/arrays/longestPallindromicSubstring.ts)
- 33: Search in Rotated Sorted Array [Leetcode](https://leetcode.com/problems/search-in-rotated-sorted-array/description/) [Solution](https://github.com/harish-aka-shivi/algo-ds/blob/main/arrays/rotatedArraySearch.ts)
# Data Structures
#### Binary trees
- 144 Binary Tree Preorder Traversal [Leetcode](https://leetcode.com/problems/binary-tree-preorder-traversal/) [Solution](https://github.com/harish-aka-shivi/algo-ds/blob/main/dataStructures/binaryTree.ts#L26)- 1008: Construct Binary Search Tree from Preorder Traversal [Leetcode](https://leetcode.com/problems/construct-binary-search-tree-from-preorder-traversal/) [Solution](https://github.com/harish-aka-shivi/algo-ds/blob/main/dataStructures/binaryTree.ts#L12)
- 94: Binary Tree Inorder Traversal [Leetcode](https://leetcode.com/problems/binary-tree-inorder-traversal/) [Solution](https://github.com/harish-aka-shivi/algo-ds/blob/main/dataStructures/binaryTree.ts#L36)
- 102: Binary Tree Level Order Traversal [Leetcode](https://leetcode.com/problems/binary-tree-level-order-traversal/) [Solution](https://github.com/harish-aka-shivi/algo-ds/blob/main/dataStructures/binaryTree.ts#L69)
- 104: Maximum Depth of Binary Tree [Leetcode](https://leetcode.com/problems/maximum-depth-of-binary-tree/) [Solution](https://github.com/harish-aka-shivi/algo-ds/blob/main/dataStructures/binaryTree.ts#L140)
- 543: Diameter of Binary Tree [Leetcode](https://leetcode.com/problems/diameter-of-binary-tree/) [Solution](https://github.com/harish-aka-shivi/algo-ds/blob/main/dataStructures/binaryTree.ts#L186)
- 111: Minimum Depth of Binary Tree [Leetcode](https://leetcode.com/problems/minimum-depth-of-binary-tree/) [Solution](https://github.com/harish-aka-shivi/algo-ds/blob/main/dataStructures/binaryTree.ts#L201)
- 101: Symmetric Tree [Leetcode](https://leetcode.com/problems/symmetric-tree/) [Solution](https://github.com/harish-aka-shivi/algo-ds/blob/main/dataStructures/binaryTree.ts#L236)
- 106: Construct Binary Tree from Inorder and Postorder Traversal [Leetcode](https://leetcode.com/problems/construct-binary-tree-from-inorder-and-postorder-traversal/) [Solution](https://github.com/harish-aka-shivi/algo-ds/blob/main/dataStructures/binaryTree.ts#L252)
- 671: Second Minimum Node In a Binary Tree [Leetcode](https://leetcode.com/problems/second-minimum-node-in-a-binary-tree/description/) [Solution](https://github.com/harish-aka-shivi/algo-ds/blob/main/dataStructures/binaryTree.ts#L294)
### Graph
- 207: Course Schedule [Leetcode](https://leetcode.com/problems/course-schedule/description/) [Solution](https://github.com/harish-aka-shivi/algo-ds/blob/main/graph/courseSchedule.ts)
- 1514: Path with Maximum Probability [Leetcode](https://leetcode.com/problems/path-with-maximum-probability/description/?envType=list&envId=53js48ke) [Solution](https://github.com/harish-aka-shivi/algo-ds/blob/main/graph/maxProbPath.ts)### Hashmap
- 560: Subarray Sum Equals K [Leetcode](https://leetcode.com/problems/subarray-sum-equals-k/) [Solution](https://github.com/harish-aka-shivi/algo-ds/blob/main/hashmap/kArraySum.ts)#### Binary Search Tree
- 701: Insert into a Binary Search Tree [Leetcode](https://leetcode.com/problems/insert-into-a-binary-search-tree/description/) [Solution](https://github.com/harish-aka-shivi/algo-ds/blob/main/dataStructures/binarySearchTree.ts#L10)- 450: Delete Node in a BST [Leetcode](https://leetcode.com/problems/delete-node-in-a-bst/) [Solution](https://github.com/harish-aka-shivi/algo-ds/blob/main/dataStructures/binarySearchTree.ts#L44)
- 1008: Construct Binary Search Tree from Preorder Traversal [Leetcode](https://leetcode.com/problems/construct-binary-search-tree-from-preorder-traversal/) [Solution](https://github.com/harish-aka-shivi/algo-ds/blob/main/dataStructures/binarySearchTree.ts#L73)
- 226: Invert Binary Tree [Leetcode](https://leetcode.com/problems/invert-binary-tree/) [Solution](https://github.com/harish-aka-shivi/algo-ds/blob/main/dataStructures/binarySearchTree.ts#L84)
- 98: Validate Binary Search Tree [Leetcode](https://leetcode.com/problems/validate-binary-search-tree/) [Solution](https://github.com/harish-aka-shivi/algo-ds/blob/main/dataStructures/binarySearchTree.ts#L130)
#### Graph
- Graph using adjacency list implementation | bfs | dfs [Solution](https://github.com/harish-aka-shivi/algo-ds/blob/main/dataStructures/graph.ts)- Graph using node class [Solution](https://github.com/harish-aka-shivi/algo-ds/blob/main/dataStructures/graphUsingNode.ts)
#### Heap
- Implementation [Solution](https://github.com/harish-aka-shivi/algo-ds/blob/main/dataStructures/heap.ts)#### Linked List
- Implementation [Solution](https://github.com/harish-aka-shivi/algo-ds/blob/main/dataStructures/linkedList.ts)#### Queue
- Using Linked List [Solution](https://github.com/harish-aka-shivi/algo-ds/blob/main/dataStructures/queueUsingLL.ts)
- Using Stack [Solution](https://github.com/harish-aka-shivi/algo-ds/blob/main/dataStructures/queueUsingStack.ts)#### Stack
- Stack using Array [Solution](https://github.com/harish-aka-shivi/algo-ds/blob/main/dataStructures/stackUsingArr.ts)
- Stack using Linked List [Solution](https://github.com/harish-aka-shivi/algo-ds/blob/main/dataStructures/stackUsingLL.ts)#### Trie
- 208: Implement Trie (Prefix Tree) [Leetcode](https://leetcode.com/problems/implement-trie-prefix-tree/) [Solution](https://github.com/harish-aka-shivi/algo-ds/blob/main/dataStructures/trie.ts)# Dynamic Programming
- 322: Coin Change [Leetcode](https://leetcode.com/problems/coin-change/) [Solution](https://github.com/harish-aka-shivi/algo-ds/blob/main/dynamicProgramming/coinChange.ts)
- Coin change using bottom up approach [Solution](https://github.com/harish-aka-shivi/algo-ds/blob/main/dynamicProgramming/coinChangeBottomUp.ts)- 1143: Longest Common Subsequence [Leetcode](https://leetcode.com/problems/longest-common-subsequence/) [Solution](https://github.com/harish-aka-shivi/algo-ds/blob/main/dynamicProgramming/longestCommonSubsequence.ts)
- 300: Longest Increasing Subsequence [Leetcode](https://leetcode.com/problems/longest-increasing-subsequence/) [Solution](https://github.com/harish-aka-shivi/algo-ds/blob/main/dynamicProgramming/longestIncreasingSubsequence.ts)
- 494: Target Sum [Leetcode](https://leetcode.com/problems/target-sum/) [Solution](https://github.com/harish-aka-shivi/algo-ds/blob/main/dynamicProgramming/targetSum.ts)
# Native Js
- 2622: Cache With Time Limit [Leetcode](https://leetcode.com/problems/cache-with-time-limit/) [Solution](https://github.com/harish-aka-shivi/algo-ds/blob/main/nativeJs/cacheWithTimeLimit.ts)- 2636: Promise Pool [Leetcode](https://leetcode.com/problems/promise-pool/) [Solution](https://github.com/harish-aka-shivi/algo-ds/blob/main/nativeJs/promisePool.ts)
- 2676: Throttle [Leetcode](https://leetcode.com/problems/throttle/) [Solution](https://github.com/harish-aka-shivi/algo-ds/blob/main/nativeJs/throttle.ts)
- 2627: Debounce [Leetcode](https://leetcode.com/problems/debounce/) [Solution](https://github.com/harish-aka-shivi/algo-ds/blob/main/nativeJs/debounce.ts)
- 2623: Memoize [Leetcode](https://leetcode.com/problems/memoize/) [Solution](https://github.com/harish-aka-shivi/algo-ds/blob/main/nativeJs/memoize.ts)
# Two Pointer
- 125: Valid Palindrome [Leetcode](https://leetcode.com/problems/valid-palindrome/) [Solution](https://github.com/harish-aka-shivi/algo-ds/blob/main/twoPointer/palindrome.ts)# Recursion
- 50: Pow(x, n) [Leetcode](https://leetcode.com/problems/powx-n/) [Solution](https://github.com/harish-aka-shivi/algo-ds/blob/main/recursion/powerFunction.ts)- 1752: Check if Array Is Sorted and Rotated [Leetcode](https://leetcode.com/problems/check-if-array-is-sorted-and-rotated/) [Solution](https://github.com/harish-aka-shivi/algo-ds/blob/main/recursion/arrayIsSorted.ts)
# 2d array
- 118: Pascal's Triangle [Leetcode](https://leetcode.com/problems/pascals-triangle/) [Solution](https://github.com/harish-aka-shivi/algo-ds/blob/main/twoDArray/pascalTriangle.ts)