Your results for Sorting Students
will probably be different,
since the grades are generated randomly.
(We know who'd be last every time otherwise!)
Insertion Sort
==============
Sorting Strings
---------------
Before sorting:
[Mal, Zoe, Kaylee, Wash, Jayne, Inara, Simon, River, Book]
one more inserted: [Mal, Zoe, Kaylee, Wash, Jayne, Inara, Simon, River, Book]
one more inserted: [Mal, Zoe, Kaylee, Wash, Jayne, Inara, Simon, River, Book]
one more inserted: [Mal, Zoe, Wash, Kaylee, Jayne, Inara, Simon, River, Book]
one more inserted: [Mal, Zoe, Wash, Jayne, Kaylee, Inara, Simon, River, Book]
one more inserted: [Mal, Zoe, Wash, Jayne, Inara, Kaylee, Simon, River, Book]
one more inserted: [Mal, Zoe, Wash, Jayne, Inara, Simon, Kaylee, River, Book]
one more inserted: [Mal, Zoe, Wash, Jayne, Inara, Simon, River, Kaylee, Book]
one more inserted: [Mal, Zoe, Wash, Book, Jayne, Inara, Simon, River, Kaylee]
After sorting:
[Mal, Zoe, Wash, Book, Jayne, Inara, Simon, River, Kaylee]
To sort 9 words took 26 assignments and 18 comparisons,
for a total of 44 operations.
We expected Insertion sort to take 52 operations to sort 9 words.
Sorting Strings
---------------
Before sorting:
[Mal, Zoe, Kaylee, Wash, Jayne, Inara, Simon, River, Book]
one more inserted: [Mal, Zoe, Kaylee, Wash, Jayne, Inara, Simon, River, Book]
one more inserted: [Kaylee, Mal, Zoe, Wash, Jayne, Inara, Simon, River, Book]
one more inserted: [Kaylee, Wash, Mal, Zoe, Jayne, Inara, Simon, River, Book]
one more inserted: [Kaylee, Jayne, Wash, Mal, Zoe, Inara, Simon, River, Book]
one more inserted: [Kaylee, Jayne, Inara, Wash, Mal, Zoe, Simon, River, Book]
one more inserted: [Kaylee, Jayne, Inara, Simon, Wash, Mal, Zoe, River, Book]
one more inserted: [Kaylee, Jayne, Inara, Simon, River, Wash, Mal, Zoe, Book]
one more inserted: [Kaylee, Jayne, Inara, Simon, River, Wash, Book, Mal, Zoe]
After sorting:
[Kaylee, Jayne, Inara, Simon, River, Wash, Book, Mal, Zoe]
To sort 9 words took 34 assignments and 25 comparisons,
for a total of 59 operations.
We expected Insertion sort to take 52 operations to sort 9 words.
Sorting Students
----------------
Before sorting:
Mal got 17%
Zoe got 44%
Kaylee got 76%
Wash got 39%
Jayne got 25%
Inara got 88%
Simon got 75%
River got 93%
Book got 1%
one more inserted: [Zoe (A00000002), Mal (A00000001), Kaylee (A00000003), Wash (A00000004), Jayne (A00000005), Inara (A00000006), Simon (A00000007), River (A00000008), Book (A00000009)]
one more inserted: [Kaylee (A00000003), Zoe (A00000002), Mal (A00000001), Wash (A00000004), Jayne (A00000005), Inara (A00000006), Simon (A00000007), River (A00000008), Book (A00000009)]
one more inserted: [Kaylee (A00000003), Zoe (A00000002), Wash (A00000004), Mal (A00000001), Jayne (A00000005), Inara (A00000006), Simon (A00000007), River (A00000008), Book (A00000009)]
one more inserted: [Kaylee (A00000003), Zoe (A00000002), Wash (A00000004), Jayne (A00000005), Mal (A00000001), Inara (A00000006), Simon (A00000007), River (A00000008), Book (A00000009)]
one more inserted: [Inara (A00000006), Kaylee (A00000003), Zoe (A00000002), Wash (A00000004), Jayne (A00000005), Mal (A00000001), Simon (A00000007), River (A00000008), Book (A00000009)]
one more inserted: [Inara (A00000006), Kaylee (A00000003), Simon (A00000007), Zoe (A00000002), Wash (A00000004), Jayne (A00000005), Mal (A00000001), River (A00000008), Book (A00000009)]
one more inserted: [River (A00000008), Inara (A00000006), Kaylee (A00000003), Simon (A00000007), Zoe (A00000002), Wash (A00000004), Jayne (A00000005), Mal (A00000001), Book (A00000009)]
one more inserted: [River (A00000008), Inara (A00000006), Kaylee (A00000003), Simon (A00000007), Zoe (A00000002), Wash (A00000004), Jayne (A00000005), Mal (A00000001), Book (A00000009)]
After sorting:
River got 93%
Inara got 88%
Kaylee got 76%
Simon got 75%
Zoe got 44%
Wash got 39%
Jayne got 25%
Mal got 17%
Book got 1%
To sort 9 words took 46 assignments and 25 comparisons,
for a total of 71 operations.
We expected Insertion sort to take 52 operations to sort 9 words.
Sorting Students
----------------
Before sorting:
Mal got 82%
Zoe got 3%
Kaylee got 37%
Wash got 14%
Jayne got 17%
Inara got 67%
Simon got 18%
River got 1%
Book got 9%
one more inserted: [Mal (A00000010), Zoe (A00000011), Kaylee (A00000012), Wash (A00000013), Jayne (A00000014), Inara (A00000015), Simon (A00000016), River (A00000017), Book (A00000018)]
one more inserted: [Mal (A00000010), Kaylee (A00000012), Zoe (A00000011), Wash (A00000013), Jayne (A00000014), Inara (A00000015), Simon (A00000016), River (A00000017), Book (A00000018)]
one more inserted: [Mal (A00000010), Kaylee (A00000012), Wash (A00000013), Zoe (A00000011), Jayne (A00000014), Inara (A00000015), Simon (A00000016), River (A00000017), Book (A00000018)]
one more inserted: [Mal (A00000010), Kaylee (A00000012), Jayne (A00000014), Wash (A00000013), Zoe (A00000011), Inara (A00000015), Simon (A00000016), River (A00000017), Book (A00000018)]
one more inserted: [Mal (A00000010), Inara (A00000015), Kaylee (A00000012), Jayne (A00000014), Wash (A00000013), Zoe (A00000011), Simon (A00000016), River (A00000017), Book (A00000018)]
one more inserted: [Mal (A00000010), Inara (A00000015), Kaylee (A00000012), Simon (A00000016), Jayne (A00000014), Wash (A00000013), Zoe (A00000011), River (A00000017), Book (A00000018)]
one more inserted: [Mal (A00000010), Inara (A00000015), Kaylee (A00000012), Simon (A00000016), Jayne (A00000014), Wash (A00000013), Zoe (A00000011), River (A00000017), Book (A00000018)]
one more inserted: [Mal (A00000010), Inara (A00000015), Kaylee (A00000012), Simon (A00000016), Jayne (A00000014), Wash (A00000013), Book (A00000018), Zoe (A00000011), River (A00000017)]
After sorting:
Mal got 82%
Inara got 67%
Kaylee got 37%
Simon got 18%
Jayne got 17%
Wash got 14%
Book got 9%
Zoe got 3%
River got 1%
To sort 9 words took 38 assignments and 21 comparisons,
for a total of 59 operations.
We expected Insertion sort to take 52 operations to sort 9 words.
Return to
Outline page
/
assignment description