Skip to content

Selection sort exercise #7

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Nov 2, 2020
Merged

Selection sort exercise #7

merged 9 commits into from
Nov 2, 2020

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