Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Stacks and Queues question: using an example STL Queue and/or Stack, given a set of operations, indicate the final elements of the queue or stack

Stacks and Queues question: using an example STL Queue and/or Stack, given a set of operations, indicate the final elements of the queue or stack

-write the C++ code for a binary search (you have an ordered array)

-Binary Search tree (slideset 10b), how to create, add and delete items , e.g.

given values, create a binary search tree

add a value to a given binary search tree

delete a value from a given binary search tree

-define and give example ofa complete binary tree

-define and give example of a heap

-Know how to insert, delete items from a heap

-Given a heap as a complete binary tree, show the implementation in an array

3. questions on hash tables, example:

-show a hash table of size 9, and insert the keys 5, 29, 20, 0, 18 into the table using the hash function, key%9

-a chained hash table has size 500, how many keys can be inserted?

a. 500

b. 501

c. 1000

d. there is no maximum

Running time

For an unordered array of n elements, which of the following is worst-case running time for the search?

a) O(n)

b) O(log n)

c) O(1)

d) None of the above

For an ordered array of n elements, which of the following is the worst-case running time for the search?

a) O(n)

b) O(log n)

c) O(1)

d) None of the above

For a hash table, which of the following is the following is the worst-case running time of the search?

a) O(n)

b) O(log n)

c) O(1)

d) None of the above

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

Step: 3

blur-text-image

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

Beginning Databases With PostgreSQL From Novice To Professional

Authors: Richard Stones, Neil Matthew

2nd Edition

1590594789, 978-1590594780

More Books

Students also viewed these Databases questions