Algo-Tree is a collection of Algorithms and data structures which are fundamentals to efficient code and good software design. Creating and designing excellent algorithms is required for being an exemplary programmer. It contains solutions in various languages such as C++, Python and Java.

Algo-Tree 🌲

algotree.png

Issues Open Source Love svg1 License: MIT PRs Welcome Maintenance

Forks Stars Watchers

Algo-Tree is a collection of Algorithms and data structures which are fundamentals to efficient code and good software design. Creating and designing excellent algorithms is required for being an exemplary programmer. It contains solutions in various languages such as C++, Python and Java.

Code Structure

Algorithms

Contribution Guidelines ⚙️

You may go through these guidelines and contribute accordingly:

  • Make sure you do not copy codes from external sources like GFG,hackerearth, etc because that work will not be considered. Plagiarism is strictly not allowed.
  • You can only work on issues that you have been assigned to you.
  • If you want to contribute for an existing algorithm, we prefer that you create an issue before making a PR and link your PR to that issue.
  • If you have modified/added code work, make sure the code compiles before submitting.
  • Strictly use snake_case (underscore_separated) in your file_name and push it in correct folder.
  • Do not update the README.md.

Guidelines for code base :

  • Use 4 spaces indentation.
  • Add the description of your algorithm using multi-line comments at the starting of the code.
  • Add comments to your code in a new line and use single-line comments with 4 spaces indentation.
  • Try to make your code user input.
  • Add minimum 2 test cases along with input and output at the end of your code using multi-line comments.
  • Also, add time and space complexity at the end of your code using multi-line comments.

Where to upload the files 📂

  • Your files should be uploaded inside the code folder into the corresponding language folder (For instance, if you wrote code for an Algorithm Implementation in Java, it goes inside the Code/Java folder).
  • Under no circumstances create new folders within the language folders to upload your code unless specifically told to do so.
  • Edit the corresponding README.md file to add the link to your code in the corresponding section in alphabatical order.(GitHub Markdown Guide).

The value of a strong contribution stays beyond everything and gives you satisfaction 👍 .

Maintainers 😇


Vatsal kesarwani

💻 🖋

Rudrakshi

💻 🖋

Nakul Sharma

💻 🖋

Code of Conduct

You can find our Code of Conduct here.

License

This project follows the MIT License.

forthebadge forthebadge forthebadge forthebadge forthebadge forthebadge forthebadge

Owner
Algo Phantoms
Open Source organization focusses on Data Structure and Algorithms
Algo Phantoms
Comments
  • Add Sorting Algorithms

    Add Sorting Algorithms

    • [x] C++
      • [ ] Bubble Sort
      • [ ] Insertion Sort
      • [ ] Selection Sort
      • [ ] Merge Sort
      • [ ] Quick Sort
    • [x] Java
      • [x] Bubble Sort
      • [x] Insertion Sort
      • [x] Selection Sort
      • [ ] Merge Sort
      • [ ] Quick Sort
    • [x] Python
      • [ ] Bubble Sort
      • [ ] Insertion Sort
      • [ ] Selection Sort
      • [ ] Merge Sort
      • [ ] Quick Sort
  • Checking if a number is a prime number or not

    Checking if a number is a prime number or not

    Hello @nakul-19 @rudrakshi99 @plazzy99 I am a GSSOC '21 participant.

    I wish to contribute a C++ code for the following problem: Find if a number is a prime number or not.

    My code will have comment lines to make it explanatory and understandable to everyone. I will be very happy if I am assigned this issue and allowed to work on this.

  • Perform operations on Linked list

    Perform operations on Linked list

    Hi, Given a linked list, I will implement the program in C++ or JAVA with proper comments and test cases involving operations like:- - - [ ] Printing the elements

    • [ ] Inserting and deleting the node at the beginning, end, or at nth position
    • [ ] Reverse a linked list
    • [ ] Sort a linked list I am a GSSOC'21 participant and I want to gain a better understanding and implementation of data structures and algorithms. Please assign this issue to me @rudrakshi99
  • Search in Sorted Rotated Array

    Search in Sorted Rotated Array

    Given an integer array, and an element x, find the index of the element in O(log n) time. Integer array is sorted in ascending order, but it is rotated at some pivot. Example: Input: arr[] = {5, 6, 7, 8, 9, 10, 1, 2, 3}, x = 3 Output: 8

  • Bitwise manipulation

    Bitwise manipulation

    In bitwise manipulation it is important to describe the topic operator overloading.

    In various tricky programming questions, the answers and the output vary due to operator overloading.

    So do check on the pull request generated to do the same.

  •  Fibonacci Search

    Fibonacci Search

    Adding Fibonacci Search under Search Section in java Being a part of the GSSOC'21, I would like to implement this in java .Please do assign this to me

  • [GSSoC'21]Insertion_and_Deletion_from_Array

    [GSSoC'21]Insertion_and_Deletion_from_Array

    As of now, only the code for inserting at beginning of array has been added. I wish to add few more codes for insertion (in the middle) and deletion of elements from an array. My code will be in C++ and I promise to provide a clean code with proper comments and test cases. Requesting the admins to assign this issue to me as part of GSSoC 2021.

  • Minimum number of deletions to make a string palindrome

    Minimum number of deletions to make a string palindrome

    An algorithm to find the minimum no of deletion of characters from the string so that the resultant string becomes a palindrome using dynamic programming approach. Please assign it to me @anubhavitis @dheerajkotwani @tarun26091999 @todi-2000 @geekquad

  • Union of two array

    Union of two array

    Added code for issue #739 finding the Union Of Two Arrays, @tarun26091999 @anubhavitis @veenit1802 @ssaksham @malavikarajeshvikraman sir can you please review my code.

  • Seperate an array of 0's and 1's

    Seperate an array of 0's and 1's

    Problem: Given an array of size n which contains only 0's and 1's in any order,we have to modify the array in such a way that 0's are on left side and 1's on the right side. Test case-1: Input: N = 5 arr[] = {0, 0, 1, 1, 0} Output: 0 0 0 1 1

    Test case-2: Input: Input: N = 4 Arr[] = {0, 0, 0, 0} Output: 0 0 0 0 There are no 1's in the given array, so the modified array is 0 0 0 0. Hello I am Aditi Chine, a GSSOC'21 participant.I want to solve this problem using counters.Please assign this to me. @rudrakshi99

  • Brian Kernighan's Algorithm (Count no of Set Bits)

    Brian Kernighan's Algorithm (Count no of Set Bits)

    Sir, I have made an extensive C++ file for Brian Kernighan's algorithm. I have explained the intuition and idea of the algorithm briefly. I have made a pull request regarding the same. Please review my request and if you feel that it is worth it, then please merge it. Link to PR- https://github.com/Algo-Phantoms/Algo-Tree/pull/43 @plazzy99 @rudrakshi99 @nakul-19

    I have been selected for GSSOC'21, and I am really interested in DSA, so I would like to contribute in this amazing repository. Regards, Debanjan Poddar

  • Create rightviewofbinarytree.cpp

    Create rightviewofbinarytree.cpp

    Related Issue

    • Info about Issue or bug fixes #[issue number that will be closed through this PR]

    Describe the changes you've made

    A clear and concise description of what you have done to successfully close your assigned issue. Any new files? or anything you feel to let us know!

    Language Used:

    [Mention the Language of Code]

    Checklist:

    • [x] I have placed my code file in the (/Code) Folder e.g. If it's a Code in JAVA then I have placed my code pr_name.java file in (/Code/Java/) Directory.
    • [ ] I have Added the Description, Approach, and Working of Code at the beginning of Code.
    • [ ] I have added 2 or more Testcases at the Bottom side of the Code.
    • [ ] I have Added Time and Space Complexity at the End of the Code.
    • [ ] I have Explained the Variables use in Complexity e.g. O(n) where n is the length of an array.
    • [ ] I have Updated the Readme Related to the Topics e.g., if the issue is regarding Matrix then Update the Readme.MD present in 2D_Array Folder.
    • [ ] I have added Proper Comments in between the Code for Better Explanation.
    • [ ] I have sorted the list of the Readme.MD where I have added the issue in the Alphabetical Order.
  • fixed indentation and blank lines

    fixed indentation and blank lines

    Related Issue

    • Info about Issue or bug fixes #[issue number that will be closed through this PR]

    Describe the changes you've made

    A clear and concise description of what you have done to successfully close your assigned issue. Any new files? or anything you feel to let us know!

    Language Used:

    [Mention the Language of Code]

    Checklist:

    • [ ] I have placed my code file in the (/Code) Folder e.g. If it's a Code in JAVA then I have placed my code pr_name.java file in (/Code/Java/) Directory.
    • [ ] I have Added the Description, Approach, and Working of Code at the beginning of Code.
    • [ ] I have added 2 or more Testcases at the Bottom side of the Code.
    • [ ] I have Added Time and Space Complexity at the End of the Code.
    • [ ] I have Explained the Variables use in Complexity e.g. O(n) where n is the length of an array.
    • [ ] I have Updated the Readme Related to the Topics e.g., if the issue is regarding Matrix then Update the Readme.MD present in 2D_Array Folder.
    • [ ] I have added Proper Comments in between the Code for Better Explanation.
    • [ ] I have sorted the list of the Readme.MD where I have added the issue in the Alphabetical Order.
  • Added the problem description in the comment section

    Added the problem description in the comment section

    Related Issue

    • No problem description in the code fixes #[issue number that will be closed through this PR]

    Describe the changes you've made

    Added the problem description in the comment description in the beginning of the code

    Language Used:

    [Mention the Language of Code]

    Checklist:

    • [ ] I have placed my code file in the (/Code) Folder e.g. If it's a Code in JAVA then I have placed my code pr_name.java file in (/Code/Java/) Directory.
    • [ ] I have Added the Description, Approach, and Working of Code at the beginning of Code.
    • [ ] I have added 2 or more Testcases at the Bottom side of the Code.
    • [ ] I have Added Time and Space Complexity at the End of the Code.
    • [ ] I have Explained the Variables use in Complexity e.g. O(n) where n is the length of an array.
    • [ ] I have Updated the Readme Related to the Topics e.g., if the issue is regarding Matrix then Update the Readme.MD present in 2D_Array Folder.
    • [ ] I have added Proper Comments in between the Code for Better Explanation.
    • [ ] I have sorted the list of the Readme.MD where I have added the issue in the Alphabetical Order.
  • Added the problem description in the comment section

    Added the problem description in the comment section

    Related Issue

    • No problem description in the code fixes #[issue number that will be closed through this PR]

    Describe the changes you've made

    Added the problem description in the comment description in the beginning of the code

    Language Used:

    [Mention the Language of Code]

    Checklist:

    • [ ] I have placed my code file in the (/Code) Folder e.g. If it's a Code in JAVA then I have placed my code pr_name.java file in (/Code/Java/) Directory.
    • [ ] I have Added the Description, Approach, and Working of Code at the beginning of Code.
    • [ ] I have added 2 or more Testcases at the Bottom side of the Code.
    • [ ] I have Added Time and Space Complexity at the End of the Code.
    • [ ] I have Explained the Variables use in Complexity e.g. O(n) where n is the length of an array.
    • [ ] I have Updated the Readme Related to the Topics e.g., if the issue is regarding Matrix then Update the Readme.MD present in 2D_Array Folder.
    • [ ] I have added Proper Comments in between the Code for Better Explanation.
    • [ ] I have sorted the list of the Readme.MD where I have added the issue in the Alphabetical Order.
  • fixed spaces to improve the presentation of code

    fixed spaces to improve the presentation of code

    Related Issue

    • Info about Issue or bug fixes #[issue number that will be closed through this PR]

    Describe the changes you've made

    Added blank lines to improve the presentation of code

    Language Used:

    [Mention the Language of Code]

    Checklist:

    • [ ] I have placed my code file in the (/Code) Folder e.g. If it's a Code in JAVA then I have placed my code pr_name.java file in (/Code/Java/) Directory.
    • [ ] I have Added the Description, Approach, and Working of Code at the beginning of Code.
    • [ ] I have added 2 or more Testcases at the Bottom side of the Code.
    • [ ] I have Added Time and Space Complexity at the End of the Code.
    • [ ] I have Explained the Variables use in Complexity e.g. O(n) where n is the length of an array.
    • [ ] I have Updated the Readme Related to the Topics e.g., if the issue is regarding Matrix then Update the Readme.MD present in 2D_Array Folder.
    • [ ] I have added Proper Comments in between the Code for Better Explanation.
    • [ ] I have sorted the list of the Readme.MD where I have added the issue in the Alphabetical Order.
This repository contains the Assignment code of Data Structures and Algorithms Assignments of SPPU, Second Year IT Syllabus (2019 pattern)

DSAL This repository contains the Assignment code of Data Structures and Algorithms Assignments of SPPU, Second Year IT Syllabus (2019 pattern) Assign

Dec 11, 2022
This is a beginner-friendly project aiming to build a problem-set on different data structures and algorithms in different programming languages.

DSAready Overview This is a beginner-friendly project that aims to create a problem-set for various Data Structures and Algorithms. Being a programmer

Aug 17, 2022
Collection of all the LeetCode problem solutions using different programming languages.

LeetCode Solutions Collection of all the LeetCode problem solutions using different programming languages. To contribute, you can make a file for the

Sep 2, 2022
Repository of problems and solutions of labsheets used for Data Structures and Algorithms (CS F211) in Semester 2, 2020-21 at BITS Pilani - Hyderabad Campus.

CS F211 Data Structures and Algorithms (BITS Pilani - Hyderabad Campus) This repository contains the problems, solution approaches & explanations and

Oct 31, 2022
Implementation of various data structures and algorithms.
Implementation of various data structures and algorithms.

Data Structures and Algorithms A place where you can find and learn the copious number of algorithms in an efficient manner. This repository covers va

Jul 24, 2022
An open source initiative for implementing and testing algorithms in various programming languages.

Algorithms An open source initiative for implementing and testing algorithms in various programming languages. Contributing The idea here is to learn

Nov 28, 2021
This repository aims to contain solutions and explanations to various competitive programming problems, which may be important for interviews and online tests of different companies.
This repository aims to contain solutions and explanations to various competitive programming problems, which may be important for interviews and online tests of different companies.

Competitive Programming Solutions Compilation Hello everyone ?? This repository contains solutions and explanations to various competitive programming

Dec 14, 2022
An intrusive C++17 implementation of a Red-Black-Tree, a Weight Balanced Tree, a Dynamic Segment Tree and much more!

This is Ygg (short for Yggdrasil), a C++17 implementation of several intrusive data structures: several balanced binary search trees: a red-black Tree

Dec 25, 2022
This is like Inverting Binary Tree, but instead of a Binary Tree it's a File Tree.
This is like Inverting Binary Tree, but instead of a Binary Tree it's a File Tree.

Invert File Tree in C++ This is like Inverting Binary Tree, but instead of the Binary Tree it's a File Tree. This is intended as a simple exercise to

Nov 23, 2022
This repository contains the advanced basic reference codes of Data Structures and Algorithms.

CSE-DSA-Codes This repository contains the advanced basic reference codes of Data Structures and Algorithms, which are coded in C and C++ Language, wh

Sep 11, 2022
A collection of various algorithms to produce length-limited prefix codes

Introduction This is a collection of various algorithms to produce length-limited prefix codes. My library is written in plain C with tons of comments

Nov 7, 2022
This repository contains certain basic programs of data structures in C/C++

This repository contains some basic programs of Data Structures in C/C++ and various algorithms involved in them. * What is a data structure ? A data

Jan 4, 2023
This project contains the carefully compiled easy to medium level Data Structures & Algorithm questions.

Engineering-Daze Hey everyone! ?? This project contains the carefully compiled easy to medium level Data Structures & Algorithm questions. Engineering

Apr 30, 2022
This repository contains certain basic programs of data structures in C/C++

This repository contains some basic programs of Data Structures in C/C++ and various algorithms involved in them. * What is a data structure ? A data

Nov 20, 2022
This repository contains some data structures implementation in C programming language

This repository contains some data structures implementation in C programming language. I wrote the tutorial posts about these data structures on my personal blog site in Bengali language. If you know Bengali then visit my site

Dec 10, 2022
Redacted source code for exercises proposed in the Data Structures and Algorithms laboratory.

fsega_ie2_dsa Redacted source code for exercises proposed in the Data Structures and Algorithms laboratory. Usage The src/ directory contains a direct

Dec 5, 2021
A tree-sitter grammar for HCL (HashiCorp Configuration Language), used by projects such as Terraform.
A tree-sitter grammar for HCL (HashiCorp Configuration Language), used by projects such as Terraform.

tree-sitter-hcl tree-sitter grammar for HCL (HashiCorp Configuration Language) files. HCL is the configuration format used by projects such as Terrafo

Nov 29, 2022
Languages for the Tree-sitter parser generator wrapped in Swift packages

TreeSitterLanguages Languages for the Tree-sitter parser generator wrapped in Swift packages. Motivation There are two reasons this package exists: As

Dec 21, 2022
Introductory course on computer architecture, assembly language, and operating systems fundamentals.

UCLA-CS33 Introductory course on computer architecture, assembly language, and operating systems fundamentals. Number systems, machine language, and a

Nov 24, 2021