Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Selection Sort #5327

Open
15 of 20 tasks
harshraj8843 opened this issue Jan 16, 2024 · 7 comments
Open
15 of 20 tasks

Implement Selection Sort #5327

harshraj8843 opened this issue Jan 16, 2024 · 7 comments
Labels
auto-track Good First Issue Tracker program

Comments

@harshraj8843
Copy link
Contributor

harshraj8843 commented Jan 16, 2024

Description

Write a program to implement selection sort

Selection sort is a sorting algorithm that selects the smallest element from an unsorted list in each iteration and places that element at the beginning of the unsorted list.

Pseudocode

procedure selection sort 
   list  : array of items
   n     : size of list

   for i = 1 to n - 1
   /* set current element as minimum*/
      min = i    
   
      /* check the element to be minimum */

      for j = i+1 to n 
         if list[j] < list[min] then
            min = j;
         end if
      end for

      /* swap the minimum element with the current element*/
      if indexMin != i  then
         swap list[min] and list[i]
      end if
   end for
    
end procedure

Example

Input  : [8, 5, 2, 6, 9, 3, 1, 4, 0, 7]
Output : [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]

Tracking Issues

  1. C closed good first issue program
    SapirKro
  2. C# closed good first issue program
    Parvezkhan0
  3. C++ good first issue program triage
    Parvezkhan0
  4. Dart closed good first issue program
    MohitKambli
  5. F# good first issue program triage
    Parvezkhan0
  6. GO closed good first issue program
  7. Haskell good first issue program triage
    NeurantumData
  8. Java good first issue program
    ExileAS
  9. JavaScript good first issue program triage
    Amedi-Imbira
  10. Julia closed good first issue program
    SaifullahBijapur
  11. Kotlin closed good first issue program
    Shivamk034
  12. Perl good first issue program triage
    PunugupatiSaikumar
  13. PHP closed good first issue program
    Shivamk034
  14. Python closed good first issue program
    Amedi-Imbira
  15. R good first issue program
    Parvezkhan0
  16. Ruby good first issue program triage
    bharathbarma94
  17. Rust closed good first issue program
    bharathbarma94
  18. Scala closed good first issue program
    Murgowt
  19. Swift good first issue program triage
    Parvezkhan0
  20. TypeScript good first issue program triage
    Amedi-Imbira
@harshraj8843 harshraj8843 added the auto-track Good First Issue Tracker label Jan 16, 2024
@codinasion-bot
Copy link

👋🏻 Hey @harshraj8843

💖 Thanks for opening this issue 💖

A team member should be by to give feedback soon.

@codinasion-bot codinasion-bot bot added the triage Waiting for review label Jan 16, 2024
@harshraj8843 harshraj8843 added program and removed triage Waiting for review labels Jan 16, 2024
@Viran1
Copy link

Viran1 commented Jan 30, 2024

!assign

@kolhesatish
Copy link

Can you assign this issue to me?

@nitin-pandita
Copy link

I would like to work on it

@harshraj8843
Copy link
Contributor Author

You can comment !assign on any good first issue you want to contribute to, to be auto-assigned

!assign

@nitin-pandita
Copy link

!assign

1 similar comment
@khizer-flow
Copy link
Contributor

!assign

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-track Good First Issue Tracker program
Projects
None yet
Development

No branches or pull requests

5 participants