Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/anthoruiz/algorithmdatastructure
https://github.com/anthoruiz/algorithmdatastructure
Last synced: 13 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/anthoruiz/algorithmdatastructure
- Owner: AnthoRuiz
- Created: 2023-10-05T18:34:57.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-11-29T10:56:38.000Z (about 1 year ago)
- Last Synced: 2024-11-07T04:44:40.408Z (2 months ago)
- Language: Python
- Size: 53.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Data Structure and FAANG Exercises using Python
## Array, String, HashMap
- Check String Array is Unique [here](https://github.com/AnthoRuiz/AlgorithmDataStructure/blob/main/ArraysStringsHashTables/CheckArray.py)
- Group Anagrams **(Leetcode #49)** [here](https://github.com/AnthoRuiz/AlgorithmDataStructure/blob/main/ArraysStringsHashTables/GroupAnagrams.py)
- Two Sum **(Leetcode #1)** [here](https://github.com/AnthoRuiz/AlgorithmDataStructure/blob/main/ArraysStringsHashTables/TwoSum.py)
- Set Matrix Zeroes **(Leetcode #73)** [here](https://github.com/AnthoRuiz/AlgorithmDataStructure/blob/main/ArraysStringsHashTables/SetMatrixZeroes.py)
- Reverse String **(Leetcode #344)** [here](https://github.com/AnthoRuiz/AlgorithmDataStructure/blob/main/ArraysStringsHashTables/ReverseArray.py)
- Palindrome **(Leetcode #125)** [here](https://github.com/AnthoRuiz/AlgorithmDataStructure/blob/main/ArraysStringsHashTables/Palindrome.py)
- Reverse Integer **(Leetcode #7)** [here](https://github.com/AnthoRuiz/AlgorithmDataStructure/blob/main/ArraysStringsHashTables/ReverseInteger.py)
- Valid Anagram **(Leetcode #242)** [here](https://github.com/AnthoRuiz/AlgorithmDataStructure/blob/main/ArraysStringsHashTables/Anagram.py)
- PlusOne **(Leetcode #66)** [here](https://github.com/AnthoRuiz/AlgorithmDataStructure/blob/main/ArraysStringsHashTables/PlusOne.py)
- Climbing Stairs **(Leetcode #70)** [here](https://github.com/AnthoRuiz/AlgorithmDataStructure/blob/main/ArraysStringsHashTables/ClimbingStairs.py)
- Find the Index of the First Occurrence in a String **(Leetcode #28)** [here](https://github.com/AnthoRuiz/AlgorithmDataStructure/blob/main/ArraysStringsHashTables/NeedleHaystack.py)
- Kth Distinct String in an Array **(Leetcode #2053)** [here](https://github.com/AnthoRuiz/AlgorithmDataStructure/blob/main/ArraysStringsHashTables/KthDistinct.py)
- String Compression **(Leetcode #443)** [here](https://github.com/AnthoRuiz/AlgorithmDataStructure/blob/main/ArraysStringsHashTables/StringCompression.py)
- Move Zeroes **(Leetcode #443)** [here](https://github.com/AnthoRuiz/AlgorithmDataStructure/blob/main/ArraysStringsHashTables/MoveZeroes.py)
- Buddy String **(Leetcode #443)** [here](https://github.com/AnthoRuiz/AlgorithmDataStructure/blob/main/ArraysStringsHashTables/BuddyStrings.py)
- Longest Common Subsequence (P.D)**(Leetcode #1143)** [here](https://github.com/AnthoRuiz/AlgorithmDataStructure/blob/main/ArraysStringsHashTables/LongestCommonSubsequence.py)
- Coin Change (P.D)**(Leetcode #322)** [here](https://github.com/AnthoRuiz/AlgorithmDataStructure/blob/main/ArraysStringsHashTables/CoinChange.py)
- HouseRobber (P.D)**(Leetcode #198)** [here](https://github.com/AnthoRuiz/AlgorithmDataStructure/blob/main/ArraysStringsHashTables/HouseRobber.py)
- Fibonacci and Tribonacci **(Leetcode #1137, #509)** [here](https://github.com/AnthoRuiz/AlgorithmDataStructure/blob/main/ArraysStringsHashTables/Fibonacci.py)
- Best Time to Buy and Sell Stock (Sliding Window) **(Leetcode #121)** [here](https://github.com/AnthoRuiz/AlgorithmDataStructure/blob/main/ArraysStringsHashTables/MaxProfit.py)
- Isomorphic Strings **(Leetcode #205)** [here](https://github.com/AnthoRuiz/AlgorithmDataStructure/blob/main/ArraysStringsHashTables/IsomorphicStrings.py)
- Word Pattern **(Leetcode #290)** [here](https://github.com/AnthoRuiz/AlgorithmDataStructure/blob/main/ArraysStringsHashTables/WordPattern.py)
- Roman to Int, Int to Roman **(Leetcode #13, #12)** [here](https://github.com/AnthoRuiz/AlgorithmDataStructure/blob/main/ArraysStringsHashTables/RomanToInteger.py)
- Concatenated Words **(Leetcode #472)** [here](https://github.com/AnthoRuiz/AlgorithmDataStructure/blob/main/ArraysStringsHashTables/ConcatenatedWords.py)
- Word Break **(Leetcode #139)** [here](https://github.com/AnthoRuiz/AlgorithmDataStructure/blob/main/ArraysStringsHashTables/WordBreak.py)
- Concatenation Of Array **(Leetcode #1929)** [here](https://github.com/AnthoRuiz/AlgorithmDataStructure/blob/main/ArraysStringsHashTables/ConcatenationOfArray.py)
- Remove Element **(Leetcode #27)** [here](https://github.com/AnthoRuiz/AlgorithmDataStructure/blob/main/ArraysStringsHashTables/RemoveElement.py)
- Is Subsequence **(Leetcode #392)** [here](https://github.com/AnthoRuiz/AlgorithmDataStructure/blob/main/ArraysStringsHashTables/IsSubsequence.py)
- Counting Bits **(Leetcode #338)** [here](https://github.com/AnthoRuiz/AlgorithmDataStructure/blob/main/ArraysStringsHashTables/CountingBits.py)
- Length Of Last Word **(Leetcode #58)** [here](https://github.com/AnthoRuiz/AlgorithmDataStructure/blob/main/ArraysStringsHashTables/LengthofLastWord.py)
- Min Cost Climbing Stairs **(Leetcode #746)** [here](https://github.com/AnthoRuiz/AlgorithmDataStructure/blob/main/ArraysStringsHashTables/MinCostClimbingStairs.py)
- Single Number **(Leetcode #136)** [here](https://github.com/AnthoRuiz/AlgorithmDataStructure/blob/main/ArraysStringsHashTables/SingleNumber.py)
- Pascal Triangle **(Leetcode #118 )** [here](https://github.com/AnthoRuiz/AlgorithmDataStructure/blob/main/ArraysStringsHashTables/PascalTriangle.py)
- Merge Sorted Array **(Leetcode #88 )** [here](https://github.com/AnthoRuiz/AlgorithmDataStructure/blob/main/ArraysStringsHashTables/MergeSortedArray.py)
- Majority Element **(Leetcode #169 )** [here](https://github.com/AnthoRuiz/AlgorithmDataStructure/blob/main/ArraysStringsHashTables/MajorityElement.py)
- Contains Duplicate **(Leetcode #217 )** [here](https://github.com/AnthoRuiz/AlgorithmDataStructure/blob/main/ArraysStringsHashTables/ContainsDuplicate.py)
- Island Perimeter **(Leetcode #463 )** [here](https://github.com/AnthoRuiz/AlgorithmDataStructure/blob/main/ArraysStringsHashTables/IslandPerimeter.py)
- Flood Fill **(Leetcode #733 )** [here](https://github.com/AnthoRuiz/AlgorithmDataStructure/blob/main/ArraysStringsHashTables/FloodFill.py)
- Remove DuplicatesArray **(Leetcode #26 )** [here](https://github.com/AnthoRuiz/AlgorithmDataStructure/blob/main/ArraysStringsHashTables/RemoveDuplicatesArray.py)
- Happy Number **(Leetcode #202 )** [here](https://github.com/AnthoRuiz/AlgorithmDataStructure/blob/main/ArraysStringsHashTables/IsHappy.py)
- Summary Ranges **(Leetcode #228 )** [here](https://github.com/AnthoRuiz/AlgorithmDataStructure/blob/main/ArraysStringsHashTables/SummaryRanges.py)## Linked List, Doubly Linked List, Stacks and Queues
- Linked List Implementation [here](https://github.com/AnthoRuiz/AlgorithmDataStructure/blob/main/LinkedLists/LinkedList.py)
- **This Implementation contains the follow features**:
- insert_start() → **O(1)**
- insert_end() → **O(N)**
- traverse() → **O(N)**
- remove_first → **O(1)**
- remove_end → **O(N)**
- remove(element_to_remove) → **O(N)**
- insert_at(element, index) → **O(N)**
- reverse() → **O(N)**
- reverse_between() **(Leetcode #92 )**
- get_middle_node() → **O(N)**
- Doubly Linked List Implementation [here](https://github.com/AnthoRuiz/AlgorithmDataStructure/blob/main/DoublyLinkedList/DoublyLinkedList.py)
- This Implementation contains the follow features:
- traverse_forward() → **O(N)**
- traverse_backward() → **O(N)**
- insert_end() → **O(1)**
- insert_start() → **O(1)**- Stack Implementation Using Array [here](https://github.com/AnthoRuiz/AlgorithmDataStructure/blob/main/StackQueue/Stack.py)
- Queue Implementation Using Array [here](https://github.com/AnthoRuiz/AlgorithmDataStructure/blob/main/StackQueue/Queue.py)
- Get MaxValue of a Stack using an auxiliary stack [here](https://github.com/AnthoRuiz/AlgorithmDataStructure/blob/main/StackQueue/MaxStack.py)## Binary Search Tree (BST), AVL Tree, Red-Black Tree and Heaps
- BST [here](https://github.com/AnthoRuiz/AlgorithmDataStructure/blob/main/BinarySearchTree/BinarySearchTree.py)
- This Implementation contains the follow features:
- insert → **O(long(N))**
- remove → **O(H) H is the Height of the tree**
- get_max → **O(long(N))**
- get_min → **O(long(N))**
- in_order() → **O(N)**
- pre_order() → **O(N)**
- post_order() → **O(N)**
- is_valid_BST **(Leetcode #98 )** [here](https://github.com/AnthoRuiz/AlgorithmDataStructure/blob/main/BinarySearchTree/BinarySearchTree.py#L154)
- Same Tree **(Leetcode #100 )** [here](https://github.com/AnthoRuiz/AlgorithmDataStructure/blob/main/BinarySearchTree/TreeComparator.py)- AVL Tree [here](https://github.com/AnthoRuiz/AlgorithmDataStructure/blob/main/BinarySearchTree/AVLTree.py)
- This Implementation contains the follow features:
- insert()
- remove()
- in_order()- Red Black Tree [here](https://github.com/AnthoRuiz/AlgorithmDataStructure/blob/main/BinarySearchTree/RedBlackTree.py)
- This Implementation contains the follow features:
- insert()
- in_order()- Heap [here](https://github.com/AnthoRuiz/AlgorithmDataStructure/blob/main/BinarySearchTree/Heap.py)
- This Implementation contains the follow features:
- insert()
- get_max()
- poll()
- heap_sort()
- check_max_heap()This project is licensed under the terms of the **MIT** license