GithubHelp home page GithubHelp logo

iiitv / algos Goto Github PK

View Code? Open in Web Editor NEW
1.1K 51.0 499.0 443 KB

Popular Algorithms and Data Structures implemented in popular languages

License: MIT License

Python 20.04% C 16.10% Java 29.04% C++ 6.96% Go 9.48% JavaScript 9.39% Shell 0.81% C# 8.19%
algorithm algorithms algorithm-challenges data-structures codes code-list hacktoberfest

algos's Introduction

Algos

Community (college) maintained list of Algorithms and Data Structures implementations.

Join the chat at https://gitter.im/iiitv/algos Build Status GitHub issues Open Source Love LICENSE Love

js-happiness-style

Implemented Algorithms

Algorithm C CPP Java Python Golang JavaScript C#
Bin Sort
Binary Search
Breadth First Search
Breadth First Traversal
Coin Change Problem
Counting Sort
Depth First Traversal
Dijkstra Algorithm
Euclidean GCD
Exponentiation by Squaring
Heap Sort
Insertion Sort
k-NN
Largest Sum Contiguous Subarray
Linear Regression
Linear Search
Longest Common Subsequence
Longest Palindromic Substring
Merge Sort
Modular Exponential
Nth Fibonacci Number
N-Queen Problem
Prime Factor
Prims
Quick Select
Quicksort
Radix Sort
Rod Cutting Problem
Shell Sort
Sieve of Eratosthenes
Sleep Sort

Implemented Data Structures

Data Structure C CPP Java Python Golang JavaScript C#
AVL Tree
Binary Search Tree
Linked List
Queue
Stack
Trie

How to run them

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

Resources

Contributing

See CONTRIBUTING.md.

If you plan to suggest a new algorithm or DS, please make sure to read the guidelines.

Credits

Idea by @Monal5031

Project Maintainers

Only project maintainers should merge a PR. Other members can add their reviews to a PR but the merging should be done by only a project maintainer.

algos's People

Contributors

aashutoshrathi avatar adielliot37 avatar akhileshmanda avatar anshumanv avatar aryanargupta avatar aviaryan avatar dharmikjethva30 avatar dimamukhin avatar divyeshpuri avatar gaijinco avatar hsankesara avatar keshavagarwal17 avatar lalitmee avatar mohitkyadav avatar monal5031 avatar monik09 avatar nlok5923 avatar piyushpawar17 avatar praffn avatar rashinanwani avatar raunakjaiswal avatar sergobot avatar singhpratyush avatar sirfoga avatar stanislavkozlovski avatar steadbytes avatar theyashshahs avatar varada1110 avatar vidit2512 avatar yashladha avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

algos's Issues

Add me to repo

It would be good if one raises an issue for adding as contrib rather than commenting in an ongoing PR, because it is not referenced to the PR.

Selection Algorithm [C]

Suppose you want to find the kth position element in a sorted list without sorting the list, Need to find the median in a Large Data set after Sorting. In these places Selection algorithm can be used.

Coin Change Problem [C]

Given a value N, if we want to make change for N cents, and we have infinite supply of each of S = { S1, S2, .. , Sm} valued coins, how many ways can we make the change? The order of coins doesn’t matter.

For example, for N = 4 and S = {1,2,3}, there are four solutions: {1,1,1,1},{1,1,2},{2,2},{1,3}. So output should be 4. For N = 10 and S = {2, 5, 3, 6}, there are five solutions: {2,2,2,2,2}, {2,2,3,3}, {2,2,6}, {2,3,5} and {5,5}. So the output should be 5.

The Longest Common Subsequence [C]

LCS Problem Statement: Given two sequences, find the length of longest subsequence present in both of them. A subsequence is a sequence that appears in the same relative order, but not necessarily contiguous. For example, “abc”, “abg”, “bdf”, “aeg”, ‘”acefg”, .. etc are subsequences of “abcdefg”. So a string of length n has 2^n different possible subsequences.

Examples:
LCS for input Sequences “ABCDGH” and “AEDFHR” is “ADH” of length 3.
LCS for input Sequences “AGGTAB” and “GXTXAYB” is “GTAB” of length 4.

Possible Algo. List and Difficulty level

We can compile a possible list of Algorithms to be implemented so that a person attempting as a beginner will not have much problem.
Further, I guess it would be nice to assign the work to implement the algorithms according to the difficulty level. Like a person who is familiar with coding will not attempt beginner level programs and maybe leave them for the new one's. Also, a time constraint would also be a good thing to add so that someone else who is ready to do it will get that chance.

Integrate Codacy

Codacy has a good PR integration which comments design issues in the code directly in the PRs.
I think we should be using it.

Coding Guidelines

Adding a .md file discussing the guidelines for solutions would be helpful.

Stack [JAVA]

https://en.wikipedia.org/wiki/Stack_(abstract_data_type)

Following Functionalities I will add:

  • Display stack elements
  • Push (Adding element to top of stack)
  • Pop (Removing element from top of stack)
  • Peek
  • Get size

Will create a separate class for it and test in Main class.
Any suggestions over any particular thing I should use?

Define a merge policy

We need a merge policy to fix how we are going to merge PRs. Here's my proposal -

  1. One squashed commit merge with PR.
  2. Even if PR contains multiple type of changes, it should reflect only a single topic and Rule 1 shall still withhold on it.
Why squashed merge ?

It preserves both the author as well as the committer, something that can be very useful.
Also one commit per PR provides the cleanest commit history possible.


@singhpratyush views?

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.