subject
Mathematics, 07.06.2020 00:04 darlene93

What are the best data structures to create the following items? And why? Designing a Card Game with 52 cards. Online shopping cart (Amazon, eBay, Walmart, Cosco, Safeway, ...) Online waiting list (De Anza College class waiting list, ...) Online Tickets (Flight tickets, concert tickets, ...)

Answers

ansver
Answer from: aaronscott6474

The best data structure in storing card is an array.

The best choice for a shopping cart is hash-maps. the advantage of harsh mark is that they are dynamic in nature.

Waiting lists are managed by a method called the  First In First Out. when an individual is  waiting  for too long, he or she should be given the first chance for service.

Sorted links are a better options for storing tickets.

Step-by-step explanation:

Solution

In other to store the cards the best structure to be applied here is an array.

Now, we are aware the array size, which comprises of 52 items, and hence card vales can be  easily stored  For standard 52-deck cards, a 2D array of size 4x15 can also be applied, with 4 being color count, and 13 being card in each color.

In this example, the better option for shopping cart is hash-maps, because it is dynamic in nature for instance, when items are  removed and more often, and also, there is a need for mapping of item ID or name to its actual database, so these values can be kept or stored as key-value pairs.

Waiting lists are normal managed in a way of First In First Out, since a person is waiting longer should be given the first chance for service. this FIFO method is best used by a Queue. so this online waiting list can best be used by a queue.

For tickets storing, a better option will be the sorted linked lists. because the tickets are to be stored in a large amount, and there will be deletions and insertions in large quantity. so keeping them in a sorted list will reduce the resource usage and the trade-off made as high search time will also have less effect, as there will be a limited number of searches.

 

ansver
Answer from: Quest

x² + 3x + 7 = 0       [ax² + bx + c]

a = 1

b = 3

c = 7

quadratic formula:

x = \frac{-b+/-\sqrt{b^2-4ac} }{2a}     (+/- is this ±)

plug in the numbers into the variables

x = \frac{-3+/-\sqrt{3^2-4(1)(7)} }{2(1)}

x=\frac{-3+/-\sqrt{9-28} }{2}

x=\frac{-3+/-\sqrt{-19} }{2}

your answer is a

What is the solution to this equation? x^2+3x+7=0
ansver
Answer from: Quest

never fear papaguy is here

answer

Other questions on the subject: Mathematics

image
Mathematics, 21.06.2019 19:40, giiffnlojd
Which is greater, 7 p 5 or 7 c 5? 7p5 7c5
Answers: 1
image
Mathematics, 21.06.2019 21:00, GreenHerbz206
Solving algebraic equations 2m+3=11
Answers: 2
image
Mathematics, 21.06.2019 21:30, lraesingleton
Acompany charges $0.10 for each letter engraved. bobby plans to spend no more than $5.00 on the engraving on a jewelry box. write and solve an inequality to find the maximum number of letters he can have engraved.
Answers: 1
image
Mathematics, 21.06.2019 22:00, iamsecond235p318rq
Find the greatest common factor of the followig monomials 46g^2h and 34g^6h^6
Answers: 1
You know the right answer?
What are the best data structures to create the following items? And why? Designing a Card Game with...

Questions in other subjects:

Konu
Mathematics, 11.05.2021 18:50
Konu
Mathematics, 11.05.2021 18:50