Ask Computer Engineering Expert

(1).
Suppose that queue is a QueueClass object and the size of the array implementing queue is 100Also, suppose that the value of queueFront is 99 and the value of queueRear is 25.
a. What are the values of queueFront and queueRear after adding an element to queue?
b. What are the values of queueFront and queueRear after removing an element from queue?

(2).
Suppose that queue is a QueueClass object and the size of the array implementing queue is 100 Also, suppose that the value of queueFront is 99 and the value of queueRear is 99.
a. What are the values of queueFront and queueRear after adding an element to queue?
b. What are the values of queueFront and queueRear after removing an element from queue?

(3)
Suppose that queue is a QueueClass object and the size of the array implementing queue is 100 Also, suppose that the value of queueFront is 99 and the value of queueRear is 25.
a. What are the values of queueFront and queueRear after adding an element to queue?
b. What are the values of queueFront and queueRear after removing an element from queue?

(4)
Suppose that queue is implemented as an array with the special reserved slot, as described in this chapter. Suppose that the sizeof the array implementing queue is 100. Also, suppose thatthe value of queueFront is 74 and the value of queueRearis 99
a)
what are the values ofqueueFront and queueRear after adding an element to queue?
b)
what are the values ofqueueFront and queueRear after removing an element to queue? Also, what
is the position of the removed queue element?

(5).
Explain how collision is resolved using linear probing?

(6).
Explain how collision is resolved using quadratic probing?

(7).
What is double hashing?

(8).
suppose that the size of the hash table is 101 and items are inserted in the table using quadratic probing. Also, suppose that a new item is to be inserted in the table and its hash address is 30. If position 30 in the hash table is occupied and the next 4 positions given by the probe sequence are also occupied, determine where in the table the item will be inserted.

(9)
Suppose that an item is to be removed from a hash table that was implemented using linear or quadratic probing. Why wouldn't you mark the position of the item to be deleting as empty?

(10)
What are the advantage of open hashing?

(11)
Give a numerical example to show that collision resolution by quadratic probing is better than chaining?

(12)
Give a numerical example to show that collision resolution by chaining is better that quadratic probing?
(13).
Suppose that 550 items are to be stored in a hash table. If, on average in a successful search, three comparisons are needed to determine whether an item is in the table what would be the size of the hash table if
a) Linear probing is used
b) Chaining is used

(13)
Assume the following list: 7, 28, 31, 40, 5, 20. The first four keys are in order. to move 5 to its proper position, using insertion sort as described in this chapter, exactly how many key comparisons are executed?

(14)
Recall the insertions sort algorithm (contiguous version) as discussed in this chapter. Assume the following list of keys: 18, 8, 11, 9, 15, 20, 32, 61, 22, 48, 75, 83, 35, 3.
Exactly how many comparisons are executed to sort this list using the insertion sort algorithm?

(15)
Both the merge sort and quick sort algorithms sort a list by partitioning the list. Explain how the merge sort algorithm differs from the quick sort algorithm in partitioning the list.

(16)
Assume the following list of keys
18,40,16,82,64,67,57,50,37.47,72,14,17,27,35
This list is to be sorted using the quick sort algorithm as discussed in this chapter. Use pivot as the median of the first, last, and middle elements of the list.
a) What is the pivot?
b) Give the resulting list after one call to the partition procedure.

(17)
use the method buildHeap as given in this chapter to convert the following array into a heap. Show the final form of the array.
47,78,81,52,50,82,58,42,65,80,92,53,63,87,95,59, 34,37,7,20

(18)
Suppose that the following list was created by the method buldHeap during the heap creation phase of the heap sort algorithm.
100,85,94,47,72,82,76,30,20,60,65,50,45,17,35,14,28,5
Show the resulting array after two poses of the heap sort algorithm. (use heapfy method as guven in this chapter). Exactly how many key comparisons are executed during the first pass?

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M92405179
  • Price:- $35

Priced at Now at $35, Verified Solution

Have any Question?


Related Questions in Computer Engineering

Does bmw have a guided missile corporate culture and

Does BMW have a guided missile corporate culture, and incubator corporate culture, a family corporate culture, or an Eiffel tower corporate culture?

Rebecca borrows 10000 at 18 compounded annually she pays

Rebecca borrows $10,000 at 18% compounded annually. She pays off the loan over a 5-year period with annual payments, starting at year 1. Each successive payment is $700 greater than the previous payment. (a) How much was ...

Jeff decides to start saving some money from this upcoming

Jeff decides to start saving some money from this upcoming month onwards. He decides to save only $500 at first, but each month he will increase the amount invested by $100. He will do it for 60 months (including the fir ...

Suppose you make 30 annual investments in a fund that pays

Suppose you make 30 annual investments in a fund that pays 6% compounded annually. If your first deposit is $7,500 and each successive deposit is 6% greater than the preceding deposit, how much will be in the fund immedi ...

Question -under what circumstances is it ethical if ever to

Question :- Under what circumstances is it ethical, if ever, to use consumer information in marketing research? Explain why you consider it ethical or unethical.

What are the differences between four types of economics

What are the differences between four types of economics evaluations and their differences with other two (budget impact analysis (BIA) and cost of illness (COI) studies)?

What type of economic system does norway have explain some

What type of economic system does Norway have? Explain some of the benefits of this system to the country and some of the drawbacks,

Among the who imf and wto which of these governmental

Among the WHO, IMF, and WTO, which of these governmental institutions do you feel has most profoundly shaped healthcare outcomes in low-income countries and why? Please support your reasons with examples and research/doc ...

A real estate developer will build two different types of

A real estate developer will build two different types of apartments in a residential area: one- bedroom apartments and two-bedroom apartments. In addition, the developer will build either a swimming pool or a tennis cou ...

Question what some of the reasons that evolutionary models

Question : What some of the reasons that evolutionary models are considered by many to be the best approach to software development. The response must be typed, single spaced, must be in times new roman font (size 12) an ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As