Coder Social home page Coder Social logo

maxfork / algorithms Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sobhanbera/algorithms

0.0 0.0 0.0 929 KB

This repo contains Algorithms and data structures in many languages. and also some competitive programming solutions. This is open to contribute during Hacktoberfest2020.

Home Page: https://github.com/SobhanBera

License: MIT License

JavaScript 4.98% C++ 36.23% Python 18.11% C 13.74% Java 23.89% Haskell 0.03% Go 0.29% C# 0.32% Kotlin 0.69% TypeScript 1.71%

algorithms's Introduction

HACKTOBERFEST 2022

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 2022, 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 2022. 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# 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>

algorithms's People

Contributors

3t8 avatar abdeltwabmf avatar alanjereb avatar anuranjanpandey avatar avinashmohare avatar azeemidrisi avatar bagekari avatar chiillax avatar dbarnwal avatar hannibal404 avatar iamkumar-gaurav avatar jay206-programmer avatar kavyapriyakp avatar laurairene785 avatar manav1 avatar musquitinh0 avatar ng29 avatar pranaychauhan2516 avatar rajshreenegi avatar rishav139 avatar ritiksingh8 avatar satyamyadav-cmd avatar shadowfax1731 avatar shivam026 avatar shubhamshettyyy avatar sobhanbera avatar suryasekhar14 avatar umangbagadi03 avatar vidhanshu avatar ydixit007 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.