Skip to content

Conversation

udistructor
Copy link
Contributor

The selection sort exercise is implemented as a milti-level sort on list of dictionaries

@@ -0,0 +1,28 @@

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this file

@@ -0,0 +1,54 @@
# Exercise: Selection Sort

Implement a Milti-Level Sort of a given list of dictionaries. A single dictionary entry contains two keys 'First Name' and 'Last Name'. the list should be sorted first based on 'First Name', then based on 'Last Name', w.r.t. common/same 'First Name' entries.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Multi-level


print(f'Given unsorted array:', *elements, sep='\n')
multilevel_selection_sort(
elements, ['First Name', 'Last Name'])
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

multilevel_selection_sort(
elements, ['First Name', 'Last Name']
)

@groverkds groverkds merged commit eb5c053 into codebasics:master Nov 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants