Python Forum
how to sort a list without .sort() function
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
how to sort a list without .sort() function
#3
There are lots of sorting algorithms. Insertion sort is probably the easiest to understand. It is much like sorting cards as you pick them up one by one and place them in order in your playing hand. Bubble sort is also pretty easy to understand. These sorts are not very efficient. The more efficient sorts are also a bit abstract and not intuitively obvious at first glance. Well known sorts like Quick Sort and Heap Sort fall in this category.

You can find examples of all these sorts online. Many with fancy graphics to help demonstrate how the sort works.
Reply


Messages In This Thread
RE: how to sort a list without .sort() function - by deanhystad - Dec-28-2020, 02:42 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
Question Frog codility leap sort variant MoreMoney 5 541 Apr-06-2024, 08:47 PM
Last Post: deanhystad
  How to sort a list with duplicates and return their unique indices. Echoroom 3 3,580 Sep-23-2022, 07:53 AM
Last Post: deanhystad
  sorting a list using unicodes acending order, no loops, no sort(), using recursion lrn2codee 14 6,497 Jun-23-2021, 07:33 PM
Last Post: deanhystad
  Sort and merge flintstone 1 1,941 Jun-14-2021, 07:32 PM
Last Post: Larz60+
  How can I sort my column so that NaN is at the bottom? soft 3 2,440 Feb-06-2021, 01:02 PM
Last Post: ibreeden
  Sort on basis of (name,age,score) pyzyx3qwerty 9 9,647 May-14-2020, 08:29 AM
Last Post: pyzyx3qwerty
  Sort last pyzyx3qwerty 7 4,822 May-05-2020, 02:58 PM
Last Post: DeaD_EyE
  insertion sort brobro 3 2,243 Apr-24-2020, 01:29 PM
Last Post: Godserena
  Sort objects by protected properties. Sigriddenfeta 1 1,914 Mar-17-2020, 04:11 AM
Last Post: Larz60+
  list and sort query arian29 2 2,256 Sep-18-2019, 06:19 PM
Last Post: ndc85430

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020