GithubHelp home page GithubHelp logo

tarunsinghdev / dsa-cracker Goto Github PK

View Code? Open in Web Editor NEW
107.0 6.0 68.0 172 KB

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

C++ 98.67% JavaScript 1.33%
dsa-cracker dsalgo-questions interview-preparation interview faang-interview data-structures algorithms algorithm-challenges hacktoberfest hacktoberfest-accepted

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 ✔️
5 Print elements in sorted order using row-column wise sorted matrix ✔️


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
37 Maximum Product Subarray ✔️ - - - -
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
6 Bottom View of Binary Tree ✔️ O(n) O(n) Medium


Arrays In Javascript Implementation

# Title Solution Time Space Difficulty Note
1 Reverse an Array ✔️ O(N) O(1) Easy
2 Find MAximum and Minimum in Array ✔️ O(N) O(1)) Easy
3 Dutch National Flag [ Sort 0's , 1's and 2's without sorting] ✔️ O(N) O(N)) Easy

LinkedList

# Title Solution Time Space Difficulty Note
1 Write a program to Detect loop in a linked list. ✔️ - - Easy -
2 Write a Program to check whether the Singly Linked list is a palindrome or not. ✔️ O(n) O(n) Easy -
3 Write a Program to Remove duplicate element from sorted Linked List. ✔️ O(n) O(1) Easy -


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

dsa-cracker's People

Contributors

ajaytemp avatar akshat-rawat avatar anurrags avatar archit-2003 avatar arul-ashri avatar awdhesh-kumar27 avatar imjericho avatar jagroop2001 avatar krunal-karena avatar moinmulla avatar nerdyvisky avatar nikkilaprakash avatar payal1206 avatar roshano2 avatar royalboss-ayush avatar shivesh41kr avatar simran2000-jpg avatar srajan-kiyotaka avatar srish4884 avatar tanishq1306 avatar tarunsinghdev 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  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  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  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  avatar  avatar  avatar  avatar

dsa-cracker's Issues

Tree Problems

Can I add some tree problems under Hacktoberfest2022 contribution?

DSA in Javascript

Hi !!
Hope you are doing well !!
As I Explored this Repository I found DSA in C ++.
Can I contribute in Javascript? I am sure that others who have done DSA in Javascript will contribute to this Repository If it is allowed.
Please let me know if you would accept this proposal.

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.