GithubHelp home page GithubHelp logo

avinash201199 / dsa-questions Goto Github PK

View Code? Open in Web Editor NEW
74.0 3.0 170.0 925 KB

Collection of data structure and algorithms questions

Home Page: https://www.instagram.com/lets__code/

License: MIT License

Java 22.05% C++ 57.96% Python 7.90% Jupyter Notebook 0.64% C 10.19% Go 0.08% JavaScript 0.79% C# 0.40%
dsa-algorithm github first-pull-request good-first-issue open-source

dsa-questions's Introduction

DSA-Questions

Why DSA is important? DSA plays a very important role in reducing the time complexity of the code. A problem might have several approaches, but you must pick the optimized one in order to stand out of the crowd. You must be able to write a code which takes less time to execute for any problem statement given


Note : This repo is excluded from the Hacktoberfest but you can still contribute and the reason is importance of DSA, your contribution will be for lifelong.

How to contribute ๐Ÿ˜Ž

  • Star this repository
  • Select your topic and program to add in this repository.Don't copy paste ,try to add your codes.
  • Check if the program is already added then choose another.You can add it with different language.
  • Create an issue with description about the question and wait for approval.
  • Note - Create only one issue at once, afer successful pull request create another issue.
  • Then fork this repository.
  • In forked repository select the topic folder where you want to add the program.
  • Then select the programming language folder in which you want to add the program.
  • If you can't find the folder create the folder and then add your program.
  • for example check this folder Array
  • Make your pull request with issue number by using #
  • Wait for review.

After reviewing your code if there will be no changes required then your pull request will be accepted.

You can also contribute to this repository by improving documention or any mistakes/errors.

Follow me on Github - https://github.com/avinash201199
Contact me for any doubt -https://www.instagram.com/lets__code/

THANK YOU FOR YOUR CONTRIBUTIONS.

dsa-questions's People

Contributors

2devyank avatar adityajadhav02 avatar andre-fajar-n avatar aniket-24 avatar anmol-19 avatar arjun-khanduri avatar arshxyz avatar aslmanasa avatar avinash201199 avatar jainvanshika avatar manognyaa avatar mohamed-ayaan358 avatar muditwadhwa avatar navjotdadwal avatar octet3290 avatar piyuli avatar pradyyadav avatar prajakta102 avatar rajkumarsony avatar ritika728 avatar rohit5152 avatar shafi9155 avatar silicolicious avatar srusti610 avatar swatisrivastava216 avatar vaibhavmogha avatar vidhichadha2507 avatar vish-han avatar wjeevika avatar zeelparekh10 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

Watchers

 avatar  avatar  avatar

dsa-questions's Issues

Grammatical error in readme

Hi,
I am participating in Hacktoberfest2021.
I want to fix the grammatical error in the readme file.
Regards.

Menu Driven Program for Stack and Queues

Hi! I am participating in Hacktoberfest 2021!

I would like to contribute by adding menu driven programs to implement stack and queues in Python Language. There will be two different codes for stack and queues respectively.

Thanks!

DSA - Singly Linked List in C

Hi!
I am Mageshkrishna R, and I am a participant registered in Hacktoberfest.
This is my second issue in this repository. I would like to contribute on the topic:-

  • Singly Linked List in C language.

The program would include Insertion, Deletion and Searching - having proper comments explaining each part of the code.

Assign this issue to me.
Thank You!

DSA- Linked List in C++

Hi Avinash!

I am Vaibhav, and I am participating in Hacktoberfest 2021.
I am totally new and noob in open-source contributions.
I would like to contribute on this topic:

Linked List in C++ language.

Please assign me this.
Thank You!

DSA - Binary Tree in C++

Hi I am Pranav.
I am participating in Hacktoberfest2021.
I want to contribute to adding questions on Binary Tree in C++.
Regards.

DSA - Matrix in C++

Hi Avinash!

I am Vaibhav, and I am participating in Hacktoberfest 2021.
I am totally new and noob in open-source contributions.
I would like to contribute on this topic:

Matrix in C++ language with theory.

Please assign me this.
Thank You!

DSA - Binary Search Tree in C++

Hi Avinash Singh!
I am Mageshkrishna R, and I am a participant registered in Hacktoberfest.
I recently started open-source contributions.
I am good in DSA and I would like to contribute on the topic:-

  • Binary Search Tree in C++ language.

The program would include Insertion, Deletion and Searching - with proper comments explaining each part of the code.

Thank You!

Longest Consecutive Sequence

Hi @avinash201199

I would like to add a program -> Longest Consecutive Sequence ---- Given an unsorted array of integers nums, find the length of the longest sequence of consecutive elements.

Can you assign a 'hacktoberfest' label and assign it to me?

Thanks

Solution of the DSA question

Hii, Iam a newbie..... just starting the contribution journey............... learning new things, well this is my first issue.before this i didnt even know how to create issues, so this is the code ......................

Language used: Python

from collections import Counter
str=input()
count=Counter(str)
for i in str:
if count[i]==1:
index_of=i
break
else:
index_of=-1

print(-1) if index_of==-1 else print(str.index(index_of))

Binary Search in C++

Hi, I want to contribute in Hacktoberfest 2021.
Please assign me this task and also add label as Hacktoberfest-accepted.

Prime Sieve

Hi sir! I am participating in Hacktoberfest 2021!
I would like to contribute by adding Prime Sieve method. Please label it as hacktoberfest and assign it to me.

Thanks in advance sir.

Maximum Gap

Hi @avinash201199

I would like to add a program to return the maximum difference between two successive elements in an integer array.

Can you assign a 'hacktoberfest' label and assign it to me?

Thanks

DSA-Matrix-Python- Minimum Path sum

Hey there, I'm participating in #hactoberfest2k21, Please assign me the issue. Good day!
Given a m x n grid filled with non-negative numbers, find a path from top left to bottom right, which minimizes the sum of all numbers along its path.You can only move either down or right at any point in time.
Example:
Input: grid = [[1,3,1],[1,5,1],[4,2,1]]
Output: 7

DSA - Stack and Queue in Python

Hi I am Pranav.
I am participating in Hacktoberfest2021.
I want to contribute to adding questions on Stack and Queue in Python
Regards.

Bit Manipulation

Hey @avinash201199!

I would like to add the program: Finding the square of a number without using the *, ** operators or the pow function.

Can you assign a hacktoberfest label and assign it to me?

Bubble Sort in C++

Hi, I want to contribute in Hacktoberfest 2021.
Please assign me this task and also add label as Hacktoberfest-accepted.

Palindrome Number

Question-
Given an integer x, return true if x is palindrome integer.
An integer is a palindrome when it reads the same backward as forward. For example, 121 is palindrome while 123 is not.

Example 1:
Input: x = 121
Output: true

Example 2:
Input: x = -121
Output: false
Explanation: From left to right, it reads -121. From right to left, it becomes 121-. Therefore it is not a palindrome.

DSA - Greedy Algo. in c++

Hi I am Pranav.
I am participating in Hacktoberfest2021.
I want to contribute to adding questions on Greedy Algo. in c++
Regards.

adding stock buy sell stock probelm

I am participating in Hactoberfest want to some contribution to this repositry.

Question is:

You are given an array prices where prices[i] is the price of a given stock on the ith day. You want to maximize your profit by choosing a single day to buy one stock and choosing a different day in the future to sell that stock. Return the maximum profit you can achieve from this transaction. If you cannot achieve any profit, return 0.

Example 1:

Input: prices = [7,1,5,3,6,4]
Output: 5
Explanation: Buy on day 2 (price = 1) and sell on day 5 (price = 6), profit = 6-1 = 5.
Note that buying on day 2 and selling on day 1 is not allowed because you must buy before you sell.

Example 2:

Input: prices = [7,6,4,3,1]
Output: 0
Explanation: In this case, no transactions are done and the max profit = 0.

Constraints:

  • 1 <= prices.length <= 105
  • 0 <= prices[i] <= 104

Menu-Driven Program for Strings

Hi! I am participating in Hacktoberfest 2021!

I would like to contribute by adding a Menu Driven Program for operations on Strings, in Python Language, like Reversing the string, alternating LowerCase and UpperCase letter, finding repeating characters in string, and Encode the string by adding 2 to each ASCII value.

Thanks a lot!

Adding some DP problems.

Hi ! I m participant of HactoberFest '21 . And want to contribute to this repository by adding some DP problems efficient solutions.

  1. Longest Common Subsequence
  2. 0-1 Knapsack Questions
  3. Unbounded Knapsack Questions
  4. MCM Questions

Selection Sort in C++

Hi, I want to contribute in Hacktoberfest 2021.
Please assign me this task and also add label as Hacktoberfest-accepted.

Pascal's Triangle

Hello, I am participant of Hacktoberfest 2021, and I want to add a question related to Dynamic Programming.

Given an integer rowIndex, return the rowIndexth (0-indexed) row of Pascal's triangle.

In Pascal's triangle, each number is the sum of the two numbers directly above it as shown.
pascal triangle
n:

Sample Input:
Input : rowIndex = 3
Output : [1, 3, 3, 1]

This problem falls under the category of Dynamic Programming.

Kindly assign me this issue.

DSA - Hash Table in C++

Hi I am Pranav.
I am participating in Hacktoberfest2021.
I want to contribute to adding questions on Hash Table in C++
Regards.

Stacks- Balancing Parenthesis (C++)

I would like to add the solution to the Question "Balancing Parenthesis" using a stack in C++ language.
Please assign me this issue for Hacktober Fest.

DSA- Number Theory in C++

DSA - Number Theory in C++

Hi, I am Jisha and I am participating in Hactoberfest 2021. I would like to contribute the following question in C++ for number theory. Please assign me this issue.

Question: Find two positive integers A and B, such that A-B=N where N is a given positive integer and the number of distinct prime factors of A and B are equal.

Constraints:
1<= N <= 10^16
1<= A, B <= 10^18

Example:
Input: 40
Output: The fisrt number is 80 and second number is 40

Thank you!

Reverse each word given in a string

Reverse each word given in a string.
Ex:
INPUT: I like to work on this issue
OUTPUT: issue this on work to like I

Can I work on this issue for hackoctober?

Python : Next number of the look-and-say sequence

Hi, I'm an Hacktober participant and I'd like to contribute on the Number Theory topic :
Given a positive integer, return the next number in the look-and-say sequence.
For example : 25447 ->12152417
Kindly assign me this issue.

First Unique Charachter of a string

Hi, I am a participant of Hacktoberfest. I would like to add this question in strings. Kindly assign me this issue. Thank you.

Question: Given a string s, find the first non-repeating character in it and return its index. If it does not exist, return -1.

Input: s = "aabb"
Output: -1
Input: s = "code"
Output: 0

DSA-Array-Python-Merge Intervals

Hey there, I'm participating in #hactoberfest2k21, Please assign me the issue. Good day!
Given an array of intervals where intervals[i] = [starti, endi], merge all overlapping intervals, and return an array of the non-overlapping intervals that cover all the intervals in the input.
Example:
Input: intervals = [[1,3],[2,5]]
Output: [[1,5]]

DSA - String in C++

Hi Avinash!

I am Vaibhav, and I am participating in Hacktoberfest 2021.
I am totally new and noob in open-source contributions.
I would like to contribute on this topic:

String in C++ language (concatenation, reverse, palindrome etc)

Please assign me this.
Thank You!

DSA-Stack-Python- Valid Parenthesis

Hey there, I'm participating in #hactoberfest2k21, Please assign me the issue. Good day!
Given a string s containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid.
An input string is valid if:
Open brackets must be closed by the same type of brackets.
Open brackets must be closed in the correct order.
Example:
Input: s = "()[]{}"
Output: true

Adding Java Squares of a Sorted Array

Question-Given an array of numbers sorted in increasing order, return a new array containing squares of all the numbers of the input array sorted in increasing order.
Example- Input: arr[] = [-5, -2, -1, 0, 4, 6]

Output: [0, 1, 4, 16, 25, 36]

DSA - Stack and Queue in C++

Hi Avinash!

I am Vaibhav, and I am participating in Hacktoberfest 2021.
I am totally new and noob in open-source contributions.
I would like to contribute on this topic:

Stack & Queue in C++ language.

Please assign me this.
Thank You!

DSA-String-Python-Longest Common Prefix

Hey there, I'm participating in #hactoberfest2k21, Please assign me the issue. Good day!
Write a function to find the longest common prefix string amongst an array of strings.
If there is no common prefix, return an empty string "".
Example:
Input: strs = ["flower","flow","flight"]
Output: "fl"

DP in C++

Hi, I want to contribute in Hacktoberfest 2021.
Please assign me this task and also add label as Hacktoberfest-accepted.

Reverse a linked List

Input: head = [1,2,3,4,5]
Output: [5,4,3,2,1]
I wish to contribute to the problem in Python language With brute force and an optimal approach.

Factorials of large numbers

Hello, I am a participant of Hacktoberfest 2021, and I want to add a question related to the number theory .

Factorials of large numbers, Given an integer N, find its factorial.

Example:

Input: N = 5
Output: 120

Explanation : 5! = 12345 = 120

This problem falls under the category of number theory.

Kindly assign me this issue.

Add "Triplet Sum in Array" question

Statement : Given array of size n and an integer T. Find triplet in the array which sums up to the given integer T.

Input :

n = 6
T = 13
arr[] = [1 4 45 6 10 8]

Output :

[1, 4, 8]

largest sum contiguous Subarray

@avinash201199 Hey!! I want to add one array question of finding Largest sum subarray question.
Here, I will explain kadane's algorithm approach. I guess this question is important.

Can you assign a hacktoberfest label and assign it to me.

Python : Checking bracketing of an expression

Hi I'm an Hacktober Participant and I would like to contribute to the String topic with this challenge :
Given an expression made of "(",")","[","]","{","}", check if the bracketing is correct.
Kindly assign me this issue.

4 Sum Problem

I would Like to give the Solution of 4 Sum Problem in both JAVA and C++

Find largest rectangle of 0 in Matrix

Hi I'm an Hactoberfest participant and I would like to submit this question that falls under the Matrix category :

Given a Matrix of size (n,n) only composed of 1 and 0, find the coordinates of the largest rectangle only composed of 0.

Kindly assign me this issue.

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.