Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

PLEASE ANSWER ALL OF QUESTIONS QUESTION 1 Basic operations that are supported by built-in structure array support are (page 63) A. Fetch and Delete B.

PLEASE ANSWER ALL OF QUESTIONS

QUESTION 1

Basic operations that are supported by built-in structure array support are (page 63)

A.

Fetch and Delete

B.

Insert and Delete

C.

Fetch and Update

D.

Delete and Update

QUESTION 2

Which one is NOT correct about ArrayList (page 118)?

A.

ArrayList is class provided in Java Application Programmer Interface (API)

B.

ArrayList object can expand at ru-time beyond its initial size to accommodate unanticipated Insert Operation

C.

ArrayList boston = new ArrayList);//initial size defaults to 10 nodes

D.

Insert, Fetch, Delete, and Update are 4 operations of ArrayList

QUESTION 3

Which one is NOT the feature of the programmer-defined array structures (page 66)

a.

They are accessed in the node number mode

b.

They use an array of objects to store the data set

c.

They are fully encapsulated

d.

hey can store data sets of multiple nodes

QUESTION 4

Generic Data Structure is: (page 106)

A.

a data structure can store any kind of node and can be used in an application

B.

a data structure could not only be used to store the data for a telephone listing application but also an employee record application, a store inventory application or any other type of data application without modifying its code

C.

a and b

D.

none of above

QUESTION 5

Which statement is NOT correct for Built-in Structure Array: (page 60)

A.

All of the values stored in the variable are of the same type

B.

Each array member is distinguished by the variable name and a unique ordinal subscript

C.

It can grow and shrink, therefore, Insert and Delete operation would be allowed

D.

There is a minimum and maximum value of the subscript

QUESTION 6

The programmer-defined array structures support the following operations

A.

Fetch, Insert

B.

Fetch, Insert, Delete, Update

C.

Fetch, Update

D.

Fetch, Delete

QUESTION 7

The Insert algorithm of Sorted Array Structure has the following steps, put the following steps in correct order (page 76)

Step A: Using Binary Search Algorithm to search until finding two adjacent keys that backed the new nodes key

Step B: Move all the nodes below these two nodes and the larger of the two braked nodes down one element to open up a spot for the new node

Step C: The content of the node that we want to insert is deep copied to the spot for the new created node then a reference to that node is placed in the array element that has been opened up

a.

ABC

b.

BAC

c.

BCA

d.

CBA

QUESTION 8

The Delete algorithm of Unsorted-Optimized Array Structure has the following steps, put them in correct order (page 67 and 81)

Step A: Move the last node reference into the deleted nodes position.

Step B:Use sequential search to locate the node to be deleted, the search begins at element zero and terminates when the node with the given key is located.

A.

AB

B.

AB and need another step

C.

BA

D.

BA and need another step

QUESTION 9

Which one is not correct for the speeds of Unsorted-Optimized Array Structure operations?

A.

Insert: O(3)

B.

Delete: O(<=n)

C.

Fetch: O(log2n)

D.

Update: O(<= n + 3)

QUESTION 10

The Insert algorithm of Unsorted Array Structure has the following steps, put the following steps in correct order (page 66)

Step A: index next is incremented by one to prepare for the next insert Step B: A new node object is allocated with its contents initialized to the contents of the node to be inserted Step C: A reference to it is placed into the array at data[next]

A.

ABC

B.

BAC

C.

BCA

D.

CBA

QUESTION 11

Which one is not correct for the speeds of Unsorted Array Structure operations

A.

Insert: O(3)

B.

Delete: O(log2n)

C.

Fetch: O(n)

D.

Update: O(2n + 3)

QUESTION 12

Which one is correct operation list of ArrayList (page119)?

A.

Insert, Update, Fetch, Remove

B.

Add, Update, Fetch, Remove

C.

add, get, remove and set

D.

dd, get, delete and set

QUESTION 13

Which one is the programmer-defined array structure? (page 66)

A.

The Unsorted array

B.

The Sorted array

C.

The Unsorted-Optimized Array

D.

All of above

QUESTION 14

Which one is not correct for the speeds of Sorted Array Structure operations

A.

Insert: O(3)

B.

Delete: O(n)

C.

Fetch: O(log2n)

D.

Update: O(2n )

QUESTION 15

For convenience of typing, the Java code replaces the subscript with the index for an array n elements. which one is NOT correct about it (page 63)

A.

x[i] reference for the element at the index i

B.

index i start by 0

C.

index i ends by n

D.

the last element in array x is x[n-1]

QUESTION 16

Fetch algorithm of Unsorted Array Structure with the key targetKey has the following steps, put them in correct order (page 69-70)

Step A: return a deep copy of it

Step B: Use Sequential Search Algorithm starting at element 0 and down the ar ray until an object with the given key is found (page 71)

A.

AB

B.

AB and need one more step

C.

BA

D.

BA and need one more step

QUESTION 17

Update algorithm of Unsorted Array Structure with the key field as targeKey will combine two following operation in this order (page 71)

A.

Fetch - Insert

B.

Insert - Fetch

C.

Insert - Delete

D.

Delete - Insert

QUESTION 18

The Delete algorithm of Sorted Array Structure has the following steps, put them in correct order (page 74)

Step A: next = next-1 and assign data[next] to null (reclaim unused storage)

Step B:Use Binary Search algorithm to locate the node i to be deleted

Step C: Move all the references below node i to node next-2 up one index

A.

BAC

B.

BCA

C.

ABC

D.

CBA

QUESTION 19

Fetch algorithm of Sorted Array Structure with the key targetKey has the following steps, put them in correct order (page 69-70)

Step A: return a deep copy of it

Step B: Use Binary Search algorithm starting to locate the node

A.

AB

B.

AB and need one more step

C.

BA

D.

BA and need one more step

QUESTION 20

The Delete algorithm of Unsorted Array Structure has the following steps, put them in correct order (page 67)

Step A: Set the array element that stores the reference to the node to null

Step B:Use sequential search to locate the node to be deleted, the search begins at element zero and terminates when the node with the given key is located.

Step C: Move all the node references below the deleted node up one element in the array and then decrement the memory cell next

A.

BAC

B.

BCA

C.

ABC

D.

CBA

QUESTION 21

A stack will be initialized with top = 0 and data[i] = null with i = 0 to size

True

False

QUESTION 22

In the queue structure, the node is inserted at front and is removed at rear

True

False

QUESTION 23

Give an efficient circular array-based queue Q capable of holding 10 objects.

After the following code is executed:

for (int k = 1; k <= 7; k++ ) Q.enqueue(k);

for (int n = 1; n <=7; n++ ) Q.enqueue (Q.dequeue());

The result on the queue as follows:

0

1

2

3

4

5

6

7

8

9

4

5

6

7

1

2

3

True

False

QUESTION 24

The queue is initialized with the top = -1 and data[ i ] = null where i = 0 to size

True

False

QUESTION 25

Enqueue each letter of the word "Welcome" to the queue then print out the result of dequeue each letter from the queue will get the same word "Welcome

True

False

QUESTION 26

They are the operations that perform on the Stack structures

A.

Enqueue, Dequeue

B.

Pop, push

C.

Insert, Delete, Fetch and Update

D.

Add, Remove, get, set

QUESTION 27

Which of the following stack operations could result in stack underflow?

A.

is_empty

B.

pop

C.

pusht

D.

two or more of the above answers

QUESTION 28

Which of the following access modes cannot be used to access restricted structures?

A.

Update

B.

Fetch

C.

Insert

D.

None

QUESTION 29

Nodes A, B and C are placed on a stack in the order first A, then B and finally C, if invoking pop method on this stack, which node will be popped

A.

Node A

B.

Node B

C.

Node C

D.

You need to determine which node to pop

QUESTION 30

onsider the following pseudocode:

declare a stack of characters while ( there are more characters in the word to read ) { read a character push the character on the stack } while ( the stack is not empty ) { write the stack's top character to the screen pop a character off the stack } What is written to the screen for the input "carpets"?

A.

serc

B.

carpets

C.

steprac

D.

ccaarrppeettss

QUESTION 31

The speed of Enqueue operation of Queue structure is:

A.

O(n)

B.

O(nlog2n)

C.

O(1)

D.

O(n2)

QUESTION 32

Describe the ability of Peek operation on the classical Model of a stack

A.

The ability to test for a full stack

B.

The ability to store an unlimited number of nodes on the stack

C.

The ability to pop a node from the stack without deleting it from the structure

D.

It is not a operation of the classical Model of a stack

QUESTION 33

Tell what of the following does the acronyms FIFO describes for:

A.

Stack

B.

Queue

C.

Hashtable

D.

none

QUESTION 34

The speed of Pop operation of Stack structure is:

A.

O(n)

B.

O(nlog2n)

C.

O(1)

D.

O(n2)

QUESTION 35

In the implementations of the Stack operation presented in this chapter, what does the memory cell top store?

a.

the index of the array where the next push or the next pop will be performed

b.

the index of the array where the last push or the last pop was performed

c.

the index of the array where the next push or the last pop was performed

d.

the index of the array where the last push or the next pop is performed

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

Microsoft SQL Server 2012 Unleashed

Authors: Ray Rankins, Paul Bertucci

1st Edition

0133408507, 9780133408508

More Books

Students also viewed these Databases questions

Question

1.what is the significance of Taxonomy ?

Answered: 1 week ago

Question

What are the advantages and disadvantages of leasing ?

Answered: 1 week ago

Question

Name is needed for identifying organisms ?

Answered: 1 week ago