I want to sort a list of words alphabetically without using any built-in sorting methods. How would I go about doing this?
Join them; it only takes a minute:
put on hold as too broad by moooeeeep, Fengyang Wang, Moinuddin Quadri, juanpa.arrivillaga, Jim Fasarakis-Hilliard 16 hours agoThere are either too many possible answers, or good answers would be too long for this format. Please add details to narrow the answer set or to isolate an issue that can be answered in a few paragraphs.If this question can be reworded to fit the rules in the help center, please edit the question. |
|||||
|
Have a look at Wikipedia. For a homework assignment on your level, I guess, bubblesort is just fine. It is easy to understand and implement. |
|||
|
As pointed out in comment section, you can use bubble sort. Bubble sort is one of the most basic sorting algorithm that is the simplest to understand. It’s basic idea is to bubble up the largest(or smallest), then the 2nd largest and the the 3rd and so on to the end of the list. Each bubble up takes a full sweep through the list.
For more information visit: http://danishmujeeb.com/blog/2014/01/basic-sorting-algorithms-implemented-in-python/ |
|||
|