iiitv / algos Goto Github PK
View Code? Open in Web Editor NEWPopular Algorithms and Data Structures implemented in popular languages
License: MIT License
Popular Algorithms and Data Structures implemented in popular languages
License: MIT License
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.
Codacy has a good PR integration which comments design issues in the code directly in the PRs.
I think we should be using it.
Explanation link: http://codeforces.com/blog/entry/43230
Please add more algorithm lists / tutorial lists / related materials etc to the Resources section of the README.
We need a merge policy to fix how we are going to merge PRs. Here's my proposal -
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?
find the sum of contiguous subarray within a one-dimensional array of numbers.
Add Java skeleton code at https://github.com/iiitv/algos/blob/master/CONTRIBUTING.md#samples
This issue is up for grabs
. Anyone can assign themselves and start working on this.
A popular algorithm used for sorting under specific constraints but if constraints were followed, It is the one of the fastest sort
The algorithm can be anything.
Language should be one of Java, Python, C or C++.
https://en.wikipedia.org/wiki/Insertion_sort
Implementation would be same in c and c++
https://en.wikipedia.org/wiki/Stack_(abstract_data_type)
Require following functionalities -
Create a class and add example usage in single file.
It should specifically remind people to have a look at the CONTRIBUTING guidelines before submitting their patch. Also some keys points from the guidelines should be listed out.
Example: https://github.com/aviaryan/awesome-no-login-web-apps/blob/master/PULL_REQUEST_TEMPLATE.md
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.
Finding gcd of two numbers using Eucledian Algorithm. (Recursive and non-recursive both can be implemented).
EDIT:
Link: https://en.wikipedia.org/wiki/Euclidean_algorithm
Add a Python sample/skeleton code in the CONTRIBUTING file .. https://github.com/iiitv/algos/blob/master/CONTRIBUTING.md#samples
Anyone who wants to work on this, please assign yourself.
I think we should include DS in this list too. I mean they are very related to the algorithms and are often used in algorithms. Examples - implementation of Stack, Queue, Heap etc.
Please post your views regarding this. @singhpratyush @Monal5031 @yashLadha @aashutoshrathi @jsroyal
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.
A general solution of the N-Queen problem (any board of n X n) in C++ with backtracking.
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.
https://en.wikipedia.org/wiki/Sieve_of_Eratosthenes
Algorithm to find prime numbers till a number N
Adding a .md file discussing the guidelines for solutions would be helpful.
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.
A popular Dynamic programming algorithm to find a largest sum contiguous subarray.
https://kartikkukreja.wordpress.com/2013/06/17/kadanes-algorithm/
https://en.wikipedia.org/wiki/Stack_(abstract_data_type)
Following Functionalities I will add:
Will create a separate class for it and test in Main class.
Any suggestions over any particular thing I should use?
https://en.wikipedia.org/wiki/Exponentiation_by_squaring
It is very much efficient algorithm to calculate x raised to power k.
Edit: time complexity is O( (nlogx) ^ k)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.