CS 1030

Réussis tes devoirs et examens dès maintenant avec Quizwiz!

Given the following numbers— 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, and 12— On what level is the number 6?

...

Given the following numbers— 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, and 12— What is the maximum height of the tree?

...

How many comparisons does it take to find the following numbers? a. 8 b. 2 c. 23 d. 30 e. 17 (pg 316)

...

How many right and left child nodes are there?

...

What is the maximum height of the tree?

...

What is the number of nodes on level 4?

...

Given the following numbers— 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, and 12— Draw a binary search tree for these numbers. Make sure binary search tree rules are applied.

...

Given the following numbers— 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, and 12— How many comparisons does it take to find the number 11?

...

Given the following numbers— 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, and 12— How many comparisons does it take to find the number 4?

...

What is the number of nodes on level 3?

4 nodes

A( n) __________ is a data structure consisting of contiguous memory locations. a. Array b. Stack c. Queue d. Tree

a. Array

The statement char[] aAnswers = new char[ 5] declares an array that has memory locations of 1 through 5. a. True b. False

a. False The int[ 5] part of the statement, for specifying array type and size, tells the computer to reserve five memory locations to store numeric ( int) values for the array. Arrays start at element 0 because they're implemented by using memory addresses.

FIFO is an acronym for: a. First in, first out b. First in, first order c. First in, final out d. First in, final order

a. First in, first out

The offset is used to specify the distance between memory locations. a. True b. False

a. True

A queue uses a FIFO structure. a. True b. False

a. True A queue is another type of linked list that uses a first in, first out (FIFO) structure.

A stack uses a LIFO structure. a. True b. False

a. True A stack is considered a last in, first out ( LIFO) data structure.

A single array can contain information of different data types ( integers, characters, decimals, and so on). a. True b. False

b. False

Arrays are a good data structure to use with dynamic data. a. True b. False

b. False A linked list doesn't have to work with contiguous memory, which makes it more efficient for dynamic structures.

LIFO is an acronym for: a. List in, first order b. Last in, first out c. Last in, first order d. List in, first out

b. Last in, first out

A( n) __________ is used in an array to access each element. a. Index b. Subscript c. Both a and b d. None of the above

c. Both a and b


Ensembles d'études connexes