1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Yuliya22 [10]
3 years ago
12

What are the best data structures to create the following items? And why? Designing a Card Game with 52 cards. Online shopping c

art (Amazon, eBay, Walmart, Cosco, Safeway, ...) Online waiting list (De Anza College class waiting list, ...) Online Tickets (Flight tickets, concert tickets, ...)
Mathematics
1 answer:
NeX [460]3 years ago
3 0

Answer:

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.

 

You might be interested in
9) When a whole number is multiplied by a decimal smaller than one, what can you conclude about the result?
PIT_PIT [208]
D and B.
____________
5 0
3 years ago
Which set best represents the positive integers?
alexira [117]

Answer:

O A. {1,2,3,4,...)

Step-by-step explanation:

Its not B because it holds 0 which is ±

8 0
3 years ago
Determine o Conjunto Solução da equação do 2º grau abaixo. Deixe seus cálculos registrados.
scZoUnD [109]

Answer:

x = 15, x = 10

Step-by-step explanation:

6 0
3 years ago
GIVING BRAINLIEST IF YOU DO IT CORRECT
abruzzese [7]

We use the word argument to refer to a series of reasons given to support a claim. The claim being supported is the conclusion. The reasons given to accept the conclusion are called premises. Analyzing an argument means identifying its premises and conclusion.

Hope this helps! God bless you, have a good day~!

8 0
3 years ago
Read 2 more answers
The point (0, 2) is the only solution to the system of linear equations that contains the equations
Nataly_w [17]

Answer: C. Independent equations.

Hope tis helps you out.

3 0
3 years ago
Other questions:
  • Find the value of two numbers if their sum is 12 and thier difference is 4
    7·1 answer
  • Uh help i don`t get this (ez question) :D
    15·2 answers
  • Who do I write 42\96.6 as a unit rate
    14·1 answer
  • Which is a y-intercept of the continuous function in the table? (5, 0) (0, 1) (0, 5) (1, 0)
    13·2 answers
  • Melanie invested $5,500 in an account paying an interest rate of 6.9% compounded continuously. Assuming no deposits or withdrawa
    11·1 answer
  • What is the algebraic expression of thrice w increased by 7 is 25
    10·1 answer
  • Line C passes through the points (-6, -2) and (3,8). Line Fis perpendicular to Line C. What is the slope of Line F?
    14·1 answer
  • What is 2 3/4 graphed on a coordinate grid? <br><br> Y-Axis Max: 10<br> X-Axis Max: 10
    10·1 answer
  • Tin
    11·1 answer
  • Can someone help me plz
    10·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!