Key comparisons in sequential search


Assignment:

1.A ____ is a list in which each element contains a key, such that the key in the element at position k in the list is at least as large as the key in the element at position 2k + 1 (if it exists) and 2k + 2 (if it exists).

A) hemp
B) hash table
C) heap

2.A linked list is a collection of ____.

A) addresses
B) classes
C) nodes

3.The structured design approach is also known as ____.

A) top-down design
B) object design
C) bottom-up design

4.Operations, such as finding the height, determining the number of nodes, checking whether the tree is empty, tree traversal, and so on, on AVL trees cannot be implemented the same way they are implemented on binary trees.

A) True
B) False

5.____ iterators are forward iterators that can also iterate backward over the elements.

A) Output
B) Bidirectional
C) Input

6.A list is ordered if its elements are ordered according to some criteria.

A) True
B) False

7.The analysis of algorithms enables programmers to decide which algorithm to use for a specific application.

A) True
B) False

8.The number of key comparisons in a sequential search depends on the value of the search item.

A) True
B) False

9.A precondition is a statement specifying the condition that must be true before the function is called.

A) True
B) False

10.The header node is placed at the ____ of a list.

A) end
B) middle
C) beginning

11.The copy constructor automatically executes when, as a parameter, an object is passed by value.

A) True
B) False

12.When the destructor ____ the queue, it deallocates the memory occupied by the elements of the queue.

A) allocates
B) destroys
C) instantiates

13.The expression vecList.front() moves an element to the front of the vector.

A) True
B) False

14.We can traverse a singly linked list backward starting from the last node.

A) True
B) False

15.When you declare a derived class object, this object inherits the members of the base class, but the derived class object cannot directly access the ____.

A) base class constructors
B) private data members of the base class
C) data members in its own class

16.The expression vecCont.empty() empties the vector container of all elements.

A) True
B) False

17.The components of a class are called the ____ of the class.

A) objects
B) members
C) operators

18.In a doubly linked list, some of the operations require modification from how they were implemented for a regular linked list, because of the ____ pointer(s) in each node.

A) two
B) three
C) null

19.The syntax for accessing a class (struct) member using the operator -> is ____.

A) pointerVariableName&->classMemberName
B) pointerVariableName.classMemberName
C) pointerVariableName->classMemberName

20.If the list is stored in an array, we can traverse the list in either direction using an ____.

A) increment variable
B) index variable
C) interface variable

21.With the help of the ____, two values can be combined into a single unit and, therefore, can be treated as one unit.

A) class double
B) class tuple
C) class unit
D) class pair

22.The deque class is a type of container adapter.

A) True
B) False

23.The operation ____ reinitializes the stack to an empty state.

A) init
B) alloc
C) initializeStack

24.In the random probing method, the ith slot in the probe sequence is ____.

A) (h(X) % ri) + HTSize
B) (h(X) % HTSize) + ri
C) (h(X) + HTSize) % ri
D) (h(X) + ri) % HTSize

25.The binary search algorithm uses the ____ technique to search the list.

A) divide-and-divide
B) conquer-and-resign
C) divide-and-conquer

26.To define new classes, you create new ____ files.

A) friend
B) header
C) placeholder

27.To remove, or pop, an element from the stack ____.

A) increment stackTop by 1
B) decrement stackTop by 1
C) invert stackTop

28.Every call to a recursive function requires the system to allocate memory for the local variables and formal parameters

A) True
B) False

29.A technique in which one system models the behavior of another system is called ____.

A) referencing
B) simulation
C) bench testing

30.Because a queue is an important data structure, the Standard Template Library (STL) provides a class to implement queues in a program.

A) True
B) False

31.The derived class can redefine public member functions of a base class.

A) True
B) False

32.Containers are class templates.

A) True
B) False

33.Containers are essentially used ____.

A) to update objects that are part of a given set of elements
B) to manipulate data
C) to manage objects of a given type

34.In breadth first traversal, starting at the first vertex, the graph is traversed as little as possible.

A) True
B) False

35.If the list is stored in a linked list, we can traverse the list in only one direction starting at the first node because the links are only in one direction.

A) True
B) False

36.Default arguments can be used with an overloaded operator.

A) True
B) False

37.In a shallow copy, two pointers of different data types point to the same memory.

A) True
B) False

38.In a ____, customers or jobs with higher priority are pushed to the front of the queue.

A) false queue
B) priority queue
C) free queue
D) double queue

39.The statement vecList.push_back(elem) deletes the element elem from the vector.

A) True
B) False

40.The use of a queue structure ensures that the items are processed in the order they are received.

A) True
B) False

Solution Preview :

Prepared by a verified Expert
Business Management: Key comparisons in sequential search
Reference No:- TGS01794665

Now Priced at $90 (50% Discount)

Recommended (93%)

Rated (4.5/5)