GithubHelp home page GithubHelp logo

srish4884 / dsa-cracker Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tarunsinghdev/dsa-cracker

0.0 0.0 0.0 114 KB

This is an attempt to solve 450 questions carefully curated by Love Babbar.

C++ 100.00%

dsa-cracker's Introduction

DSA-CRACKER

LOC Stars Badge Forks Badge GitHub contributors

If you appreciate my work, please ๐ŸŒŸ this repository. It motivates me. ๐Ÿš€ ๐Ÿš€

DSA CRACKER sheet : link

๐Ÿ”ด ๐Ÿ”ด IMPORTANT : If you forked this repo and want to be updated with the changes made to this repo refer How do I update a GitHub forked repository?

โ–ถ๏ธ Update Corner

  • Added Clone A Graph problem in the Graphs topic.

๐ŸŽ You Can Contribute.

Make a pull request :

  • If you think you have the better optimal solution.
  • If you have the solution to the unsolved problem marked with "red-cross".

Hello, folks!

This is an attempt to solve 450 questions carefully curated by our very own Love Babbar.

Topics

Array

# Title Solution Time Space Difficulty Note
1 Reverse an Array โœ”๏ธ - - - -
2 Find the maximum and minimum element in an array โœ”๏ธ - - - -
3 Find the "Kth" max and min element of an array โœ”๏ธ - - - -
4 Given an array which consists of only 0, 1 and 2. Sort the array without using any sorting algo โœ”๏ธ - - - -
5 Move all the negative elements to one side of the array โœ”๏ธ - - -
6 Find the Union and Intersection of the two sorted arrays. โœ”๏ธ - - - -
7 Write a program to cyclically rotate an array by one. โœ”๏ธ - - - -
8 find Largest sum contiguous Subarray V. IMP โœ”๏ธ - - - -
9 Minimise the maximum difference between heights V.IMP โœ”๏ธ - - - Revisit
10 Minimum no. of Jumps to reach end of an array โœ”๏ธ - - - Revisit
11 find duplicate in an array of N+1 Integers โœ”๏ธ - - - -
12 Merge 2 sorted arrays without using Extra space. โœ”๏ธ - - - Revisit
13 Kadane's Algo [V.V.V.V.V IMP] โœ”๏ธ - - - -
14 Merge Intervals โœ”๏ธ - - - -
15 Next Permutation โœ”๏ธ - - - -
16 Count Inversion โœ”๏ธ - - - -
17 Best time to buy and Sell stock โœ”๏ธ - - - Pending variations
18 find all pairs on integer array whose sum is equal to given number โœ”๏ธ - - - -
19 find common elements In 3 sorted arrays โœ”๏ธ - - - -
20 Rearrange the array in alternating positive and negative items with O(1) extra space โœ”๏ธ - - - -
21 Find if there is any subarray with sum equal to 0 โœ”๏ธ - - - -
22 Find factorial of a large number โœ”๏ธ - - -
23 find maximum product subarray โœ”๏ธ - - - -
24 Find longest coinsecutive subsequence โœ”๏ธ - - - -
25 Given an array of size n and a number k, fin all elements that appear more than " n/k " times. โœ”๏ธ - - - -
26 Maximum profit by buying and selling a share atmost twice โœ”๏ธ - - - -
27 Find whether an array is a subset of another array โœ”๏ธ - - -
28 Find the triplet that sum to a given value โœ”๏ธ - - - -
29 Trapping Rain water problem โœ”๏ธ - - - Revisit
30 Chocolate Distribution problem โœ”๏ธ - - - -
31 Smallest Subarray with sum greater than a given value โœ”๏ธ - - - -
32 Three way partitioning of an array around a given value โœ”๏ธ - - -
33 Minimum swaps required bring elements less equal K together โœ”๏ธ - - - -
34 Minimum no. of operations required to make an array palindrome โœ”๏ธ - - - -
35 Median of 2 sorted arrays of equal size โœ”๏ธ - - - Revisit
36 Median of 2 sorted arrays of different size โœ”๏ธ - - - -


Matrix

# Title Solution Time Space Difficulty Note
1 Spiral traversal on a Matrix โœ”๏ธ
2 Search an element in a matriix โœ”๏ธ
3 Find median in a row wise sorted matrix โœ”๏ธ
4 Find row with maximum no. of 1's โœ”๏ธ


StackQueue

# Title Solution Time Space Difficulty Note
1 Implement Stack from Scratch โœ”๏ธ - - -
2 https://www.tutorialspoint.com/javaexamples/data_stack.htm โœ”๏ธ - - - -
3 Implement 2 stack in an array โœ”๏ธ - - - -
4 Find the middle element of a stack โœ”๏ธ O(n) O(n) - -
5 Implement "N" stacks in an Array โœ”๏ธ - - -
6 Check the expression has valid or Balanced parenthesis or not. โœ”๏ธ - - - -
7 Reverse a String using Stack โœ”๏ธ - - - -
8 Design a Stack that supports getMin() in O(1) time and O(1) extra space. โœ”๏ธ - - - -
9 Find the next Greater element โœ”๏ธ - - - -
10 The celebrity Problem โœ”๏ธ - - - -
11 Arithmetic Expression evaluation โœ”๏ธ - - - -
12 Evaluation of Postfix expression โœ”๏ธ - - - -
13 Implement a method to insert an element at its bottom without using any other data structure. โœ”๏ธ - - - -
14 Reverse a stack using recursion โœ”๏ธ - - - -
15 Sort a Stack using recursion โœ”๏ธ - - - -
16 Merge Overlapping Intervals โœ”๏ธ O(n*logn) O(1) - -
17 Largest rectangular Area in Histogram โœ”๏ธ O(n) O(n) - -
18 Length of the Longest Valid Substring โœ”๏ธ O(n) O(1) - -
19 Expression contains redundant bracket or not โœ”๏ธ O(n) O(n) - -
20 Implement Stack using Queue โœ”๏ธ O(n) O(n) - -


Backtracking

# Title Solution Time Space Difficulty Note
1 Rat In A Maze โœ”๏ธ - - -
2 N Queens Problem โœ”๏ธ - - -
3 M coloring Problem โœ”๏ธ O(n^m) O(n) -
5 Sudoku Solver โœ”๏ธ - - -


Graphs

# Title Solution Time Space Difficulty Note
6 Flood fill Algorithm โœ”๏ธ O(n*m) O(n*m) -
7 Minimum Step By Knight โœ”๏ธ - - -
9 Clone A Graph โœ”๏ธ - - -
13 Implement Topological Sorting โœ”๏ธ - - -
22 Implement Floyd Warshall Algorithm โœ”๏ธ - - -
25 Snake and Ladder Problem โœ”๏ธ O(n) O(n) -
27 Strongly Connected Components (Kosaraju's Algo) โœ”๏ธ - - -
32 Cheapest Flights within k stops โœ”๏ธ Quadratic Quadratic Medium
358 searching element in Graph using DFS โœ”๏ธ O(V+E) O(V) Medium


Binary Tree

# Title Solution Time Space Difficulty Note
1 Right View of Binary Tree โœ”๏ธ o(n) O(n) Medium
2 Height of Binary Tree โœ”๏ธ O(N) O(N) Medium
3 Diameter of Binary Tree โœ”๏ธ O(N) O(log(N)) Easy
4 Check for Balanced Tree โœ”๏ธ O(N) O(log(N)) Easy
5 Binary Tree Postorder Traversal โœ”๏ธ O(n) O(n) Easy


You can find me on LinkedIn to stay updated and follow along with my journey.

dsa-cracker's People

Contributors

tarunsinghdev avatar arul-ashri avatar awdhesh-kumar27 avatar moinmulla avatar imjericho avatar srish4884 avatar krunal-karena avatar anurrags avatar ajaytemp avatar roshano2 avatar nerdyvisky avatar archit-2003 avatar simran2000-jpg avatar nikkilaprakash avatar tanishq1306 avatar

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.