/algorithms-1

Algorithms and data structures in many languages.

Primary LanguageC++MIT LicenseMIT

HACKTOBERFEST 2020

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 atleast 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 comptitive 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 competitve 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
    cd design-blocks
  • 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 2020, 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 yout 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 2020. 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
algorithms/
โ”œโ”€โ”€ algorithms/
โ”‚   โ”œโ”€โ”€ c-sharp/
โ”‚   โ”‚   โ””โ”€โ”€ algorithmsInfo.md
โ”‚   โ”œโ”€โ”€ cpp/
โ”‚   โ”‚   โ”œโ”€โ”€ BinarySearch.cpp
โ”‚   โ”‚   โ”œโ”€โ”€ bogosort.cpp
โ”‚   โ”‚   โ”œโ”€โ”€ BubbleSort.cpp
โ”‚   โ”‚   โ”œโ”€โ”€ DFT.cpp
โ”‚   โ”‚   โ”œโ”€โ”€ HeapSort.cpp
โ”‚   โ”‚   โ”œโ”€โ”€ InsertionSort.cpp
โ”‚   โ”‚   โ”œโ”€โ”€ kadane's Algorithm.cpp
โ”‚   โ”‚   โ”œโ”€โ”€ Kruskal's Minimum Spanning Tree.cpp
โ”‚   โ”‚   โ”œโ”€โ”€ LongestIncreasingSubsequence.cpp
โ”‚   โ”‚   โ”œโ”€โ”€ LongestPalindromeSubstring.cpp
โ”‚   โ”‚   โ”œโ”€โ”€ MergeSort.cpp
โ”‚   โ”‚   โ”œโ”€โ”€ SelectionSort.cpp
โ”‚   โ”‚   โ””โ”€โ”€ algorithmsInfo.md
โ”‚   โ”œโ”€โ”€ java/
โ”‚   โ”‚   โ”œโ”€โ”€ BinarySearch.java
โ”‚   โ”‚   โ”œโ”€โ”€ BubbleSort.java
โ”‚   โ”‚   โ”œโ”€โ”€ DFS.java
โ”‚   โ”‚   โ”œโ”€โ”€ DijkstraAlgorithm.java
โ”‚   โ”‚   โ”œโ”€โ”€ InterpolationSort.java
โ”‚   โ”‚   โ””โ”€โ”€ algorithmsInfo.md
โ”‚   โ”œโ”€โ”€ javascript/
โ”‚   โ”‚   โ”œโ”€โ”€ BubbleSort.js
โ”‚   โ”‚   โ”œโ”€โ”€ LinearSearch.js
โ”‚   โ”‚   โ””โ”€โ”€ algorithmsInfo.md
โ”‚   โ”œโ”€โ”€ other/
|   |   โ”œโ”€โ”€ TypeScript/
|   โ”‚   โ”‚   โ””โ”€โ”€ BogoSort.ts
โ”‚   โ”‚   โ””โ”€โ”€ algorithmsInfo.md
โ”‚   โ””โ”€โ”€ python/
โ”‚       โ”œโ”€โ”€ BinarySearch.py
โ”‚       โ”œโ”€โ”€ BreadthFirstSearch.py
โ”‚       โ”œโ”€โ”€ BubbleSort.py
โ”‚       โ”œโ”€โ”€ LinearSearch.py
โ”‚       โ”œโ”€โ”€ MergeSort.py
โ”‚       โ””โ”€โ”€ algorithmsInfo.md
โ”œโ”€โ”€ data structures/
โ”‚   โ”œโ”€โ”€ c-sharp/
|   |   โ””โ”€โ”€ dsInfo.md
โ”‚   โ”œโ”€โ”€ cpp/
|   |   โ”œโ”€โ”€ BST.cpp
|   |   โ”œโ”€โ”€ LinkedList.cpp
|   |   โ””โ”€โ”€ dsInfo.md
โ”‚   โ”œโ”€โ”€ java/
|   |   โ””โ”€โ”€ dsInfo.md
โ”‚   โ”œโ”€โ”€ javascript/
|   |   โ””โ”€โ”€ dsInfo.md
โ”‚   โ”œโ”€โ”€ other/
|   |   โ””โ”€โ”€ dsInfo.md
โ”‚   โ””โ”€โ”€ python/
|       โ””โ”€โ”€ dsInfo.md
โ”œโ”€โ”€ others/
|   โ”œโ”€โ”€ PythonSMTP_Skeleton.py
|   โ””โ”€โ”€ SnakeGame.py
โ”œโ”€โ”€ questions/
โ”‚   โ”œโ”€โ”€ c-sharp/
|   |   โ””โ”€โ”€ queInfo.md
โ”‚   โ”œโ”€โ”€ cpp/
|   |   โ”œโ”€โ”€ Edit Distance.cpp
|   |   โ”œโ”€โ”€ TwoSum.cpp
|   |   โ””โ”€โ”€ queInfo.md
โ”‚   โ”œโ”€โ”€ java/
|   |   โ””โ”€โ”€ queInfo.md
โ”‚   โ”œโ”€โ”€ javascript/
|   |   โ””โ”€โ”€ queInfo.md
โ”‚   โ”œโ”€โ”€ other/
|   |   โ””โ”€โ”€ queInfo.md
โ”‚   โ””โ”€โ”€ python/
|       โ””โ”€โ”€ queInfo.md
โ””โ”€โ”€ templates/
    โ”œโ”€โ”€ cpp/
    |   โ””โ”€โ”€ templateHelp.md
    โ”œโ”€โ”€ java/
    |   โ””โ”€โ”€ templateHelp.md
    โ”œโ”€โ”€ other/
    |   โ””โ”€โ”€ templateHelp.md
    โ”œโ”€โ”€ python/
    |   โ””โ”€โ”€ templateHelp.md
    โ””โ”€โ”€ templateHelp.md

Implemented Algorithms

Algorithm CPP Java Python JavaScript Golang C# Other
Binary Search โœ” โœ” โœ”
Bogo Sort โœ” TS โœ”
Breadth First Search โœ”
Breadth First Traversal
Bubble sort โœ” โœ” โœ” โœ”
Counting Sort
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 โœ” โœ”
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
Four Sum
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
Palindrome Partitioning
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

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>
Request:-
  • please provide some explanation to the code you write in form of comments.
  • add at least any one among whatever(algoritms, ds, questions) you know.

Thanks Everyone For Contributing.


SobhanBera

๐Ÿ’ป

Kavyapriyakp

๐Ÿ’ป

3t8

๐Ÿ’ป

waridrox

๐Ÿ’ป

dbarnwal

๐Ÿ’ป

ng29

๐Ÿ’ป

Manav1

๐Ÿ’ป

pranavkhapra

๐Ÿ’ป

jhudsonsg

๐Ÿ’ป

Croustys

๐Ÿ’ป

anuranjanpandey

๐Ÿ’ป

YuvrajSHAD

๐Ÿ’ป

erikrios

๐Ÿ’ป

Djay1407

๐Ÿ’ป

SuryaSekhar14

๐Ÿ’ป

sunnybhandari02

๐Ÿ’ป

ShadowFax1731

๐Ÿ’ป

Aryan-dev007

๐Ÿ’ป

abdzitter

๐Ÿ’ป

Adigoo

๐Ÿ’ป
Please do a comment if you are a contributor and your name is not in the above list in issue with code #86.