Coder Social home page Coder Social logo

manan025 / ds-algo-zone Goto Github PK

View Code? Open in Web Editor NEW
25.0 25.0 79.0 645 KB

This repository contains codes for various data structures and algorithms in C, C++, Java, Python, C#, Go, JavaScript and Kotlin.

License: MIT License

C++ 24.99% Python 12.67% Java 29.36% JavaScript 9.04% Kotlin 6.46% C 12.74% Go 2.00% C# 2.75%
c c-plus-plus c-sharp cpp data-structures go hacktoberfest java javascript kotlin python

ds-algo-zone's Introduction

Manan's Github StatsManan's Github Stats

ds-algo-zone's People

Contributors

ambikesharman avatar anushkarthik05 avatar crapthecoder avatar ishika22 avatar jagritvats avatar jatinkumarmahaldar avatar jdrodriguezh avatar jfernancordova avatar jvs21 avatar lalithyamanasapatri avatar lokeshn011101 avatar manan025 avatar mudit018 avatar onkar627 avatar palak-2109 avatar rushijaviya avatar sachin-mamoru avatar safwan310 avatar sgaurav37533 avatar shauryam-exe avatar sourabmaity avatar sumanthtatipamula avatar tarushs avatar tejasanand avatar tm2k23 avatar vedant-jain03 avatar vinayakj592 avatar yasas4d avatar yash091 avatar yashikajotwani12 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

Watchers

 avatar  avatar

ds-algo-zone's Issues

Kruskal's Minimum Spanning Tree

πŸš€ Feature

Find the Minimum Spanning Tree using Kruskal's algorithm

Have you read the Contribution Guidelines?

Yes

Pitch

Kruskal's minimum spanning tree is used to find the minimum sum tree of an undirected graph, which has many practical uses (such as in maps)

Assignees

(Do not make changes in this section until asked to do so)
C -
C# -
C++ - @CrapTheCoder
Go -
Java - @jfernancordova
Javascript -
Kotlin -
Python -

Level Order Traversal in Binary Search Tree

πŸš€ Feature

Level Order Traversal in Binary Search Tree (BST)

Have you read the Contribution Guidelines?

Yes

Pitch

This is issued to solve many questions in competitive coding and is more efficient.

Assignees

(Do not make changes in this section until asked to do so)
C -
C# -
C++ - @saloni33
Go -
Java - @ishika22
Javascript -
Kotlin -
Python -

Tower of Hanoi (Recursive,Non-Recursive)

πŸš€ Feature

Tower of Hanoi Algo. Using Recursive and Non-Recursive 3 discs
(Write down a clear and concise description of what the feature is.)

Have you read the Contribution Guidelines?

(Yes.)

Pitch

Since it is asked in a lot of interviews. It is important to know about it and I have codes working up to 3 disc.
Assign this to me for C.

Assignees

Recursive

C - @LikhithaTadikonda
C# -
C++ - @Mudit018
Go - @nakullondhe
Java - @jdrodriguezh
Javascript - @SurendarSingh
Kotlin -
Python - @TarushS

Non Recursive

C - @LikhithaTadikonda
C# -
C++ - @Kshma29
Go -
Java - @Onkar627
Javascript -
Kotlin -
Python - @jAY1jS

Insertion in Linked List

πŸš€ Feature

Insertion In a Linked List

Have you read the Contribution Guidelines?

YES

Pitch

Important Topic - Asked in many company's interviews

Assignees

(Do not make changes in this section until asked to do so)
C - @nakullondhe
C# - @DoyelA
C++ - @saloni33
Go -
Java - @CC-KEH
Javascript -
Kotlin -
Python -

K stacks in a single array

πŸš€ Feature

I would like to add an algorithm that implements K stacks in a single array

Have you read the Contribution Guidelines?

Yes

Assignees

(Do not make changes in this section until asked to do so)
C -
C# -
C++ - @tm2k23
Go -
Java -
Javascript -
Kotlin -
Python -

Tarjan's algorithm for SCC

πŸš€ Feature

Tarjan's algorithm is used to find the single connected component in a directed graph.

Have you read the Contribution Guidelines?

YES

Pitch

This is an efficient and advanced algorithm for finding SCC.

Assignees

(Do not make changes in this section until asked to do so)
C -
C# -
C++ - @Yash091
Go -
Java -
Javascript -
Kotlin -
Python -

Djikstra's Algorithm

πŸš€ Feature

Implement Djikstra's Algorithm to find the single source shortest path in graph.

Have you read the Contribution Guidelines?

yes

Pitch

Using set and unordered map and distance vector.

Assignees

(Do not make changes in this section until asked to do so)
C -
C# -
C++ - @vedant-jain03
Go -
Java - @jfernancordova
Javascript -
Kotlin -
Python - @yashikajotwani12

Insertion And Deletion of Node in Binary Search Tree

πŸš€ Feature

Insertion And Deletion of Node in Binary Search Tree

Have you read the Contribution Guidelines?

Yes

Pitch

Because Binary search trees are implemented efficiently and operations like insertion, deletion are quite faster.

Assignees

(Do not make changes in this section until asked to do so)
C -
C# -
C++ - @saloni33
Go - @gopheramit
Java -
Javascript -
Kotlin -
Python -

0/1 Knapsack

πŸš€ Feature

Implementing 0/1 knapsack in cpp and analysing its complexities

Have you read the Contribution Guidelines?

Yes

Pitch

DP plays an important role during CP. Therefore, adding it.

Assignees

(Do not make changes in this section until asked to do so)
C - @Yash091
C# -
C++ - @AmbikeshArman
Go -
Java - @vinayakj592
Javascript -
Kotlin -
Python - @Aaryan8751

N Queen Problem Backtracking

πŸš€ Feature

We need to place N chess queens on an NΓ—N chessboard so that no two queens attack each other.

Have you read the Contribution Guidelines?

Yes

Pitch

This is a very common problem which uses the concept of backtracking. Initially we can mark a box as taken and if in further steps we find that the queen might be attacked, we can backtrack and remove our queen from that position.

Assignees

(Do not make changes in this section until asked to do so)
C -
C# -
C++ - @vedant-jain03
Go -
Java - @ishika22
Javascript -
Kotlin - @sgaurav37533
Python - @Abhiram-Joshi

Bubble Sort

πŸš€ Feature

Implement Bubble Sort. Do add Sample Input/Output, Time and Space Complexity at the bottom of the file (inside a comment).

Have you read the Contribution Guidelines?

Yes

Pitch

A very basic and standard sorting algorithm.

Assignees

@TarushS - Python
@SOURAB-BAPPA - C
@LalithyaManasaPatri - Java
@lokeshn011101 - Javascript
@shauryam-exe - Kotlin
@dvir019 - C#

Union-Find Data Structure (UFDS)

πŸš€ Feature

Union-Find Data Structure (also known as Disjoint Set Union) is a fast data structure to add, merge, or find a the head of a set.

Have you read the Contribution Guidelines?

Yes

Pitch

UFDS can be used to find cycles, connected components, and many more.

Assignees

Python - @CrapTheCoder
C++ - @jaisat

Partition equal subset sum

πŸš€ Feature

writing code for partition equal subset sum problem

Have you read the Contribution Guidelines?

Yes

Pitch

Contributing to the DP portion

Assignees

(Do not make changes in this section until asked to do so)
C - @Yash091
C# -
C++ - @Palak-2109
Go -
Java -
Javascript -
Kotlin -
Python - @ajaynair710

Gold mine problem using DP

πŸš€ Feature

Find out the maximum amount of gold, miner can collect using DP. A gold mine of m*n dimensions is given, each element contains a positive integer which is the amount of gold. Initially miner starts from first column but, from any row. Then start moving towards the cell diagonally up right or right or diagonally down right.

Have you read the Contribution Guidelines?

Yes

Pitch

This is a very popular question of DP, asked in many interviews. Please assign this task to me for JAVA.

Assignees

(Do not make changes in this section until asked to do so)
C -
C# -
C++ - @anushkarthik05
Go -
Java - @nikhil072000
Javascript -
Kotlin -
Python -

Min number of 1s in java

πŸš€ Feature

The java program find the row with least number of rows and print them along with their elements

Have you read the Contribution Guidelines?

YES

ISSUE

ISSUE #9 solved

Shortest Path in Unweighted Graph using BFS

πŸš€ Feature

Shortest path from one node to another node in an unweighted graph using Breadth First Search.

Have you read the Contribution Guidelines?

Yes

Pitch

Complexity of this algorithm: O(V+E)
Complexity of Dijkstra algorithm: O(V^2) when unoptimized, or O(V + E log V) when optimized using Priority Queue.

This algorithm is faster than the popular Dijkstra Algorithm, and is also far simpler, as it only uses a Breadth First Search.

Kadane’s Algorithm: Largest Sum Contiguous Subarray

πŸš€ Feature

Implement Kadane’s Algorithm to find the sum of contiguous subarray within a one-dimensional array of numbers that has the largest sum.

Have you read the Contribution Guidelines?

Yes

Pitch

Uses O(1) space and takes O(n) time.

Assignees

(Do not make changes in this section until asked to do so)
C - @anshkush92college
C# -
C++ - @tm2k23
Go -
Java - @Jvs21
Javascript -
Kotlin -
Python - @anushkarthik05

Morris Traversal of Binary Trees O(1) Space ( Inorder , Preorder )

πŸš€ Feature

I would like to add morris traversal of binary trees which is done in O(1) space

Have you read the Contribution Guidelines?

Yes

Pitch

=> No recursion
=> No stacks
=> O(1) Space

Assignees

(Do not make changes in this section until asked to do so)
C -
C# -
C++ - @tm2k23
Go -
Java -
Javascript -
Kotlin -
Python -

Merging Two Sorted Linked lists

πŸš€ Feature

Merge two sorted linked lists

Have you read the Contribution Guidelines?

Yes

Pitch

Important and basic operation with linked list.

Assignees

(Do not make changes in this section until asked to do so)
C -
C# -
C++ - @Sakshi2020037
Go -
Java - @sachin4627
Javascript -
Kotlin -
Python -

DNF SORT

πŸš€ Feature

DNF sort

Have you read the Contribution Guidelines?

yes

Pitch

3 random number can be sorted in linear time that does not consume any extra space

Assignees

(Do not make changes in this section until asked to do so)
C - @tm2k23
C# -
C++ - @SurendarSingh
Go -
Java -
Javascript -
Kotlin -
Python - @99anjali

Segment Tree

πŸš€ Feature

A segment tree is a data structure used to store information about array segments and answer segment queries efficiently.

Have you read the Contribution Guidelines?

Yes

Pitch

The important and advanced algorithm used in competitive programming.

Assignees

(Do not make changes in this section until asked to do so)
C - @Mudit018
C# -
C++ - @saloni33
Go -
Java -
Javascript -
Kotlin -
Python -

Jump Search

πŸš€ Feature

Jump Search is a searching algorithm for sorted arrays. The basic idea is to check fewer elements (than linear search) by jumping ahead by fixed steps or skipping some elements in place of searching all elements.

Have you read the Contribution Guidelines?

YES

Pitch

In Jump search, Instead of traversing the whole array one by one in linear fashion, we traverse the array by jumping ahead with fixed size steps to find the required element in less number of steps.It has an advantage in terms of Time complexity over Linear search.

Assignees

(Do not make changes in this section until asked to do so)
C -
C# -
C++ - @J-e-e-t
Go -
Java -
Javascript -
Kotlin -
Python -

Kaden's algorithm

Hey, I am Participating in hacktoberfest, I would like to contribute Kaden's algorithm, Could you please assigned it to me.
Thank you!

Topological Sorting

πŸš€ Feature

Topological Sorting is a linear ordering of vertices such that for every directed edge u v, vertex u comes before v in the ordering. Topological Sorting for a graph is not possible if the graph is not a DAG.

Have you read the Contribution Guidelines?

YES

Pitch

Topological Sorting is advanced algorithm mainly used for scheduling jobs from the given dependencies among jobs

Assignees

(Do not make changes in this section until asked to do so)
C - @arihantthriwe
C# - @codesanta142
C++ - @Yash091
Go -
Java -
Javascript -
Kotlin -
Python -

Selection Sort

πŸš€ Feature

Selection Sort - an algorithm used to sort an array.

Have you read the Contribution Guidelines?

Yes

Pitch

Basic Sorting Algorithm

Assignees

(Do not make changes in this section until asked to do so)
C - @omjasharma
C# -
C++ - @Sahilnegi-code
Go - @gopheramit
Java - @Jvs21
Javascript - @pabloescoder
Kotlin -
Python - @SOURAB-BAPPA

sieve of eratosthenes

πŸš€ Feature

Sieve of eratosthenes is the algorithm to find all the prime numbers less than or equal to a given integer n.

Have you read the Contribution Guidelines?

Yes

Pitch

Many companies focus on more advanced algorithms and sieve of eratosthenes is used frequently in many questions and is also an advanced algorithm.

Assignees

(Do not make changes in this section until asked to do so)
C - @gaurav1058
C# - @Osama-aj
C++ - @Yash091
Go - @lucblassel
Java - @sachin4627
Javascript -
Kotlin -
Python - @Noxbolt

DFS and BFS Traversal in Undirected Graphs

πŸš€ Feature

DFS and BFS traversal in an Undirected Graph

Have you read the Contribution Guidelines?

YES

Pitch

Since it is the backbone of graph theory, so it would be extremely important to include this file

Assignees

(Do not make changes in this section until asked to do so)
C -
C# -
C++ - @Mudit018
Go -
Java -
Javascript -
Kotlin -
Python -

Vertical Traversal of Binary tree

πŸš€ Feature

We will be printing a binary tree in vertical order.
Input:
image
Output: 4,2,1,5,3,6
Explanation:
As we can see there are 5 vertical lines which can pass through the tree -
1st vertical line - 4
2nd vertical line - 2
3rd vertical line - 1,5
4th vertical line - 3
5th vertical line - 6

Have you read the Contribution Guidelines?

Yes

Assignees

(Do not make changes in this section until asked to do so)
C -
C# -
C++ - @tm2k23
Go -
Java - @ishika22
Javascript -
Kotlin - @sumanthtatipamula
Python - @prakharshukla48

Bi-partite Graph

πŸš€ Feature

the graph such that we can divide the graph into 2 different subset or we can color every node of the graph such that two adjacent node should not have same color.

Have you read the Contribution Guidelines?

Yes

Pitch

using dfs and unordered map

Assignees

(Do not make changes in this section until asked to do so)
C -
C# -
C++ - @vedant-jain03
Go -
Java -
Javascript -
Kotlin -
Python -

Longest Substring Without Repeating Characters

πŸš€ Feature

Given a string s, find the length of the longest substring without repeating characters.

Example 1:
Input: s = "abcabcbb"
Output: 3
Explanation: The answer is "abc", with the length of 3.

Example 2:
Input: s = "bbbbb"
Output: 1
Explanation: The answer is "b", with the length of 1.

Example 3:
Input: s = "pwwkew"
Output: 3
Explanation: The answer is "wke", with the length of 3.
Notice that the answer must be a substring, "pwke" is a subsequence and not a substring.

Example 4:
Input: s = ""
Output: 0

Have you read the Contribution Guidelines?

yes

Pitch

  • 0 <= s.length <= 5 * 104
  • s consists of English letters, digits, symbols and spaces.

Assignees

@SOURAB-BAPPA - Python
@saiteja-2731 - C++
@siddharthgangwar25 - C
@nithintata - Java
@Devenkapoor7303 - Javascript
@CarleenSinton - C#

DFS and BFS in a 2D grid

πŸš€ Feature

DFS and BFS traversal in a 2d grid

Have you read the Contribution Guidelines?

YES

Pitch

As DFS and BFS are the backbones of graphs and they are especially important in 2d grids.

Assignees

(Do not make changes in this section until asked to do so)
C -
C# -
C++ - @Mudit018
Go -
Java - @jfernancordova
Javascript -
Kotlin -
Python -

Floyd's alogorithm

πŸš€ Feature

This algorithm helps us to detect and remove cycles from a linked list

Have you read the Contribution Guidelines?

Yes

Pitch

This can be obtained by using 2 nodes - fast and slow which can detect loops and also remove them if present

Assignees

(Do not make changes in this section until asked to do so)
C -
C# -
C++ - @yashikajotwani12
Go -
Java - @ishika22
Javascript -
Kotlin -
Python - @vedant-jain03

unbounded knapsack

πŸš€ Feature

Adding codes and explanation of unbounded knapsack using top down array-DP in cpp

Have you read the Contribution Guidelines?

yes

Pitch

DP plays an important role during competitive programming. Thus, thought to add this one.

Assignees

@Palak-2109 - C++
@lokeshn011101 - Javascript
@sudhir512kj - Python

Euclid Algorithm for GCD (Greatest common divisor)

πŸš€ Feature

(Write down a clear and concise description of what the feature is.)

Have you read the Contribution Guidelines?

(Write your answer here.)
Yes , I read all the guidlines .

Pitch

(Please explain why this feature should be implemented and how it would be used.)
It is the best way of finding the Greatest Common Divisor .
Euclid Algo -> According to this algorithm if b is smaller than a.
gcd(a,b) = gcd(a-b, b)
Let g be GCD of a and b
a = gx , b = gy and GCD(x,y) = 1
(a-b) = g(x-y)

Assignees

(Do not make changes in this section until asked to do so)
C - @Ashutoshpandey-coder
C# -
C++ - @tm2k23
Go -
Java - @Ashutoshpandey-coder
Javascript -
Kotlin -
Python - @Noxbolt

Linked list is palindrome

πŸš€ Feature

Check if a singly linked list is palindrome

Have you read the Contribution Guidelines?

Yes

Pitch

I would like to contribute the program for check if a singly linked list is palindrome in java, could you please assign it to me.

Assignees

(Do not make changes in this section until asked to do so)
C -
C# - @Sachin-Liyanage
C++ - @yashikajotwani12
Go -
Java - @sachin4627
Javascript -
Kotlin -
Python - @sudhir512kj

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.