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
There are 12 boys and 10 girls in your gym class. If 6 boys joined the class, how many girls would need to join to keep the rati
harina [27]
The original ratio is 6 boys= 5 girls, so if another 6 boys joined, another 5 girls would need to join, too. 
5 0
3 years ago
Help me with this question i tried multiple time to solution it always wrong
maw [93]
7/9-1/3 or 7/9-3/9= 4/9 is the answer
4 0
3 years ago
What is the rate of change of the line that passes through the points (-3,-4) and (5,10)?
const2013 [10]

Answer:

m=7/4

Step-by-step explanation:

8 0
3 years ago
65 is 52% of what number
svp [43]
65 is 52% of 125.

I do the IS over OF operation when finding a percentage, where you multiply the is by 100 then divide by the percentage. 


6 0
3 years ago
Henry takes out a $650 discounted loan with a simple interest rate of 12% for a period of 7 months. What is the effective intere
Andru [333]

The effective rate of interest will be 9.10 %.

<h3>What is compound interest?</h3>

Compound interest is applicable when there will be a change in principle amount after the given time period.

Let's say you have given 100 for two years with a 10% rate of interest annually than for the second-year principle amount will become 110 instant of 100.

Given for simple interest

Principle amount = $650

Rate of interest = 12%

Time period = 7 months.

Interest= PRT/100

Interest= 650× 12 × 7/100 = 546

So final amount = 650 + 546 =  $1196

By compound interest

1196 = 650[1 + R/100]^{7}

R = 9.10%

Hence the effective rate of interest will be 9.10%.

For more information about compound interest,

brainly.com/question/26457073

#SPJ1

6 0
2 years ago
Other questions:
  • What is the total number of relative maximum and minimum points of the function whose derivative for all x is given by f ‘ (x) =
    10·1 answer
  • Solve for y -12x+3y=1
    11·1 answer
  • If f(x) = -+ 3x + 5 and g(x) = x2 + 2x, which graph shows the graph of (f + 9)x)?
    6·1 answer
  • Create a table of data for two different linear functions. The table should use the same values of x for both functions. Based o
    14·1 answer
  • Please help....Which fraction has the greatest value?
    12·2 answers
  • suppose that A and B are 3x3 matrices I is tje Identity matrix of order 3 such that AB=2l. lf det |B|=6 . what is the det(A^t)?​
    11·1 answer
  • Find the area.
    7·2 answers
  • Find the additive inverse of 1/6÷(-2)+3/2​
    13·1 answer
  • V (1) = 65t+280, where time , in minutes,.the pump has been on .
    11·1 answer
  • 3x+1. HELP ME!!!!!! I have this question as a quiz 4 u all.
    14·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!