Quantcast

Got Homework?

Connect with other students for help. It's a free community.

  • across
    MIT Grad Student
    Online now
  • laura*
    Helped 1,000 students
    Online now
  • Hero
    College Math Guru
    Online now

Here's the question you clicked on:

55 members online
  • 0 replying
  • 0 viewing

dexter4life

how does the selection sort algorithm works?

  • one year ago
  • one year ago

  • This Question is Closed
  1. agdgdgdgwngo
    Best Response
    You've already chosen the best response.
    Medals 3

    It works by passing through the the sequence n-1 times, working its way up the sequence. In each pass, it looks for the smallest element in the sequence (say I'm sorting in ascending order), storing it in a register. Once the pass is complete, it swaps the smallest element with the element in the current index and moves on.

    • one year ago
  2. agdgdgdgwngo
    Best Response
    You've already chosen the best response.
    Medals 3

    http://www.youtube.com/watch?v=t8g-iYGHpEA selection sort is in there

    • one year ago
  3. Neeraj_OCW
    Best Response
    You've already chosen the best response.
    Medals 2

    Click on the green icon on top-left of this page http://www.sorting-algorithms.com/selection-sort It'll start visualizing the lines below which describes the how sorting is going on. There are also other visualizations for diff. alogs.

    • one year ago
  4. dexter4life
    Best Response
    You've already chosen the best response.
    Medals 0

    Base on the O(n). Where does the selection sort falls. Is it O(nlogn) or ?

    • one year ago
  5. dexter4life
    Best Response
    You've already chosen the best response.
    Medals 0

    \[O(nLogn)\]

    • one year ago
  6. dexter4life
    Best Response
    You've already chosen the best response.
    Medals 0

    Please some body explain this for me --> O(nLogn).

    • one year ago
  7. Neeraj_OCW
    Best Response
    You've already chosen the best response.
    Medals 2

    Ok, i asked this question a few back on CS.SE, it's better you have a look at all answers there than i explain http://cs.stackexchange.com/questions/192/how-to-come-up-with-the-runtime-of-algorithms

    • one year ago
  8. agdgdgdgwngo
    Best Response
    You've already chosen the best response.
    Medals 3

    Actually, selection sort is \(O\left(n^2\right)\)

    • one year ago
    • Attachments:

See more questions >>>

Your question is ready. Sign up for free to start getting answers.

spraguer (Moderator)
5 → View Detailed Profile

is replying to Can someone tell me what button the professor is hitting...

23

  • Teamwork 19 Teammate
  • Problem Solving 19 Hero
  • You have blocked this person.
  • ✔ You're a fan Checking fan status...

Thanks for being so helpful in mathematics. If you are getting quality help, make sure you spread the word about OpenStudy.

This is the testimonial you wrote.
You haven't written a testimonial for Owlfred.