Skip to content

A beginner-friendly collection of algorithms and data structures in multiple languages. Open for Hacktoberfest 2025 contributions!

License

Notifications You must be signed in to change notification settings

uptouplaksh/Open-Source-DS-Algo

We are done for this year. We look forward to seeing you at Hacktoberfest 2026. Until then, HAPPY CODING!

The Algorithm & Data Structure Hub πŸš€

Hacktoberfest

Welcome to The Algorithm & Data Structure Hub! This repository is a community-driven collection of common algorithms and data structures implemented in various programming languages. It's a resource for learning and a place for developers to make their first meaningful open-source contributions.

🌟 Project Goals

The mission of this repository is to become a high-quality, community-curated resource for learning fundamental algorithms and data structures. While we enthusiastically participate in events like Hacktoberfest, our primary goal is to create a lasting educational tool for developers of all skill levels. We are committed to maintaining a high standard of quality for all contributions.

πŸŽƒ Contributing

Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

This project was built to be a welcoming and organized space for developers to make their first meaningful open-source contributions. We have a detailed guide on how to get started, including our folder structure, coding standards, and the entire pull request workflow.

HEAD πŸ‘‰ To get started, please read our Contributing Guidelines (CONTRIBUTING.md)!

Pull requests that do not follow these guidelines will be marked as invalid and closed.

Required Folder Structure

Your contribution MUST follow this structure to be accepted.

/data_structures
    /LinkedList
        /python
            /singly_linked_list.py
        /javascript
            /SinglyLinkedList.js
/algorithms
    /sorting
        /bubble_sort
            /c_plus_plus
                /bubble_sort.cpp

Repository Structure

The repository is organized to make it easy to explore algorithms and data structure implementations across multiple programming languages.

ALGORITHMS

algorithms
β”œβ”€β”€ array
β”‚Β  Β β”œβ”€β”€ dutch_national_flag
β”‚Β  Β β”‚Β   └── python
β”‚Β  Β β”‚Β  Β  Β   └── sort_colors.py
β”‚Β  Β β”œβ”€β”€ majority_element
β”‚Β  Β β”‚Β   └── python
β”‚Β  Β β”‚Β  Β  Β   └── majority_element.py
β”‚Β  Β β”œβ”€β”€ max_subarray
β”‚Β  Β β”‚Β   └── python
β”‚Β  Β β”‚Β  Β  Β  Β β”œβ”€β”€ kadane.py
β”‚Β  Β β”‚Β  Β  Β   └── test_kadane.py
β”‚Β  Β β”œβ”€β”€ merge_sorted
β”‚Β  Β β”‚Β   └── javascript
β”‚Β  Β β”‚Β  Β  Β   └── MergeSorted.js
β”‚Β  Β β”œβ”€β”€ missing_number
β”‚Β  Β β”‚Β   └── python
β”‚Β  Β β”‚Β  Β  Β   └── missing_number.py
β”‚Β  Β β”œβ”€β”€ move_zeroes
β”‚Β  Β β”‚Β   └── python
β”‚Β  Β β”‚Β  Β  Β   └── move_zeroes.py
β”‚Β  Β β”œβ”€β”€ pascals_triangle
β”‚Β  Β β”‚Β   └── python
β”‚Β  Β β”‚Β  Β  Β   └── pascals_triangle.py
β”‚Β  Β β”œβ”€β”€ product_except_self
β”‚Β  Β β”‚Β   └── python
β”‚Β  Β β”‚Β  Β  Β   └── product.py
β”‚Β  Β β”œβ”€β”€ rotate
β”‚Β  Β β”‚Β   └── python
β”‚Β  Β β”‚Β  Β  Β   └── rotate_array.py
β”‚Β  Β β”œβ”€β”€ sliding_window_max
β”‚Β  Β β”‚Β   └── python
β”‚Β  Β β”‚Β  Β  Β   └── sliding_window.py
β”‚Β   └── two_sum
β”‚Β  Β  Β   └── python
β”‚Β  Β  Β  Β  Β  Β β”œβ”€β”€ test_two_sum.py
β”‚Β  Β  Β  Β  Β   └── two_sum.py
β”œβ”€β”€ backtracking
β”‚Β  Β β”œβ”€β”€ n_queens
β”‚Β  Β β”‚Β   └── python
β”‚Β  Β β”‚Β  Β  Β   └── n_queens.py
β”‚Β  Β β”œβ”€β”€ permutations
β”‚Β  Β β”‚Β   └── javascript
β”‚Β  Β β”‚Β  Β  Β   └── Permutations.js
β”‚Β   └── sudoku_solver
β”‚Β  Β  Β   └── python
β”‚Β  Β  Β  Β  Β   └── sudoku.py
β”œβ”€β”€ bit_manipulation
β”‚Β  Β β”œβ”€β”€ check_ith_bit
β”‚Β  Β β”‚Β   └── c
β”‚Β  Β β”‚Β  Β  Β   └── check_bit.c
β”‚Β  Β β”œβ”€β”€ single_number
β”‚Β  Β β”‚Β   └── python
β”‚Β  Β β”‚Β  Β  Β   └── single_number.py
β”‚Β   └── swap_numbers
β”‚Β  Β  Β   └── java
β”‚Β  Β  Β  Β  Β   └── SwapNumbers.java
β”œβ”€β”€ dfs
β”‚   └── python
β”‚       └── dfs.py
β”œβ”€β”€ dynamic_programming
β”‚Β  Β β”œβ”€β”€ coin_change
β”‚Β  Β β”‚Β   └── javascript
β”‚Β  Β β”‚Β  Β  Β  Β β”œβ”€β”€ CoinChange.js
β”‚Β  Β β”‚Β  Β  Β   └── TestCoinChange.js
β”‚Β  Β β”œβ”€β”€ longest_common_subsequence
β”‚Β  Β β”‚Β   └── python
β”‚Β  Β β”‚Β  Β  Β   └── lcs.py
β”‚Β  Β β”œβ”€β”€ rod_cutting
β”‚Β  Β β”‚Β   └── c_plus_plus
β”‚Β  Β β”‚Β  Β  Β   └── rod_cutting.cpp
β”‚Β   └── subset_sum
β”‚Β  Β  Β   └── python
β”‚Β  Β  Β  Β  Β   └── subset_sum.py
β”œβ”€β”€ graph
β”‚Β  Β β”œβ”€β”€ a_star
β”‚Β  Β β”‚Β   └── python
β”‚Β  Β β”‚Β  Β  Β   └── a_star.py
β”‚Β  Β β”œβ”€β”€ bellman_ford
β”‚Β  Β β”‚Β   └── python
β”‚Β  Β β”‚Β  Β  Β   └── bellman_ford.py
β”‚Β  Β β”œβ”€β”€ bfs
β”‚Β  Β β”‚Β   └── python
β”‚Β  Β β”‚Β  Β  Β   └── bfs.py
β”‚Β   └── dijkstra
β”‚Β  Β  Β   └── python
β”‚Β  Β  Β  Β  Β   └── dijkstra.py
β”œβ”€β”€ math
β”‚Β  Β β”œβ”€β”€ factorial
β”‚Β  Β β”‚Β  Β β”œβ”€β”€ c_plus_plus
β”‚Β  Β β”‚Β  Β β”‚Β   └── factorial.cpp
β”‚Β  Β β”‚Β   └── python
β”‚Β  Β β”‚Β  Β  Β  Β β”œβ”€β”€ factorial.py
β”‚Β  Β β”‚Β  Β  Β   └── test_factorial.py
β”‚Β  Β β”œβ”€β”€ fibonacci
β”‚Β  Β β”‚Β  Β β”œβ”€β”€ javascript
β”‚Β  Β β”‚Β  Β β”‚Β   └── FibonacciRecursive.js
β”‚Β  Β β”‚Β   └── python
β”‚Β  Β β”‚Β  Β  Β   └── fibonacci_iterative.py
β”‚Β  Β β”œβ”€β”€ gcd
β”‚Β  Β β”‚Β   └── c_plus_plus
β”‚Β  Β β”‚Β  Β  Β   └── gcd.cpp
β”‚   β”œβ”€β”€ integer_to_roman
β”‚   β”‚   └── java
β”‚   β”‚       └── IntegerToRoman.java
β”‚Β  Β β”œβ”€β”€ power
β”‚Β  Β β”‚Β   └── python
β”‚Β  Β β”‚Β  Β  Β   └── power.py
β”‚Β   └── README.md
β”œβ”€β”€ puzzles
β”‚Β   └── tower_of_hanoi
β”‚Β  Β  Β   └── python
β”‚Β  Β  Β  Β  Β   └── tower_of_hanoi.py
β”œβ”€β”€ README.md
β”œβ”€β”€ searching
β”‚Β  Β β”œβ”€β”€ binary_search
β”‚Β  Β β”‚Β   └── python
β”‚Β  Β β”‚Β  Β  Β   └── binary_search_iterative.py
β”‚Β  Β β”œβ”€β”€ jump_search
β”‚Β  Β β”‚Β   └── java
β”‚Β  Β β”‚Β  Β  Β   └── JumpSearch.java
β”‚Β   └── linear_search
β”‚Β  Β  Β  Β β”œβ”€β”€ java
β”‚Β  Β  Β  Β β”‚Β   └── LinearSearch.java
β”‚Β  Β  Β   └── python
β”‚Β  Β  Β  Β  Β  Β β”œβ”€β”€ linear_search.py
β”‚Β  Β  Β  Β  Β   └── test_linear_search.py
β”œβ”€β”€ sorting
β”‚Β  Β β”œβ”€β”€ bubble_sort
β”‚Β  Β β”‚Β  Β β”œβ”€β”€ python
β”‚Β  Β β”‚Β  Β β”‚Β  Β β”œβ”€β”€ bubble_sort.py
β”‚Β  Β β”‚Β  Β β”‚Β   └── test_bubble_sort.py
β”‚Β  Β β”‚Β   └── rust
β”‚Β  Β β”‚Β  Β  Β   └── bubble_sort.rs
β”‚Β  Β β”œβ”€β”€ counting_sort
β”‚Β  Β β”‚Β   └── python
β”‚Β  Β β”‚Β  Β  Β   └── counting_sort.py
β”‚Β  Β β”œβ”€β”€ heap_sort
β”‚Β  Β β”‚Β   └── java
β”‚Β  Β β”‚Β  Β  Β   └── HeapSort.java
β”‚Β  Β β”œβ”€β”€ insertion_sort
β”‚Β  Β β”‚Β  Β β”œβ”€β”€ java
β”‚Β  Β β”‚Β  Β β”‚Β   └── InsertionSort.java
β”‚Β  Β β”‚Β   └── python
β”‚Β  Β β”‚Β  Β  Β  Β β”œβ”€β”€ insertion_sort.py
β”‚Β  Β β”‚Β  Β  Β   └── test_insertion_sort.py
β”‚Β  Β β”œβ”€β”€ quick_sort
β”‚Β  Β β”‚Β   └── javascript
β”‚Β  Β β”‚Β  Β  Β   └── QuickSort.js
β”‚Β  Β β”œβ”€β”€ radix_sort
β”‚Β  Β β”‚Β   └── c_plus_plus
β”‚Β  Β β”‚Β  Β  Β   └── radix_sort.cpp
β”‚Β   └── selection_sort
β”‚Β  Β  Β   └── python
β”‚Β  Β  Β  Β  Β   └── selection_sort.py
β”œβ”€β”€ string
β”‚Β  Β β”œβ”€β”€ anagram
β”‚Β  Β β”‚Β   └── python
β”‚Β  Β β”‚Β  Β  Β   └── anagram.py
β”‚Β  Β β”œβ”€β”€ first_non_repeating
β”‚Β  Β β”‚Β   └── java
β”‚Β  Β β”‚Β  Β  Β   └── FirstNonRepeating.java
β”‚Β  Β β”œβ”€β”€ group_anagrams
β”‚Β  Β β”‚Β   └── python
β”‚Β  Β β”‚Β  Β  Β   └── group_anagrams.py
β”‚Β  Β β”œβ”€β”€ longest_palindrome
β”‚Β  Β β”‚Β   └── python
β”‚Β  Β β”‚Β  Β  Β   └── longest_palindrome.py
β”‚Β  Β β”œβ”€β”€ palindrome
β”‚Β  Β β”‚Β   └── python
β”‚Β  Β β”‚Β  Β  Β   └── palindrome.py
β”‚Β  Β β”œβ”€β”€ README.md
β”‚Β  Β β”œβ”€β”€ reverse
β”‚Β  Β β”‚Β   └── javascript
β”‚Β  Β β”‚Β  Β  Β   └── ReverseString.js
β”‚Β   └── valid_parentheses
β”‚Β  Β  Β   └── python
β”‚Β  Β  Β  Β  Β   └── valid_parentheses.py
└── tree
Β  Β  β”œβ”€β”€ invert
Β  Β  β”‚Β   └── python
Β  Β  β”‚Β  Β  Β  Β β”œβ”€β”€ invert_tree.py
Β  Β  β”‚Β  Β  Β   └── test_invert_tree.py
Β  Β  β”œβ”€β”€ max_depth
Β  Β  β”‚Β   └── python
Β  Β  β”‚Β  Β  Β   └── max_depth.py
Β  Β  └── traversal
Β  Β  Β  Β  β”œβ”€β”€ java
Β  Β  Β  Β  β”‚Β   └── PostOrder.java
Β  Β  Β  Β  └── python
Β  Β  Β  Β  Β  Β  └── level_order.py

DATA STRUCTURES

data_structures
β”œβ”€β”€ Deque
β”‚Β   └── python
β”‚Β  Β  Β   └── deque.py
β”œβ”€β”€ FenwickTree
β”‚Β   └── c_plus_plus
β”‚Β  Β  Β   └── fenwick_tree.cpp
β”œβ”€β”€ Graph
β”‚Β   └── python
β”‚Β  Β  Β   └── graph_adjacency_list.py
β”œβ”€β”€ HashTable
β”‚Β   └── javascript
β”‚Β  Β  Β   └── HashTable.js
β”œβ”€β”€ Heap
β”‚Β   └── python
β”‚Β  Β  Β   └── min_heap.py
β”œβ”€β”€ LinkedList
β”‚Β  Β β”œβ”€β”€ c_plus_plus
β”‚Β  Β β”‚Β   └── doubly_linked_list.cpp
β”‚Β  Β β”œβ”€β”€ java
β”‚Β  Β β”‚Β   └── CircularLinkedList.java
β”‚Β   └── python
β”‚Β  Β  Β  Β β”œβ”€β”€ interactive_demo.py
β”‚Β  Β  Β   └── singly_linked_list.py
β”œβ”€β”€ Queue
β”‚Β   └── python
β”‚Β  Β  Β   └── queue_using_stack.py
β”œβ”€β”€ README.md
β”œβ”€β”€ Stack
β”‚Β  Β β”œβ”€β”€ c
β”‚Β  Β β”‚Β   └── stack.c
β”‚Β  Β β”œβ”€β”€ javascript
β”‚Β  Β β”‚Β   └── Stack.js
β”‚Β   └── python
β”‚Β  Β  Β   └── stack.py
└── Tree
Β  Β  └── python
Β  Β  Β  Β  └── avl_tree.py

License

This project is licensed under the MIT License.

About

A beginner-friendly collection of algorithms and data structures in multiple languages. Open for Hacktoberfest 2025 contributions!

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 62