GithubHelp home page GithubHelp logo

smv1999 / competitiveprogrammingquestionbank Goto Github PK

View Code? Open in Web Editor NEW
1.2K 18.0 348.0 8.42 MB

This repository contains all the popular Competitive Programming and DSA questions with solutions for your Coding Interview Preparation.

Home Page: https://smv1999.github.io/CompetitiveProgrammingQuestionBank/

License: MIT License

C 32.38% C++ 41.63% Java 4.94% Python 19.88% JavaScript 1.18%
data-structures cpp c competitive-programming java programming algorithms coding-interviews interview-questions interview-preparation coding-challenges coding dsa interviews jobs leetcode geeksforgeeks codevita javascript

competitiveprogrammingquestionbank's Introduction

🎯💻Competitive Programming Question Bank🏆🏅

This repository contains all the popular Competitive Programming questions and Interview questions. The Programming languages used for demonstration are the C Language, C++, Python, Java and JavaScript.

Followers GitHub forks GitHub Repo stars Watchers Lines of code

CompetitiveProgrammingQuestionBank

📝Popular Questions:

📚Library

Java
Java-An Intro Java 8 Tutorial Design Patterns OOP in Java Complete Ref.11
Java CookBook J in a Nutshell Program Design Java all-in-one Java Performance

💥 How to Contribute?

Head over to Contributing Guidelines to know more!

Project Admin

Vaidhyanathan S M

Need help? Feel free to contact me @ [email protected]

Programs

DevIncept

DevIncept is a 30 day open source program helping the student community learn and contribute in various open source projects under the guidance of skilled mentors and project admins.
This project was a part of DevIncept 2021.

✨ Acknowledgement

Thanks to all the contributors for all their contributions.

Stargazers Over Time

Stargazers over time

LICENSE

This project follows the MIT License.

competitiveprogrammingquestionbank's People

Contributors

aakankshabhende avatar ayush7614 avatar divyaachoudharyy avatar dsrao711 avatar ishikasinha-d avatar karnika06 avatar keerthanapravallika avatar kiruba-r11 avatar kumarankm avatar madihamallick avatar manasi2001 avatar mannyp31 avatar mayuri-cell avatar neha030 avatar paurush11 avatar photon149 avatar prashantvit1 avatar pushpakumari5117 avatar pushpit-j19 avatar raunak-pandey avatar rc2208 avatar saviour1001 avatar siddhi-244 avatar simranquirky avatar smv1999 avatar sreelakshmig009 avatar sumitvajarinkar avatar ug-sep avatar ushmita4 avatar vishvarana 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

competitiveprogrammingquestionbank's Issues

Page not Found

Describe the bug
Hey, @smv1999 in the readme.MD when I am clicked on the follower's button it shows page not found
To Reproduce
Steps to reproduce the behavior:

  1. Go to Readme.md
  2. Click on Followers
  3. See that page not found shows

Expected behavior
It should show the follower badge in a new window as total lines, watcher, etc show while clicking.
Or It should go to your profile where peoples can see the followers
Screenshots
not found

Desktop (please complete the following information):

  • OS: [Window 10 Pro]
  • Version [10.0.19042 Build 19042]

Additional context
NA

Create readme in every folder

Hey👋

I saw your repo this is just awesome i love it...
but i am thinking that there should be a Readme in each folder to clarify that folder main motive
i.e. there should be a readme in array,2d array folder etc ..
Could I create a readme

if(change_given)
Thanks for giving me a chance..
I am happy 😊😊 to contribute

readme missing

readme is missing

Add More question in numbers folder related to number

Is your feature request related to a problem? Please describe.
Add More question in numbers folder related to number

Describe the solution you'd like
Leap year or not
Prime number or not
Palindrome or not
Armstrong number or not
Strong number or not
Perfect number or not
Friendly pair or not (amicable or not)
Automorphic number or not
Harshad number or not
Abundant number or not
Power of a number
Factors of a number
Add two fractions

This are types of question i have to work on the issue plss assign me

Python Solution for "Buy and sell stock" in dsa_450

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like
A clear and concise description of what you want to happen.

Link to the problem : https://leetcode.com/problems/best-time-to-buy-and-sell-stock/

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

Add Insert a Node at the end of a Doubly Linked List

Is your feature request related to a problem? Please describe.
I want to add a problem that inserts the node at the end of a Doubly Linked List

Describe the solution you'd like
I would like to code this solution in C++

There is a folder named Linked Lists inside Data Structures. The programs in the Linked Lists directory is not properly organized, so I would like to organize them, by creating subdirectories, namely

  • Singly Linked Lists
  • Doubly Linked Lists
  • Circular Linked Lists
  • Doubly Circular Linked Lists

and try to add enough programs in each of them, which can be very helpful.

Adding Python Solution Part - 2

I want to add python solution for the following question files -

  • factorial_of_a_number_recursion.c
  • factorial_of_a_number.c
  • fibonacci_series.c
  • FindDivisors.cpp
  • LargerNumber.cpp

Kindly assign this issue to me @smv1999

Find Sum of all Sub Matrices of a given Matrix 2

Is your feature request related to a problem? Please describe.
Finding the sum of all submatrices of a given matrix and returning the total sum.

Describe the solution you'd like
I would like to solve this in C++. I would like to optimize the O(n ^ 6) approach I used here #55

Added Problems of GFG in all language

Is your feature request related to a problem? Please describe.
Added Problems of GFG in all language

Describe the solution you'd like
GFG is very common and very good platform for practicing the DSA question so we have to added it

Python solution for "row with max ones in a matrix " in DSA 450

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

Adding Python Solution Part - 3

I want to add python solution for the following question files -

  • pattern_1.c
  • pattern_2.c
  • pattern_3.c
  • pattern_4.c
  • pattern_5.c

Kindly assign this issue to me @smv1999

Find Sum of all Sub Matrices of a given Matrix 3

Is your feature request related to a problem? Please describe.
Finding the sum of all submatrices of a given matrix and returning the total sum.

Describe the solution you'd like
I would like to solve this in C++. I would like to optimize the O(n ^ 4) time and O(n ^ 2) space approach I used here #58

Create a separate folder for hackerrank problem solutions .

Hello there ,
It's been well known that hackerrank has proved to be one of the most popular cp platform for developers.So I would just like to say that better to have a particular repo that just specifically contains all the hackerrank solutions so that it would be of great help to the programmers.Approve this issue of mine if you find this appropriate.

To create a Hashing Directory for Hashing related problems

I was unable to find a dedicated directory for Hashing Related problems which is also an Important Category in Competitve Programming and also in general. This is why I wanted to add a Hashing Directory and as a first step add this problem which requires using hashing to be solved. Do comment suggestions and give a thumbs up @smv1999 so I can code and then apply for a PR for the same.

Add Graph related problems

Contributors are welcome to add graph related problems !
You are free to choose problem statements from GeeksforGeeks, Hackerrank and LeetCode or any other platforms.

Python code for Insertion sort , Quick sort in Sorting algorithms

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like
A clear and concise description of what you want to happen.

Python code for Insertion sort , Quick sort in Sorting algorithms

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

Add a String based problem from Binary Search coding platform

Is your feature request related to a problem? Please describe.
Add a problem based on String, named Stuck Keyboard from the Binary Search platform.
Problem Link

Describe the solution you'd like
I would like to add this problem which is a coded solution in C++. Also, if required I can add it in Python too.

Chocolate Distribution Problem - Python

Is your feature request related to a problem? Please describe.

Describe the solution you'd like

  • Consider an array A , M students and N be the size of array

  • Sort the array

  • Maximum and minimum are the last and first elements of the array

  • Store the difference of max and min in min_diff

  • Iterate through the array

  • Since the difference has to be minimum , Find the minimum between min_diff and difference between A[i + M -1 ] and A[i]
    and store it in min_diff

  • Return min_diff

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

Python solution for spiral matrix problem in dsa 450

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Python solution for spiral matrix problem in dsa 450
Link to the problem : https://leetcode.com/problems/spiral-matrix/

Additional context
Add any other context or screenshots about the feature request here.

Wanted to add Remove articles from a sentence

Hey,
I wanted to add the solution of the problem
Articles: a ,an and the
Example:
Input: The book is on the table
Output: book is on table
(Here the articles are removed from the string)
Please assign me to add the solution

Add StairCase Search

Is your feature request related to a problem? Please describe.
This problem is commonly known as Search in a row and column sorted matrix.

Describe the solution you'd like
I would like to solve it in C++

Insert a Node at the front of the Doubly Linked List

Is your feature request related to a problem? Please describe.
The problem is to create a node with an integer data and insert it at the beginning of the Doubly Linked List

Describe the solution you'd like
I would like to code this solution in C++

Find the node with minimum value in a Binary Search Tree

Is your feature request related to a problem? Please describe.
I want to add a new question with answer in Data Structures under Tree

Describe the solution you'd like
I would like to code this in cpp

Describe alternatives you've considered
i can also code this in c

Add Python Solutions for DSA 450

The problems in DSA 450 are solved in C++
Python solution for all three can be added

Describe the solution you'd like
Python solutions for :

  • Reverse an array
  • Maximum and Minimum of an array
  • Move all negative numbers

Optimise the count negatives in a sorted matrix

Is your feature request related to a problem? Please describe.
Problem
This problem has O(n^2) complexity which doesn't exploit the property of row and column sorted matrix. I will try to exploit this property and optimize it to O(n)

Describe the solution you'd like
A coded C++ solution with an optimized approach

Add a merge sort algorithm

Hi @smv1999

This issue to add a new cpp program [Merge Sort]

I’m very happy to contribute to this community.

I will open a PR now.

I will add more soon.

Thanks

Add Solutions in JavaScript

Solutions to the programming problems have to added in JavaScript. The current solutions exist in C, C++ and Java, and Python.

Developers are welcome to contribute! New problems along with the solutions in JavaScript can also be added.

Happy Coding!

Python solution for Next Permutation(Leetcode) in DSA 450

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like
A clear and concise description of what you want to happen.

Link to the problem : https://leetcode.com/problems/next-permutation/

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

Find Sum of all Sub Matrices of a given Matrix

Is your feature request related to a problem? Please describe.
Finding the sum of all submatrices of a given matrix and returning the total sum.

Describe the solution you'd like
I would like to solve this in C++. There are three complexities to this problem and each one of them has an important concept in it. So I would like to perform the Brute Force approach first, I will open different issues to work on the other approaches.

Merge two sorted arrays without using extra space

Is your feature request related to a problem? Please describe.
Two sorted arrays would be given and those arrays should be merged without using extra space. For example:
Array - 1 = [0 , 2 , 4 , 6]
Array - 2 = [1 , 3 , 5 , 7 , 9]

Since, extra space should not be used, the result should be store in input array itself like,

Array - 1 = [0 , 1 , 2 , 3]
Array - 2 = [4 , 5 , 6 , 7 , 9]

Describe the solution you'd like
A coded C++ solution to merge the given two sorted arrays without using extra space.

Add WavePrint of a Matrix

Is your feature request related to a problem? Please describe.
The problem is to print the elements of the matrix in a wave pattern.
Eg -

Matrix elements:
1 2 3
4 5 6
7 8 9

WavePrint:
1 4 7 8 5 2 3 6 9

Describe the solution you'd like
I would like to implement it in C++

Python Solution for Trapping Rain Water Problem in DSA 450

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Add Python solution for Trapping Rain Water problem in DSA 450

Describe the solution you'd like
A clear and concise description of what you want to happen.
Link to problem : https://practice.geeksforgeeks.org/problems/trapping-rain-water-1587115621/1

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

Programmers are Welcome to Contribute

Developers are highly welcome to contribute to this project by modifying the existing solutions to more optimized solutions or add new programs that fit into the various categories mentioned in the repo or adding a new category if needed.

Please refer this for more info.

Python Solution for merge intervals in dsa 450

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Link for the question : https://leetcode.com/problems/merge-intervals/

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

Adding python solution Part - 1

I want to add python solution for the following question files -

  • Array Reversal.c
  • CommonElements.cpp
  • duplicates_in_array.cpp
  • remove_duplicates_from_sorted_array.cpp
  • subset_of_array.cpp

Kindly assign this issue to me @smv1999

Add matrix problems in DSA 450

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Add Python Solutions of matrix problems in DSA 450 section

Describe the solution you'd like
A clear and concise description of what you want to happen.
Problems :

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

Add String Problems in DSA 450 (Python)

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Add python solutions for string problems in DSA 450

Describe the solution you'd like
A clear and concise description of what you want to happen.

Problems :

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

Added problems of Hackerank in Python

Is your feature request related to a problem? Please describe.
Added problems of Hackerank in Python

Describe the solution you'd like
We have to add problems in python related to Hackerank of DSA

Find sub matrix sum for Q queries

Is your feature request related to a problem? Please describe.
To find the sum of submatrix for given coordinates in each query. The no. of queries is Q.

Describe the solution you'd like
A C++ coded solution for this problem.

Solutions to be added in Python

Solutions to the programming problems have to added in Python. The current solutions exist in C, C++ and Java.

Developers are welcome to contribute! New problems along with the solutions in Python can also be added.

Happy Coding!

Python solution for Coin Change Problem in Dynamic Programming

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Add Python solution for Coin Change Problem in Dynamic Programming

Describe the solution you'd like
A clear and concise description of what you want to happen.

Link to the Problem : https://leetcode.com/problems/coin-change/

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

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.