Popular Algorithms and Data Structures implemented in popular languages

Overview

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
Queue

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.

Comments
  • Added String Permutation Problem [python]

    Added String Permutation Problem [python]

    A recursive funciton to output a list of all the possible permutations of that string.

    For example, given s='abc' the function should return ['abc', 'acb', 'bac', 'bca', 'cab', 'cba']

    Fixes #581

    By submitting this pull request I confirm I've read and complied with the below declarations.

    • [x] I have read the Contribution guidelines and I am confident that my PR reflects them.
    • [x] I have followed the coding guidelines for this project.
    • [x] My code follows the skeleton code structure.
    • [x] This pull request has a descriptive title. For example, Added {Algorithm/DS name} [{Language}], not Update README.md or Added new code.
    • [x] This pull request will be closed if I fail to update it even once in a continuous time span of 7 days.
    opened by AnshumanRohella 40
  • Added Prime Factor [C]

    Added Prime Factor [C]

    Fixes #62

    By submitting this pull request I confirm I've read and complied with the below requirements.

    • [x] I have read the Contribution guidelines and I am confident that my PR reflects them.
    • [x] I have followed the coding guidelines for this project.
    • [x] My code follows the skeleton code structure.
    • [x] This pull request has a descriptive title. For example, Added {Algorithm name} [{Language}], not Update README.md or Added new code.
    lang-c Algorithm 
    opened by yashLadha 27
  • Added Binary Search Tree [python]

    Added Binary Search Tree [python]

    Fixes #344

    By submitting this pull request I confirm I've read and complied with the below declarations.

    • [x] I have read the Contribution guidelines and I am confident that my PR reflects them.
    • [x] I have followed the coding guidelines for this project.
    • [x] My code follows the skeleton code structure.
    • [x] This pull request has a descriptive title. For example, Added {Algorithm/DS name} [{Language}], not Update README.md or Added new code.
    • [x] This pull request will be closed if I fail to update it even once in a continuous time span of 7 days.
    lang-python Algorithm 
    opened by Hsankesara 19
  • Added bubble_sort

    Added bubble_sort

    Fixes #{ISSUE_NUMBER}

    By submitting this pull request I confirm I've read and complied with the below declarations.

    • [x] I have read the Contribution guidelines and I am confident that my PR reflects them.
    • [x] I have followed the coding guidelines for this project.
    • [x] My code follows the skeleton code structure.
    • [x] This pull request has a descriptive title. For example, Added {Algorithm/DS name} [{Language}], not Update README.md or Added new code.
    • [x] This pull request will be closed if I fail to update it even once in a continuous time span of 7 days.
    • [x] This pull request shall only be reviewed and merged once the Travis build passes. No maintainer or supporter shall be obliged to review it before this condition is met.
    • [x] I have mentioned the issue number correctly (with hyperlink) in this pull request description.
    No Issue created 
    opened by navneet15 16
  • Added 'how to run them' in README.md

    Added 'how to run them' in README.md

    Fixes #243

    By submitting this pull request I confirm I've read and complied with the below declarations.

    • [x] I have read the Contribution guidelines and I am confident that my PR reflects them.
    • [] I have followed the coding guidelines for this project.
    • [] My code follows the skeleton code structure.
    • [x] This pull request has a descriptive title. For example, Added {Algorithm/DS name} [{Language}], not Update README.md or Added new code.
    • [x] This pull request will be closed if I fail to update it even once in a continuous timespan of 7 days.
    enhancement 
    opened by S2606 16
  • Added Binary Search [Python]

    Added Binary Search [Python]

    Fixed #59

    By submitting this pull request I confirm I've read and complied with the below requirements.

    • [x] I have read the Contribution guidelines and I am confident that my PR reflects them.
    • [x] I have followed the coding guidelines for this project.
    • [x] My code follows the skeleton code structure.
    • [x] This pull request has a descriptive title. For example, Added {Algorithm/DS name} [{Language}], not Update README.md or Added new code.
    difficulty-easy lang-python Algorithm 
    opened by aashutoshrathi 15
  • Binary Search [C++]

    Binary Search [C++]

    This issue is about Binary Search.

    • [x] Issue Title is in form Algo/DS Name [Language].
    • [x] I searched or browsed the repo’s other issues to ensure this is not a duplicate.
    • [x] This Algo/DS is worth adding to this repository.
    • [x] Assign this issue to me (I want to work on this).
      • [x] I ensure that I am not already assigned to 2 or more issues.
    • [x] I will send my PR only after I'm assigned to this issue by any maintainer.
    • [x] I understand that I will be unassigned from this issue if I fail to send a PR for this within a week.
    lang-cpp up for grabs Algorithm contribute-a-thon 
    opened by abhiy13 14
  • Added Segmented Sieve of Eratosthenes [C++]

    Added Segmented Sieve of Eratosthenes [C++]

    https://en.wikipedia.org/wiki/Sieve_of_Eratosthenes#Segmented_sieve

    Fixes #485

    By submitting this pull request I confirm I've read and complied with the below declarations.

    • [x] I have read the Contribution guidelines and I am confident that my PR reflects them.
    • [x] I have followed the coding guidelines for this project.
    • [x] My code follows the skeleton code structure.
    • [x] This pull request has a descriptive title. For example, Added {Algorithm/DS name} [{Language}], not Update README.md or Added new code.
    • [x] This pull request will be closed if I fail to update it even once in a continuous time span of 7 days.
    lang-cpp Algorithm work in progress 
    opened by manish1997 14
  • Added Gradient Descent [Python]

    Added Gradient Descent [Python]

    Fixes #345

    By submitting this pull request I confirm I've read and complied with the below declarations.

    • [x] I have read the Contribution guidelines and I am confident that my PR reflects them.
    • [x] I have followed the coding guidelines for this project.
    • [x] My code follows the skeleton code structure.
    • [x] This pull request has a descriptive title. For example, Added {Algorithm/DS name} [{Language}], not Update README.md or Added new code.
    • [x] This pull request will be closed if I fail to update it even once in a continuous time span of 7 days.
    lang-python Algorithm 
    opened by Prakash2403 14
  • Added Haskell and Pylint to .coala

    Added Haskell and Pylint to .coala

    Fixes #222

    By submitting this pull request I confirm I've read and complied with the below declarations.

    • [x] I have read the Contribution guidelines and I am confident that my PR reflects them.
    • [ ] I have followed the coding guidelines for this project.
    • [ ] My code follows the skeleton code structure.
    • [x] This pull request has a descriptive title. For example, Added {Algorithm/DS name} [{Language}], not Update README.md or Added new code.
    • [x] This pull request will be closed if I fail to update it even once in a continuous time span of 7 days.
    opened by aashutoshrathi 14
  • Added Breadth First Search [Java]

    Added Breadth First Search [Java]

    Fixes #73

    By submitting this pull request I confirm I've read and complied with the below declarations.

    • [x] I have read the Contribution guidelines and I am confident that my PR reflects them.
    • [x] I have followed the coding guidelines for this project.
    • [x] My code follows the skeleton code structure.
    • [x] This pull request has a descriptive title. For example, Added {Algorithm/DS name} [{Language}], not Update README.md or Added new code.
    • [x] This pull request will be closed if I fail to update it even once in a continuous timespan of 7 days.
    lang-java Algorithm 
    opened by jitendra3109 14
  • Add CodeQL workflow for GitHub code scanning

    Add CodeQL workflow for GitHub code scanning

    Hi iiitv/algos!

    This is a one-off automatically generated pull request from LGTM.com :robot:. You might have heard that we’ve integrated LGTM’s underlying CodeQL analysis engine natively into GitHub. The result is GitHub code scanning!

    With LGTM fully integrated into code scanning, we are focused on improving CodeQL within the native GitHub code scanning experience. In order to take advantage of current and future improvements to our analysis capabilities, we suggest you enable code scanning on your repository. Please take a look at our blog post for more information.

    This pull request enables code scanning by adding an auto-generated codeql.yml workflow file for GitHub Actions to your repository — take a look! We tested it before opening this pull request, so all should be working :heavy_check_mark:. In fact, you might already have seen some alerts appear on this pull request!

    Where needed and if possible, we’ve adjusted the configuration to the needs of your particular repository. But of course, you should feel free to tweak it further! Check this page for detailed documentation.

    Questions? Check out the FAQ below!

    FAQ

    Click here to expand the FAQ section

    How often will the code scanning analysis run?

    By default, code scanning will trigger a scan with the CodeQL engine on the following events:

    • On every pull request — to flag up potential security problems for you to investigate before merging a PR.
    • On every push to your default branch and other protected branches — this keeps the analysis results on your repository’s Security tab up to date.
    • Once a week at a fixed time — to make sure you benefit from the latest updated security analysis even when no code was committed or PRs were opened.

    What will this cost?

    Nothing! The CodeQL engine will run inside GitHub Actions, making use of your unlimited free compute minutes for public repositories.

    What types of problems does CodeQL find?

    The CodeQL engine that powers GitHub code scanning is the exact same engine that powers LGTM.com. The exact set of rules has been tweaked slightly, but you should see almost exactly the same types of alerts as you were used to on LGTM.com: we’ve enabled the security-and-quality query suite for you.

    How do I upgrade my CodeQL engine?

    No need! New versions of the CodeQL analysis are constantly deployed on GitHub.com; your repository will automatically benefit from the most recently released version.

    The analysis doesn’t seem to be working

    If you get an error in GitHub Actions that indicates that CodeQL wasn’t able to analyze your code, please follow the instructions here to debug the analysis.

    How do I disable LGTM.com?

    If you have LGTM’s automatic pull request analysis enabled, then you can follow these steps to disable the LGTM pull request analysis. You don’t actually need to remove your repository from LGTM.com; it will automatically be removed in the next few months as part of the deprecation of LGTM.com (more info here).

    Which source code hosting platforms does code scanning support?

    GitHub code scanning is deeply integrated within GitHub itself. If you’d like to scan source code that is hosted elsewhere, we suggest that you create a mirror of that code on GitHub.

    How do I know this PR is legitimate?

    This PR is filed by the official LGTM.com GitHub App, in line with the deprecation timeline that was announced on the official GitHub Blog. The proposed GitHub Action workflow uses the official open source GitHub CodeQL Action. If you have any other questions or concerns, please join the discussion here in the official GitHub community!

    I have another question / how do I get in touch?

    Please join the discussion here to ask further questions and send us suggestions!

    opened by lgtm-com[bot] 0
  • Dutch National Flag Algorithm [CPP]

    Dutch National Flag Algorithm [CPP]

    This issue is about Dutch National Flag Algorithm.

    • [x] Issue Title is in form Algo/DS Name [Language].
    • [x] I searched or browsed the repo’s other issues to ensure this is not a duplicate.
    • [x] This Algo/DS is worth adding to this repository.
    • [x] Assign this issue to me (I want to work on this).
      • [x] I ensure that I am not already assigned to 2 or more issues.
    • [x] I will send my PR only after I'm assigned to this issue by any maintainer.
    • [x] I understand that I will be unassigned from this issue if I fail to send a PR for this within a week.
    opened by webintellectual 1
  • I want to add FibonacciNumber c++ code

    I want to add FibonacciNumber c++ code

    This issue is about [FibonacciNumber ].

    • [X] Issue Title is in form FibonacciNumber [C++].
    • [X] I searched or browsed the repo’s other issues to ensure this is not a duplicate.
    • [X] This Algo/DS is worth adding to this repository.
    • [X] Assign this issue to me (I want to work on this).
      • [X] I ensure that I am not already assigned to 2 or more issues.
    • [X] I will send my PR only after I'm assigned to this issue by any maintainer.
    • [X] I understand that I will be unassigned from this issue if I fail to send a PR for this within a week.
    opened by TakshalModi02 0
  • RadixSsort[CPP]

    RadixSsort[CPP]

    This issue is about [radixSort[CPP]].

    • [x] Issue Title is in form radixSort [CPP].
    • [x] I searched or browsed the repo’s other issues to ensure this is not a duplicate.
    • [x] This Algo/DS is worth adding to this repository.
    • [x] Assign this issue to me (I want to work on this).
      • [x] I ensure that I am not already assigned to 2 or more issues.
    • [x] I will send my PR only after I'm assigned to this issue by any maintainer.
    • [x] I understand that I will be unassigned from this issue if I fail to send a PR for this within a week.
    opened by TheLegendVilva 0
  • dijkstra [cpp]

    dijkstra [cpp]

    This issue is about [dijkstra cpp]

    • [x] Issue Title is in form Algo/DS Name [Language].
    • [x] I searched or browsed the repo’s other issues to ensure this is not a duplicate.
    • [x] This Algo/DS is worth adding to this repository.
    • [x] Assign this issue to me (I want to work on this).
      • [x] I ensure that I am not already assigned to 2 or more issues.
    • [x] I will send my PR only after I'm assigned to this issue by any maintainer.
    • [x] I understand that I will be unassigned from this issue if I fail to send a PR for this within a week.
    opened by tanish105 0
  • I want to add LCS c++ code

    I want to add LCS c++ code

    This issue is about [Longest Common Subsequence].

    • [X] Issue Title is in form LCS [C++].
    • [X] I searched or browsed the repo’s other issues to ensure this is not a duplicate.
    • [X] This Algo/DS is worth adding to this repository.
    • [X] Assign this issue to me (I want to work on this).
      • [X] I ensure that I am not already assigned to 2 or more issues.
    • [X] I will send my PR only after I'm assigned to this issue by any maintainer.
    • [X] I understand that I will be unassigned from this issue if I fail to send a PR for this within a week.
    opened by TakshalModi02 0
Owner
IIIT Vadodara Open Source
Open Source Organization of IIIT Vadodara. Maintained by IIITV Coding Club.
IIIT Vadodara Open Source
This repository contains codes for various data structures and algorithms in C, C++, Java, Python, C#, Go, JavaScript and Kotlin.

Overview The goal of this project is to have codes for various data structures and algorithms - in C, C++, Java, Python, C#, Go, JavaScript and Kotlin

Manan 25 Mar 2, 2022
This repository contains all the Data Structures and Algorithms concepts and their implementation in several ways

An Open-Source repository that contains all the Data Structures and Algorithms concepts and their implementation in several ways, programming questions and Interview questions. The main aim of this repository is to help students who are learning Data Structures and Algorithms or preparing for an interview.

Pranay Gupta 691 Dec 31, 2022
Data structures and algorithms exercises in java

Data structure and algorithms in Java About The Project [] In this repository you can find examples of data structure exercises solved in java and som

Luis Perez Contreras 1 Nov 25, 2021
Example of implementing data structures in Java

Data Structures Example of implementing data structures in Java Implemented data structure : Queue Stack Linked List Binary Search Tree (BST) Trie Hea

Ismaïl BENHALLAM 2 Sep 27, 2021
A repository that contains Data Structure and Algorithms coded on Java

A repository that contains Data Structure and Algorithms coded on Java . It will also contain solutions of questions from Leetcode.

Akshat Gupta 6 Oct 15, 2022
🎓☕ Repository of lessons and exercises from loiane.training's course on data structure with Java

☕ Curso estrutura de dados com Java by @loiane.training Repositório com as aulas e exercícios do curso de estrutura de dados com Java da loiane.traini

Leticia Campos 2 Feb 1, 2022
Algorithm and Data Structrue

SWE241P Algorithm and Data Structure Ex1 TreeSet with Red-Black Tree HashSet LinkedList Set Ex 2 Selection Sort Insertion Sort Heap Sort Merge Sort Qu

Tiger Liu 4 Apr 13, 2022
Protocol Buffers - Google's data interchange format

Protocol Buffers - Google's data interchange format Copyright 2008 Google Inc. https://developers.google.com/protocol-buffers/ Overview Protocol Buffe

Protocol Buffers 57.6k Jan 1, 2023
Facebook Clone created using java based on Graph data Structure

Facebook Clone Facebook Clone created using java based on Graph data Structure Representation of Social Media using Graph Data Structure in Java It is

yogita pandurang chaudhari 1 Jan 16, 2022
gRPC and protocol buffers for Android, Kotlin, and Java.

Wire “A man got to have a code!” - Omar Little See the project website for documentation and APIs. As our teams and programs grow, the variety and vol

Square 3.9k Dec 23, 2022
A big, fast and persistent queue based on memory mapped file.

Big Queue A big, fast and persistent queue based on memory mapped file. Notice, bigqueue is just a standalone library, for a high-throughput, persiste

bulldog 520 Dec 30, 2022
Union, intersection, and set cardinality in loglog space

HyperMinHash-java A Java implementation of the HyperMinHash algorithm, presented by Yu and Weber. HyperMinHash allows approximating set unions, inters

LiveRamp 48 Sep 22, 2022
A lightning fast, transactional, file-based FIFO for Android and Java.

Tape by Square, Inc. Tape is a collection of queue-related classes for Android and Java. QueueFile is a lightning-fast, transactional, file-based FIFO

Square 2.4k Dec 30, 2022
Flink Table Store is a unified streaming and batch store for building dynamic tables on Apache Flink

Flink Table Store is a unified streaming and batch store for building dynamic tables on Apache Flink

The Apache Software Foundation 366 Jan 1, 2023
A FlinkSQL studio and real-time computing platform based on Apache Flink

Dinky 简介 实时即未来,Dinky 为 Apache Flink 而生,让 Flink SQL 纵享丝滑,并致力于实时计算平台建设。 Dinky 架构于 Apache Flink,增强 Flink 的应用与体验,探索流式数仓。即站在巨人肩膀上创新与实践,Dinky 在未来批流一体的发展趋势下潜

null 1.5k Dec 30, 2022
Worker-queue implementation on top of Java and database

Database Queue Library provides worker-queue implementation on top of Java and database. Fintech company YooMoney uses db-queue in cases where reliabi

null 17 Dec 12, 2022
Algorithms and Data Structures implemented in Java

Java : Algorithms and Data Structure The algorithms and data structures are implemented in Java. This is a collection of algorithms and data structure

Justin Wetherell 4.2k Jan 5, 2023
Data structures & algorithms implemented in Java and solutions to leetcode problems.

Hello, World! ?? Hey everyone, I'm Sharad ☃ , and I'm a Software Engineer ?? at eGain! This repository ?? is all about data structures & algorithms an

Sharad Dutta 16 Dec 16, 2022
An Open-Source repository 🌎 that contains all the Data Structures and Algorithms concepts and their implementation, programming questions and Interview questions

An Open-Source repository ?? that contains all the Data Structures and Algorithms concepts and their implementation, programming questions and Interview questions. The main aim of this repository is to help students who are learning Data Structures and Algorithms or preparing for an interview.

Aritra Das 19 Dec 29, 2022