Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Suppose we have a circular array implementation of the queue class, with ten items in the queue stored at data [ 3 ] through data

Suppose we have a circular array implementation of the queue class, with ten items in the queue
stored at data[3] through data[12]. The CAPACITY is 42. Where does the push member function
place the new entry in the array?
a) data[1]
b) data[13]
c) data[11]
d) No correct answer
Shell sort works by:
Shell sort is considered:
a) A stable sort
b) Either stable or unstable depending on the gap sequence
c) An unstable sort
d) None of the above
Page 6 of 7
Bubble sort is
Which of the following is true about bubble sort?
a) Useful for very large arrays
b) Easy to implement
c) Has very bad performance
d) Both b and c
Selection sort is
During each iteration of selection sort, the smallest
a) Number is moved to the front
b) Number is selected
c) Two numbers are swapped
d) None of the above
Selection sort is well suited for
Auxiliary space complexity of selection sort is
a)O(1)
b) Depends on implementation
c)O(n)
d) None of the above
In selection sort, picking the smallest element requires at least
a) n-1 comparisons
b)n???2 comparisons
c)n comparisons
d) None of the above
Selection sort is
to implement
a) Difficult
b) Highly optimized
c) Easy
d) None of the above
Which of the following has the lowest time complexity for an enqueue operation?
a) Array based queues
b) Heap based queues
c) Linked list based queues
d) All have the same time complexity
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2018 Dublin Ireland September 10 14 2018 Proceedings Part 1 Lnai 11051

Authors: Michele Berlingerio ,Francesco Bonchi ,Thomas Gartner ,Neil Hurley ,Georgiana Ifrim

1st Edition

3030109240, 978-3030109240

More Books

Students also viewed these Databases questions