Chitresh-code / DSA_Worksheet

Worksheet posting DSA problems every day for GNIOT Students to solve and create PR's.
MIT License
17 stars 33 forks source link

Selection Sort #1

Closed Chitresh-code closed 1 year ago

Chitresh-code commented 1 year ago

❗Write Code in Only One Language (CPP, C, Java, Python)

Give File Name : Selection_Sort βœ… In respective language folder

πŸ“‘ DESCRIPTION

Selection Sort

Difficulty

Problem Statement Sort any given unsorted array of size n in ascending order using the selection sort algorithm.

Example

Input :
n = 5
arr = [8, 6, 2, 5, 1]

Output :
1 2 5 6 8

Sample Input 1

6
2 13 4 1 3 6

Sample Output 1

1 2 3 4 6 13

Sample Input 2

5
9 3 6 2 0

Sample Output 2

0 2 3 6 9

Constraints

1 <= N <= 10^3
0 <= arr[i] <= 10^5
Time Limit: 1 sec

Problem

UdaySagar-Git commented 1 year ago

hey @Chitresh-code @lilmistake I would like to work on this , can you please assign it to me

gitaditee commented 1 year ago

@Chitresh-code can you please assign this work to me I want to contribute

Chitresh-code commented 1 year ago

@gitaditee if you can code in java or c you can do it as the solutions in Python and C++ are already merged.

Assigning it to you.

gitaditee commented 1 year ago

@Chitresh-code yes sure I"ll do and can you assigned me for others repo also

Chitresh-code commented 1 year ago

@gitaditee I am only maintaining this repo for Hacktoberfest, but if you want to you can follow me as I regularly upload issues with DSA questions in this repository. You can solve them

gitaditee commented 1 year ago

Ok I'll follow your profile,, I have submitted a pull request can you please check @Chitresh-code and I'll be grateful if you merge it because as a it's my first contribution.

lilmistake commented 1 year ago

I can't see one by you, make sure you submitted the PR; please link it here as well.

gitaditee commented 1 year ago

https://github.com/gitaditee/DSA_Worksheet @lilmistake check if you can see

gitaditee commented 1 year ago

Yes I have submitted its also showing on my hacktoberfest account @lilmistake I have also submitted in C language.

lilmistake commented 1 year ago

Looks like you created a PR for your repo and merged it as well. Go to https://github.com/Chitresh-code/DSA_Worksheet and see if you find an option that says something along the lines of "recent changes in XYZ create pull request". Click on the button and create a PR from there.

gitaditee commented 1 year ago

Now check if you can see? @lilmistake

gitaditee commented 1 year ago

can you tell me why you have not accepted? I'll correct the issue @lilmistake

lilmistake commented 1 year ago

I'll merge your PR on verifying the result or let you know if changes are required, thanks for contributing!

gitaditee commented 1 year ago

Sure thanks please inform me if any changes are required @lilmistake

Dev-Abhay01 commented 1 year ago

@Chitresh-code can you please assign this work to me I want to contribute