- Notifications
You must be signed in to change notification settings - Fork0
Algorithms and data structures are fundamental to efficient code . This repository demonstrate how to implement common data structures and algorithms in the simplest and most elegant ways. It also has some practice problems on different topics. (The code was written by me)
NotificationsYou must be signed in to change notification settings
RaghadHanon/Algorithms-and-data-structures
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
- Bubble sort - O(n2)
- Heapsort- O(nlog(n))
- Insertion sort - O(n2)
- Mergesort - O(nlog(n))
- Selection sort - O(n2)
- Quicksort (first element as a pivot) - Θ(nlog(n))
- Quicksort (last element as a pivot) - Θ(nlog(n))
- Quicksort (middle element as a pivot) - Θ(nlog(n))
- Depth first search (adjacency matrix, iterative) - O(V+E)
- Depth first search (adjacency matrix, recursion) - O(V+E)
- Depth first search (adjacency list, iterative) - O(V+E)
- Depth first search (adjacency list, recursion) - O(V+E)
- Breadth first search & Shortest Bath (adjacency matrix, iterative) - O(V+E)
- Breadth first search & Shortest Bath (adjacency list, iterative) - O(V+E)
- Invert Binary Tree
- Maximum Depth of Binary Tree
- Diameter of Binary Tree
- Balanced Binary Tree
- Same Tree
- Subtree of Another Tree
- Sum of Left Leaves
- Binary Tree Paths
- Symmetric Tree
- Increasing Order Search Tree
- Binary Tree Level Order Traversal
- Validate Binary Search Tree
- Count Good Nodes in Binary Tree
- Minimum Distance Between BST Nodes
- Convert Sorted Array to Binary Search Tree
- Count Complete Tree Nodes
- Check Completeness of a Binary Tree
- Reverse Odd Levels of Binary Tree
- Binary Tree Zigzag Level Order Traversal
- Lowest Common Ancestor of a Binary Search Tree
- Construct Binary Search Tree from Preorder Traversal
- Binary Tree Maximum Path Sum
- Binary Tree Right Side View
- Kth Smallest Element in a BST
- Reverse Linked List
- Middle of the Linked List
- Reorder List
- Rotate List
- Linked List Cycle
- Linked List Cycle II
- Intersection of Two Linked Lists
- Intersection of Two Linked Lists then modify
- Palindrome Linked List
- Swapping Nodes in a Linked List
- Merge Two Sorted Lists
- Remove Nth Node From End of List
- Add Two Numbers
- Remove Duplicates from Sorted List
- Odd Even Linked List
- Delete Node in a Linked List
- Reverse Linked List II
- Remove Duplicates from Sorted List II
- Remove Zero Sum Consecutive Nodes from Linked List
- Find the Minimum and Maximum Number of Nodes Between Critical Points
- Split Linked List in Parts
- Add number k to a sorted stack
- Sort a stack
- Arithmetic Expressions
- Remove All Adjacent Duplicates In String
- Validate Stack Sequences
- Next Greater Node In Linked List
- Remove All Adjacent Duplicates in String II
- Valid Parentheses
- Minimum Add to Make Parentheses Valid
- Find Minimum number
- Reverse a stack
- Reverse Substrings Between Each Pair of Parentheses
About
Algorithms and data structures are fundamental to efficient code . This repository demonstrate how to implement common data structures and algorithms in the simplest and most elegant ways. It also has some practice problems on different topics. (The code was written by me)
Topics
Resources
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
No releases published
Packages0
No packages published