An open API service indexing awesome lists of open source software.

https://github.com/blossom-babs/data-structures-and-algorithm

Data structures and algorithms solutions in javascript and pythong - arrays, linked list, trees, lists, object oriented programming
https://github.com/blossom-babs/data-structures-and-algorithm

algorithm algorithms data-structures javascript jest-tests leetcode

Last synced: 3 months ago
JSON representation

Data structures and algorithms solutions in javascript and pythong - arrays, linked list, trees, lists, object oriented programming

Awesome Lists containing this project

README

        

# Data structure and algorithms

Exercising my problem solving skills by solving coding challenges and optimizing my result for best solution with data structures and complexity analysis.

Find solutions [here](https://github.com/blossom-babs/Data-structures-and-algorithm/blob/main/leetcode)

## Solutions to [Sean Prashad Pattern](https://seanprashad.com/leetcode-patterns/) curated list

| No | LC Index | Question | Python Soln | Javascript soln | Difficulty | Tags |
| -- | -------- | -------- | ----------- | --------------- | ---------- | ---- |
| 1 | 217 | [Contains Duplicate](https://leetcode.com/problems/contains-duplicate/) | [Solution](https://github.com/blossom-babs/Data-structures-and-algorithm/blob/main/leetcode/sean-prashad/python/1-containsDups.py) | | Easy | Array, Hash Table, Sorting |
| 2 | 268 | [Missing Number](https://leetcode.com/problems/missing-number/) | [Solution](https://github.com/blossom-babs/Data-structures-and-algorithm/blob/main/leetcode/sean-prashad/python/2-missingNumber.py) | | Easy | Array, Hash Table, Math, Sorting, Binary search, Bit Manipulation |
| 3 | 448 | [ Find All Numbers Disappeared in an Array](https://leetcode.com/problems/find-all-numbers-disappeared-in-an-array/) | [Solution](https://github.com/blossom-babs/Data-structures-and-algorithm/blob/main/leetcode/sean-prashad/python/3-findDisappearedNumbers.py) | | Easy | Array, Hash Table |
| 4 | 136 | [Single Number](https://leetcode.com/problems/single-number/submissions/) | [Solution](https://github.com/blossom-babs/Data-structures-and-algorithm/blob/main/leetcode/sean-prashad/python/4-singleNumber.py) | | Easy | Array, Bit Manipulation |
| 5 | 70 | [Climbing Stairs](https://leetcode.com/problems/climbing-stairs/) | [Solution](https://github.com/blossom-babs/Data-structures-and-algorithm/blob/main/leetcode/sean-prashad/python/5-climbingStairs.py) | | Easy | Math, Dynamic Programming, Memoization |
| 6 | 121 | [Best Time to Buy and sell stock](https://leetcode.com/problems/best-time-to-buy-and-sell-stock/) | [Solution](https://github.com/blossom-babs/Data-structures-and-algorithm/blob/main/leetcode/sean-prashad/python/6-bestTimeToSell.py) | | Easy | Array, Dynamic Programming |
| 7 | 303 | [Range Sum Query Immutable](https://leetcode.com/problems/range-sum-query-immutable/) | [Solution](https://github.com/blossom-babs/Data-structures-and-algorithm/blob/main/leetcode/sean-prashad/python/7-rangeSumQuery.py) | | Easy | Array, Design, Prefix Sum |
| 8 | 141 | [Linked List Cycle](https://leetcode.com/problems/linked-list-cycle/) | [Solution](https://github.com/blossom-babs/Data-structures-and-algorithm/blob/main/leetcode/sean-prashad/python/8-hasCycle.py) | | Easy | Hash Table, Linked List, Two Pointers |
| 9 | 876 | [Middle of the linked list](https://leetcode.com/problems/middle-of-the-linked-list/) | [Solution](https://github.com/blossom-babs/Data-structures-and-algorithm/blob/main/leetcode/sean-prashad/python/9-middleLinkedList.py) | | Easy | Linked List, Two Pointers |
| 10 | 234 | [Palindrome linked list](https://leetcode.com/problems/palindrome-linked-list/) | [Solution](https://github.com/blossom-babs/Data-structures-and-algorithm/blob/main/leetcode/sean-prashad/python/10-palindromeLList.py) | | Easy | Linked List, Two Pointers, Stack Recursion |
| 11 | 206 | [Reverse linked list](https://leetcode.com/problems/reverse-linked-list/) | [Solution](https://github.com/blossom-babs/Data-structures-and-algorithm/blob/main/leetcode/sean-prashad/python/11-reverseLList.py) | | Easy | Linked List, Stack Recursion |
| 12 | 203 | [Remove linked list Elements](https://leetcode.com/problems/remove-linked-list-elements//) | [Solution](https://github.com/blossom-babs/Data-structures-and-algorithm/blob/main/leetcode/sean-prashad/python/12-removeLListEl.py) | | Easy | Linked List, Recursion |
| 13 | 83 | [Remove Duplicates from sorted List](https://leetcode.com/problems/remove-duplicates-from-sorted-list/) | [Solution](https://github.com/blossom-babs/Data-structures-and-algorithm/blob/main/leetcode/sean-prashad/python/13-removeDupsSortedLList.py) | | Easy | Linked List |
| 14 | 21 | [Merge Two sorted List](https://leetcode.com/problems/merge-two-sorted-lists/) | [Solution](https://github.com/blossom-babs/Data-structures-and-algorithm/blob/main/leetcode/sean-prashad/python/14-mergeTwoSortedList.py) | | Easy | Linked List, Recursion |
| 15 | 704 | [Binary Search](https://leetcode.com/problems/binary-search/) | [Solution](https://github.com/blossom-babs/Data-structures-and-algorithm/blob/main/leetcode/sean-prashad/python/15-binarySearch.py) | [Solution](https://github.com/blossom-babs/Data-structures-and-algorithm/blob/main/leetcode/sean-prashad/Javascript/15-binarySearch.test.js) | Easy | Binary Search, Array |
| 16 | 744 | [Find Smallest Letter Greater than Target](https://leetcode.com/problems/find-smallest-letter-greater-than-target) | [Solution](https://github.com/blossom-babs/Data-structures-and-algorithm/blob/main/leetcode/sean-prashad/python/16-nextGreatestLetter.py) | [Solution](https://github.com/blossom-babs/Data-structures-and-algorithm/blob/main/leetcode/sean-prashad/Javascript/16-nextGreatestLetter.test.js) | Easy | Binary Search, Array |
| 17 | 637 | [Average of Levels in Binary Tree](https://leetcode.com/problems/average-of-levels-in-binary-tree/) | [Solution](https://github.com/blossom-babs/Data-structures-and-algorithm/blob/main/leetcode/sean-prashad/python/17-avgOfLevels.py) | [Solution](https://github.com/blossom-babs/Data-structures-and-algorithm/blob/main/leetcode/sean-prashad/Javascript/17-avgOfLevels.test.js) | Easy | Tree, BFS, DFS, Binary Tree |
| 18 | 111 | [Minimum Depth of Binary Tree](https://leetcode.com/problems/minimum-depth-of-binary-tree/) | [Solution](https://github.com/blossom-babs/Data-structures-and-algorithm/blob/main/leetcode/sean-prashad/python/18-minDepth.py) | [Solution](https://github.com/blossom-babs/Data-structures-and-algorithm/blob/main/leetcode/sean-prashad/Javascript/18-minDeptht.test.js) | Easy | Tree, BFS, DFS, Binary Tree |
| 19 | 104 | [Maximum Depth of Binary Tree](https://leetcode.com/problems/maximum-depth-of-binary-tree/) | [Solution](https://github.com/blossom-babs/Data-structures-and-algorithm/blob/main/leetcode/sean-prashad/python/19-maxDepth.py) | [Solution](https://github.com/blossom-babs/Data-structures-and-algorithm/blob/main/leetcode/sean-prashad/Javascript/19-maxDepth.test.js) | Easy | Tree, BFS, DFS, Binary Tree |
| 20 | 100 | [Same Tree](https://leetcode.com/problems/same-tree/) | [Solution](https://github.com/blossom-babs/Data-structures-and-algorithm/blob/main/leetcode/sean-prashad/python/20-isSameTree.py) | [Solution](https://github.com/blossom-babs/Data-structures-and-algorithm/blob/main/leetcode/sean-prashad/Javascript/20-isSameTree.test.js) | Easy | Tree, BFS, DFS, Binary Tree |
| 21 | 112 | [Path Sum](https://leetcode.com/problems/path-sum/) | [Solution](https://github.com/blossom-babs/Data-structures-and-algorithm/blob/main/leetcode/sean-prashad/python/21-pathSum.py) | [Solution](https://github.com/blossom-babs/Data-structures-and-algorithm/blob/main/leetcode/sean-prashad/Javascript/21-pathSum.test.js) | Easy | Tree, BFS, DFS, Binary Tree |
| 22 | 1 | [Two Sum](https://leetcode.com/problems/two-sum/) | [Solution](https://github.com/blossom-babs/Data-structures-and-algorithm/blob/main/leetcode/sean-prashad/python/22-twoSum.py) | [Solution](https://github.com/blossom-babs/Data-structures-and-algorithm/blob/main/leetcode/sean-prashad/Javascript/23-twoSum.test.js) | Easy | Array, Hash Table |
| 23 | 226 | [Invert Binary Tree](https://leetcode.com/problems/invert-binary-tree/) | [Solution](https://github.com/blossom-babs/Data-structures-and-algorithm/blob/main/leetcode/sean-prashad/python/23-invertBinaryTree.py) | [Solution](https://github.com/blossom-babs/Data-structures-and-algorithm/blob/main/leetcode/sean-prashad/Javascript/23-invertBinaryTree.test.js) | Easy | Tree, BFS, DFS, Binary Tree |
| 24 | 572 | [Subtree of another Tree](https://leetcode.com/problems/subtree-of-another-tree/) | [Solution](https://github.com/blossom-babs/Data-structures-and-algorithm/blob/main/leetcode/sean-prashad/python/24-subTree.py) | [Solution](https://github.com/blossom-babs/Data-structures-and-algorithm/blob/main/leetcode/sean-prashad/Javascript/24-subTree.test.js) | Easy | Tree, BFS, DFS, Binary Tree |
| 25 | 977 | [Squares of a sorted array](https://leetcode.com/problems/squares-of-a-sorted-array/) | [Solution](https://github.com/blossom-babs/Data-structures-and-algorithm/blob/main/leetcode/sean-prashad/python/25-squareSortedArr.py) | [Solution](https://github.com/blossom-babs/Data-structures-and-algorithm/blob/main/leetcode/sean-prashad/Javascript/25-squareSortedArr.test.js) | Easy | Array, Two Pointers, Sorting |
| 26 | 844 | [Backspace String Compare](https://leetcode.com/problems/backspace-string-compare/description/) | [Solution](https://github.com/blossom-babs/Data-structures-and-algorithm/blob/main/leetcode/sean-prashad/python/26-backspaceStringCompare.py) | [Solution](https://github.com/blossom-babs/Data-structures-and-algorithm/blob/main/leetcode/sean-prashad/Javascript/26-backSpaceStringCompare.test.js) | Easy | Two Pointers, String, Stack, Simulation |
| 27 | 169 | [Majority Element](https://leetcode.com/problems/majority-element) | [Solution](-) | [Solution](https://github.com/blossom-babs/Data-structures-and-algorithm/blob/main/leetcode/sean-prashad/Javascript/27-majorityElement.test.js) | Easy | Array, Hash table, divide and conquer, sorting, counting |
| Bonus | 142 | [Linked List cycle II](https://leetcode.com/problems/linked-list-cycle-ii/submissions/) | [Solution](https://github.com/blossom-babs/Data-structures-and-algorithm/blob/main/leetcode/sean-prashad/python/bonus-linkedlistII.py) | | Easy | Hash Table, Linked List, Two Pointers |

# Chore

1. Test linked list problem in sean prashad pattern