Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

You have been provided a code for creating a deck of cards: deck _ of _ cards.py . In addition you have been given a

You have been provided a code for creating a deck of cards: deck_of_cards.py. In addition you have been given a few different codes for sorting elements in a list: quick_sort.py, bubble_sort.py, insert_sort.py, and selection_sort.py. What you have been
tasked to do is:
Utilize one of the above sorting algorithms to sort the cards in the deck
Both by suit and by value.
The suits should be ordered in the same order in which the deck is created (see line 6 of deck_of_cards.py)
Create a property that determines whether or not the deck is sorted.
Create a search method that allows a user to describe a card and will return the location (array index) of the card.
This search can easily be made to be high intelligent
What can you do to make this search a constant time look up?
Finish all other leftover TODO's in the code as described

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Professional SQL Server 2012 Internals And Troubleshooting

Authors: Christian Bolton, Justin Langford

1st Edition

1118177657, 9781118177655

More Books

Students also viewed these Databases questions