Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search & Filtering

Draw the (1)stack and (2)circular queue data structures in array implementation for "each step" in the following sequence :add(A),add(B), add(C), remove, add(D), add(E), remove, add (F), add(G). Assume the initial size of 5 for array implementation. Remember to show TOP(top of the stack) for stack and both Front and back for queue. In circular queue implementation assume we sacrifice one storage for telling the difference between FULL and EMPTY.


This path follow the last posted once:

Application Class The application class must have methods that do the following  Adds a new car  Sells a car  Decreases the price of a specific car by a percentage provided by the user  Displays the registration numbers and prices of all the cars that are not cheap.


You need to implement a program for a car salesman who wants to keep record of the cars he has for sale. For each car he keeps the following: Registration Number (always unique), Model, Colour and Price Implement the following classes Class Car It must have a constructor, the necessary Get and Set methods, as well as the following methods: public boolean isCheap() // returns TRUE if the car is selling for under R10000.00 public void decreasePrice(double Amount) // decreases the selling price by Amount public void Display() // displays the Registration Number and Price of a car Class CarList It must contain the standard methods you would expect in a list class. The class must be able to interact with a data file (in other words, get initial data from a data file, and write the final data to a data file), and uses ArrayLists to implement a list


In this exercise, use the following <span style="text-decoration-line: none;">variables</span>: i,lo, hi, and result. Assume that lo and hi each are associated with an int and that result refers to 0.

Write a while loop that adds the integers from lo up through hi (inclusive), and associates the sum with result.

Your code should not change the values associated with lo and hi. Also, just use these <span style="text-decoration-line: none;">variables</span>: i,lohi, and result.



Using the graph below, 

 

a. Draw an adjacency list and matrix. [5 MARKS EACH]

b. Perform a depth first search using Vertex C as your source draw the resulting depth first search tree [10MARKS]


  1. Suppose you have ten students in the programming-1 class; you are tasked to check which one of these students is vegetarian. Suppose five students are vegetarian. Write pseudocode, algorithms, flowchart to solve this problem 
A company wishes to bucketize their item ids for better search operators.the bucket for the item id is chosen on the basis of the maximum value of the digit in the item id write an algorithm to find the bucket to which the item id will be assigned.
A data compression software utilizes various steps to compress a string of data. One of the steps involves finding the count of characters that are not repeated in the string. Write an algorithm for the software developer to find the count of characters that are not repeated in the string.
The diagram at left below shows the state of the sending side of a communication
session using a go-back-N protocol with cumulative acknowledgments, a window size
of 4, and a retransmission timeout of 25. The array represents the “re-send” buffer and
entry in the buffer represents a packet with its sequence number. As usual for
GoBack-N, we are using a single shared timer. Its expiration time is shown in the
diagram. Assume that the channel may lose packets but never re-orders them.
Suppose that at time 7, the application passes us a new payload to be sent and at time
12, we receive an ack with sequence number 3.
a. List all the packets sent by the sender between times 6 and 13, including
repeats (if any).
b. Show the state of the sender at time 13, in the right-hand diagram.
c. At time 13, how many additional packets can be sent before an ack is
received?
Two adjacent nodes A and B use Selective Repeat sliding window protocol with 3-bit
sequence numbers and a send window size of 4. We assume that A is transmitting to
B. What is the window position for A and B by drawing the sequence diagram after :
 A sends frames 0,1,2,3.
 B acknowledges frames 0,1,2,3 and these acks are received by A.
 A sends frames 4,5,6,7, frames 5 and 6 are lost.
 B acknowledges frames 4 and 7, the ack for 4 is lost.
 The acks for 7 are received by A.
Which frames are resent? Explain your answer.
LATEST TUTORIALS
APPROVED BY CLIENTS