Skip to content

Dive into algorithms, data structures, and competitive programming solutions in multiple languages. Active since Hacktoberfest 2020!

License

Notifications You must be signed in to change notification settings

sobhanbera/algorithms

Repository files navigation

HACKTOBERFEST 2023

image

Star The Repository if it helped you in any direction.

Algorithms and Data-Structures.

This is a repository to get Algorithms and data-structures in many languages.

Everybody is welcomed to contribute to this repo.

Overview

The goal of this project is to help the beginners with their contributions in Open Source. We aim to achieve this collaboratively, so feel free to contribute in any way you want, just make sure to follow the contribution guidelines. You can contribute to it in either of the following ways: You can choose at least any one option below or can add any algorithm or data-structure you like:

  • Beginners:
    • A simple algorithm you know in any language.
    • Add any easy competitive programming question you like.
  • Intermediate:
    • Add any algorithm you like.
    • Add any data-structure implementation.
    • Add any interview question as comment and solution in any language.
  • Experienced:
    • Add any important algorithm in any language.
    • Add any game in your favorite programming language!
    • Add any Hard Problem from competitive programming website.
    • Add any interview question as comment and solution in any language.

Implementations ⚙

Quick Start 🌟

  • You must be assigned to an issue before this steps.
  • Fork this repo.
  • Clone the repo or type this commands.
    git clone https://github.com/<your_username_here>/algorithms.git
  • Start writing you code, when done with the code part type this commands.
    git add .
    git commit -m "<what_you_have_contributed>"
    git push
  • Then make a PR to this repo and wait for the merge.
  • That's it you have contributed to open source.
  • If you enjoyed this you can do it again with another code.

What is Hacktoberfest?

Hacktoberfest is a month long virtual festival event to celebrate open source contributions presented by Digital Ocean and DEV. It is the easiest way to get into open source!

During the entire month of October 2023, all you have to do is contribute to any open source projects and open at least 4 pull requests. Yes, any project and any kind of contributions.

Why Should I Contribute?

The Hacktoberfest’s simple plain objective is: Support open source and earn a limited edition T-shirt! But, it’s not just about the t-shirts or stickers. Its about supporting open source. Its about celebrating open source, and giving it back. If you’ve never contributed to open source before, this is the perfect time to get started because Hacktoberfest provides a large list of available contribution opportunities.

What Can I Contribute?

Hacktoberfest® is open to everyone in our global community. Whether you’re a developer, student learning to code. You can contribute to anything from code to simple fix, new feature to grammar mistake.

How to Contribute in this repo.

Contributing to open-source is easy.

  • Please read the contributing guideline before any PR.
  • Fork the repository
  • Improve current program by
    • improving codes and features
    • adding new feature
    • add any algorithm you like
    • by adding any data-structure implementation you like.
    • improving the documentation
    • you can also optimise somebody's code
  • Push your work and Create a Pull Request

Click here for more explanation

What if my pull requests aren’t accepted?

The only exception would be if the project maintainer chooses to mark your pull request as “invalid”. Even if your pull requests aren’t accepted, they should still count toward your 4 pull requests necessary to earn the shirt.

What kinds of pull requests count toward earning the Hacktoberfest shirt?

Any pull request made to a public repo on GitHub will count. The pull request must contain commits you personally made yourself — not automated commits from bots.

You can contribute to any open source project hosted on Github.com and contribute anything between October 1 to October 31 midnight in 2023. You will find plenty of issues labeled with hacktoberfest or good-first-issue etc on Github. These will be the simple ones most probably and easy to fix.


Directory Tree 👇🏻

Directory Tree
.
├── CODE_OF_CONDUCT.md
├── LICENSE
├── README.md
├── algorithms
│   ├── c-sharp
│   │   └── algorithmsInfo.md
│   ├── cpp
│   │   ├── algorithmsInfo.md
│   │   ├── bfs.cpp
│   │   ├── bfs_modified.cpp
│   │   ├── binary_search.cpp
│   │   ├── bogo_sort.cpp
│   │   ├── bubble_sort.cpp
│   │   ├── dft.cpp
│   │   ├── dijkstra's_algorithm.cpp
│   │   ├── heap_sort.cpp
│   │   ├── insertion_sort.cpp
│   │   ├── kadane's_algorithm.cpp
│   │   ├── krushkal's_minimum_spanning_tree.cpp
│   │   ├── linear_search.cpp
│   │   ├── longest_increasing_subsequence.cpp
│   │   ├── longest_palindrome_substring.cpp
│   │   ├── max_xor_pair_trie.cpp
│   │   ├── merge_sort.cpp
│   │   ├── next_greater_in_o(n).cpp
│   │   ├── quick_sort.cpp
│   │   ├── selection_sort.cpp
│   │   └── sieve_of_eratosthenes.cpp
│   ├── haskell
│   │   └── maths
│   │       └── fibonacci.hs
│   ├── java
│   │   ├── algorithmsInfo.md
│   │   ├── amstrong.java
│   │   ├── binary_search.java
│   │   ├── breadth_first_search.java
│   │   ├── bst
│   │   │   ├── bst.java
│   │   │   ├── bst_node.java
│   │   │   └── bstree.java
│   │   ├── bubble_sort.java
│   │   ├── counting_sort.java
│   │   ├── dfs.java
│   │   ├── dijkstra's_algorithm.java
│   │   ├── factorial.java
│   │   ├── huffman_coding.java
│   │   ├── insertion_sort.java
│   │   ├── interpolation_sort.java
│   │   ├── kadane's_algorithm.java
│   │   ├── krushkal's_algorithm.java
│   │   └── quick_sort.java
│   ├── javascript
│   │   ├── algorithmsInfo.md
│   │   ├── bubble_sort.js
│   │   ├── bubble_sort_visualized.js
│   │   ├── counting_sort.js
│   │   └── linear_search.js
│   ├── other
│   │   ├── algorithmsInfo.md
│   │   └── typescript
│   │       ├── bogo_sort.ts
│   │       ├── counting_sort.ts
│   │       └── merge_sort.ts
│   └── python
│       ├── algorithmsInfo.md
│       ├── binary_search.py
│       ├── bogo_sort.py
│       ├── breadth_first_search.py
│       ├── bubble_sort.py
│       ├── dijkstra's_algorithm.py
│       ├── heap_sort.py
│       ├── insertion_sort.py
│       ├── kadane's_algorithm.py
│       ├── krushal's_minimum_spanning_tree.py
│       ├── linear_search.py
│       ├── merge_sort.py
│       └── quick_sort.py
├── data structures
│   ├── c-sharp
│   │   └── dsInfo.md
│   ├── cpp
│   │   ├── bst.cpp
│   │   ├── doubly_linked_list.cpp
│   │   ├── dsInfo.md
│   │   ├── heap.cpp
│   │   ├── linkedlist.cpp
│   │   ├── trie.cpp
│   │   └── union_find_disjoint_sets.cpp
│   ├── java
│   │   ├── bst.java
│   │   ├── dsInfo.md
│   │   ├── dynamic_list.java
│   │   └── queue_using_stack.java
│   ├── javascript
│   │   ├── bst.js
│   │   └── dsInfo.md
│   ├── other
│   │   └── dsInfo.md
│   └── python
│       └── dsInfo.md
├── docs
│   └── CONTRIBUTING.md
├── hacktoberfest.gif
├── hacktoberfest2020.svg
├── others
│   ├── hang_man_sy.py
│   ├── pythonSMTP_Skeleton.py
│   └── snake_game.py
├── questions
│   ├── c-sharp
│   │   └── queInfo.md
│   ├── cpp
│   │   ├── all_sol_of_n_queen.cpp
│   │   ├── edit_distance.cpp
│   │   ├── knapsack.cpp
│   │   ├── knapsack_with_large_weight.cpp
│   │   ├── knight_tour_backtracking.cpp
│   │   ├── matrix_chain_mult.cpp
│   │   ├── n_queen.cpp
│   │   ├── queInfo.md
│   │   ├── rod_cutting_prob.cpp
│   │   ├── sub_matrix_with_all_1s.cpp
│   │   └── two_sum.cpp
│   ├── java
│   │   ├── coin_change.java
│   │   └── queInfo.md
│   ├── javascript
│   │   └── queInfo.md
│   ├── other
│   │   └── queInfo.md
│   └── python
│       ├── coin_change1.py
│       ├── coin_change2.py
│       ├── egg_dropping.py
│       ├── queInfo.md
│       └── subset.py
└── templates
    ├── cpp
    │   └── templateHelp.md
    ├── java
    │   └── templateHelp.md
    ├── other
    │   └── templateHelp.md
    ├── python
    │   └── templateHelp.md
    └── templateHelp.md

Implemented Algorithms

Algorithm C CPP Java Python JavaScript Golang C# Rust Other
Binary Search TS, KT
Bogo Sort TS
Breadth First Search
Breadth First Traversal
Bubble sort
Counting Sort TS
Depth First Search
Depth First Traversal
Dijkstra Algorithm
Finite Automata
Heap Sort
Huffman Coding
Insertion Sort
Interpolation Search
K-NN
K Centers Problem
Kadane's Algorithms
KMP Algorithm
Kruskal’s Minimum Spanning Tree Algorithm
Linear Search
Longest Common Subsequence
Longest Increasing Subsequence
Longest Palindromic Substring
Merge Sort TS
Naive Search
Quick Sort
Radix Sort
Selection Sort
Sieve of Eratosthenes
Suffix Array
Shell Sort

Some CP Question

Questions CPP Java Python JavaScript Golang C# Other
Binomial Coefficient
Bellman–Ford Algorithm
Coin Change
Count ways to reach the n’th stair
Cutting a Rod
Edit Distance
Egg Droping Puzzle
Knapsack Problem
Largest Sum Contiguous Subarray
m Coloring Problem
Pascal’s Triangle
Matrix Chain Multiplication
Maximum sum rectangle in a 2D matrix
Min Cost Path
Rod Cutting
Partition problem
Subset Sum
Tiling Problem
The Knight’s tour problem
Three Sum
Two Sum
Variations of LIS
Word Wrap Problem

Data Structures Implementations.

Data Structure CPP Java Python JavaScript Golang C# Other
AVL Tree
Binary Search Tree
Binary Tree
Doubly Linked List
Graph
Heap
Linked List
Queue
Stack
Trie
DSU

you can add more algorithms, data-structure and cp problems if you like to in the readme file, after you have been assigned to any issue

How to run them 👨🏻‍💻

Language Steps
C++
g++ <filename.cpp>
./a.out # unix
a.exe # windows
Java
javac <filename.java>
java
Python
python <filename.py>
JavaScript
node <filename.js>
Golang
go run <filename.go>
C#
mcs <filename.cs>
mono <filename.exe>

About

Dive into algorithms, data structures, and competitive programming solutions in multiple languages. Active since Hacktoberfest 2020!

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published