CSD

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

[B] for relatively permanent collections of dataj

Arrays are the best data structures [A] for the size of the structure and the data in the structure are constantly changing [B] for relatively permanent collections of data

[B] doubly linked list

Fill in the blank of the statement to form the most correct one: A____ node contains some data and one link to its successor and one link to its predecessor in the list. [A] binary search tree [B] doubly linked list [C] skip list [D] singly linked list

a. True

In Huffman coding, both the sender and receiver must have a copy of the same code in order for the decoded file to match the encoded file. Select one: a. True b.true

[C] The run-time stack overflows, halting the program

In a real computer, what will happen if you make a recursive caJI without making the problem smaller? [A] The program keeps running until you press Ctrl-C [B] The results ore nondeterministic [C] The run-time stack overflows, halting the program [D] The operating system detects the infinite recursion because of the "repeated state'

B .True

In a singly-linked list, there is no efficient way to insert a node before a given node in the middle or at the end of the list but we can insert a node after a given node or at the beginning of the list with time A complexity 0(1). A .False B .True

[A] False

In a singly-linked list, there is no efficient way to insert a node before a given node in the middle or at the end of the list, but we can insert a node after a given node or at the beginning of the list with time complexity 0(1). [A] False [B] True

B .Quicksort

Which of the following sorting algorithm is of dMde-and-conquer type'? A. All of the other choices B .Quicksort C. Insertion sort D .Bubble sort

A .for relatively permanent collections of data

Linked lists are best suited A. for relatively permanent collections of data B. for the size of the structure and the data in the structure are constantly changing

B. The tail node is necessary for inserting a node after the last node

Select the most correct statement A .The tail node is necessary for inserting a node before the last node B. The tail node is necessary for inserting a node after the last node C. In a linked list the tail node is introduced for performance purpose only D. in a linked list there must be the tail node

C.a linked list the tail node is introduced for performance purpose only

Select the most correct statement A .The tail node is necessary for inserting a node before the last node B. The tail node is necessary for inserting a node after the last node C.a linked list the tail node is introduced for performance purpose only D. In a linked list there must be the tail node

B Multi-programming.

Select the statement that is most correct Which of the following applications may use a queue? A Undo sequence in a text editor B Multi-programming. C. Keeping track of local vanables at run time. D. Store all variables in a program.

A .Auxiliary data structure for algorithms.

Select the statement that is most correct Which of the following applications may use a stack? A .Auxiliary data structure for algorithms. B .Multi-programming. C. Store a waiting list of printing jobs D. Store all variables in a program.

[A] Tail recursion is a special case of recursion in which the last|operation of the function, the tail call, is a recursive call.

Select the statement that is most correct [A] Tail recursion is a special case of recursion in which the last|operation of the function, the tail call, is a recursive call. [B] Tail recursion is a special case of recursion in which the first operation of the function, is a recursive call

[D] 0(n)

Select the statement that is most correct. Basically, the complexity of inserting new element before a given node in the middle of a singly linked lists is [A] 0(1) [B] 0(log n) [C] 0(nA2) [D] 0(n)

[C] Keeping track of local variables at run time.

Select the statement that is most correct. Which of the following applications may use a queue? [A] Store all variables in a program. [B] Store a waiting list of printing jobs. [C] Keeping track of local variables at run time. [D] Undo sequence in a text editor.

[C] pop

Which of the following stack operations could result in stack underflow? [A] isEmpty [A] push [C] pop [D] None of these

[D] All of the statements are incorrect.

Specify the correct statement about bucket addressing method for handling collision (select the best answer). (A) Bucket is a linked list which holds items in the hash table A bucket is a block of space which is large enough to store all colliding items] [C] Colliding elements in the same position in the hash table are placed on a bucket assosiated with that position. [D] All of the statements are incorrect.

[A] If the coalesced method is used for collision resolution, insertion and searching (and sometimes deletion) always take constant time. 0(1).

Specify the correct statement about hashing algorithm (Select the best answer). [A] If the coalesced method is used for collision resolution, insertion and searching (and sometimes deletion) always take constant time. 0(1). [B] If the chaining method is used for collision resolution, insertion and searching (and sometimes deletion) can take constant time 0(1) [C] No matter how many data items there are. insertion and searching (and sometimes deletion) always take constant time. 0(1). [D] The expected complexity of hashing algorithm is 0(1) However by the collision resolution. sometimes it may take 0(n)

[A] In chaining, some positions of the table is associated with a linked list or chain of structures whose info fields store keys or references to keys

Specily the most correct statement about chaining method for handling collision [A] In chaining, some positions of the table is associated with a linked list or chain of structures whose info fields store keys or references to keys [BJ In this method, the table can never overflow if free memory is available, because the linked list is extendible. [C] In chaining, the linked-list is used instead of array for a hash table [D] None of the others

D . Circuilar linked list is a linked list in which last node of the list points to the first node in the list

Specity the statement is most correct about a circular linked list A . Circuilar linked list a normal linhked list B . In circuilar linked-list it is required to define head and tail node C. Circular linked list is a normal doubly-linked list D . Circuilar linked list is a linked list in which last node of the list points to the first node in the list

A. True

Stale True or False "Recursion bears substantial overhead Each bme the program calls a method the system must assign space for all of the method's local variables and parameters This can consume considerable memory and requires extra time to manage the additional space" A .True B. False

[A] False

State T rue or False:"ln a binary search tree, ail the nodes that are lett descendants of node A have key values greater than Ac all the nodes that are A's nght descendants have key values less than (or equal to) A" [A] False [B] True

B. False

State True or False. Definition of a balanced tree: "A balanced tree is one whose root has many more left descendents than right descendants, or vice versa" A . True B. False

B. Binary search trees

The in-order traverse of tree will yield a sorted listing of elements of tree in A .Heaps B. Binary search trees C. Binary trees D .None of others

C. Adjacency list

Which graph representation is the best? Select one: A .djacency matrix B. Incidence matrix C. Adjacency list D. It depends on the problem

D.Undo swquence in text editor

Which of the following applications may use a stack A.Store all variables in a program B.Multi-programming C.Store a waiting list of printing jobs D.Undo swquence in text editor

[C] strongly connected

if every node u in G is adjacent to every other node v in G. a graph is said to be [A] isolated [B] complete [C] strongly connected [D] finite

B. True

|n a linked list the tail node is introduced for performance purpose only A False B. True


Ensembles d'études connexes

NUR313 Evolve: AQ 15 - Drugs to Manage Cholesterol and Triglyceride

View Set

Comparing Poetry: Poetic Devices

View Set

Chapter 5 - System Software: Operating Systems and Utility Programs

View Set