Your browser does not support JavaScript!

Data Structures and Algorithm Analysis

Showing 1-75 of 228 answers

___________ sorting algorithm is frequently used when n is small, where n is the total number of elements.
  • Heap
  • Quick
  • Bubble
  • Insertion Correct
_____________ order is the best possible for array sorting algorithm which sorts n item.
  • O(n+logn) Correct
  • O(n logn)
  • O(n2)
  • O(logn)
____________________ is not the component of data structure.
  • None of these Correct
____________________ level is where the model becomes compatible executable code.
  • Implementation level Correct
"The elements are removal from a stack in _________ order. "
  • Reverse Correct
"This form of access is used to add/remove nodes from a stack. "
  • Dequeue Correct
A _______________ is a data structure that organizes data similar to a line in the supermarket, where the first one in line is the first one out.
  • Queue linked list Correct
A bank simulation of its teller operation to see how waiting times would be affected by adding another teller.
  • Queue Correct
A binary search cannot be applied to a tree.
  • FALSE Correct
A binary search tree is another name for a binary tree.
  • FALSE Correct
A binary search tree whose left subtree and right subtree differ in height by at most 1 unit is called ____________________.
  • AVL tree Correct
A binary tree is a tree in which each node can have zero, one, or two children.
  • TRUE Correct
A Binary Tree that stores a collection of elementswith their associated keys at its nodes.
  • Hash map
  • Complete Binary Tree
  • Priority Queue
  • Heap Correct
A connected graph T without any cycles is called ________________.
  • no cycle graph
  • circular graph
  • free graph Correct
  • non-cycle graph
A connected graph T without any cycles is called a ____________.
  • Free tree
  • all of these Correct
  • A tree
  • A tree graph
A Data Structure that can be accessed only at one of its ends for storing and retrieving data.
  • Arrays
  • Stacks Correct
  • Queues
  • Linked Lists
A dictionary of words used by a spelling checker to be built and maintained.
  • Binary search tree Correct
A hierarchical data structure
  • Trees Correct
  • Stacks
  • Lists
  • Queues
A leaf in a tree is a node with no children.
  • TRUE Correct
A linear list in which the last node points to the first node.
  • circular linked list Correct
  • none of these
  • doubly linked list
  • singly linked list
A linear list in which the pointer points only to the successive node.
  • singly linked list Correct
A list may be linear or nonlinear, depending on its implementation.
  • FALSE Correct
A NULL pointer does not always mean empty.
  • True
  • False Correct
A pointer variable which contains the location at the top element of the stack.
  • Top Correct
A program keeping track of where canned goods are located on a shelf.
  • Stack Correct
A program to keep track of patients as they check into a medical clinic, assigning patients to doctors on a first-come, first-served basis.
  • Queue Correct
A program to keep track of the soccer teams in a city tournament
  • Tree Correct
A program to maintain the routes in an airline.
  • Graph Correct
A program to receive data that is to be saved and processed in the reverse order.
  • Stack Correct
A queue abstract data structure is a list of collection with the restriction that insertion and deletion can perform at the same end
  • True
  • False Correct
A queue applies FIFO ordering
  • True Correct
  • False
A queue displays LIFO behavior.
  • FALSE Correct
A simple sorting algorithm that works the way we sort playing cards in our hands.
  • Searching
  • Deletion
  • Traversal
  • Insertion Correct
A stack and a queue are different names for the same ADT.
  • FALSE Correct
A stack displays FIFO behavior.
  • FALSE Correct
A structure that is showing some descendants is also a tree.
  • True Correct
  • False
A tree can not be empty with no nodes
  • True
  • False Correct
A tree is an example of a linear data structure
  • True
  • False Correct
A word processor to have a PF key that causes the preceding command to be redisplayed. Every time the PF key is pressed, the program is to show the command that preceded the one currently displayed
  • Stack Correct
Accessing a linked list from head node until the last node of the list is
  • Updating
  • Inserting
  • Traversing Correct
  • Searching
after creating a Max Heap we then swap the first node to the last node and delete ________________.
  • both nodes
  • last node Correct
  • all nodes
  • first node
Algorithm that finds the location of the smallest element in the unsorted portion of the list and moves it to the top of the unsorted portion of the list
  • Insertion Sort
  • Selection Sort Correct
  • Merge Sort
  • Bubble Sort
Algorithms that use a list must know whether the list is array based or linked.
  • FALSE Correct
An Abstract Data Type that stores elements hierarchically.
  • Stacks
  • Trees Correct
  • Root
  • Linked Lists
An electronic address book ordered by name
  • Binary search tree Correct
Another name for directed graph.
  • Diregraph
  • Dir-graph
  • Direct graph
  • Digraph Correct
Any node of a tree that has child node
  • internal nodes Correct
  • prime nodes
  • external nodes
  • head nodes
Any node that does not have child nodes are also called
  • empty nodes
  • internal nodes
  • leaf nodes Correct
  • single nodes
Binary search algorithm cannot be applied to _______________.
  • sorted linear array
  • sorted linked list
  • sorted binary trees
  • pointer array Correct
Binary search trees are ordered.
  • TRUE Correct
C++ Stack Operation to push the element on the top of the stack
  • pushEL()
  • top(el)
  • topEL()
  • push(el) Correct
Clr() is used to clear the stack.
  • True
  • False Correct
Compare to Queue, In Heap you can __________ the whole collection.
  • Retrieve
  • Access Correct
  • Return
  • Add
Deleting an element is only allowed in a singly linked list
  • True
  • False Correct
Deletion operation is done using __________ in a queue.
  • front Correct
dequeue() takes the last element from the queue.
  • True
  • False Correct
Describe the following code
  • None of the choices
  • A function that will insert a node in an arbitrary position Correct
  • Identifies the current and previous data element in the linked list
  • Traverse a linked list
Doubly linked list should have maximum size to managed the last node of the list
  • True
  • False Correct
Each node in a linked list must contain at least ___________________.
  • Three fields
  • Five fields
  • Two fields Correct
  • Four fields
Each node in singly linked list has _______ fields.
  • 4
  • 2 Correct
  • 1
  • 3
Enqueue is also called push
  • True Correct
  • False
Every node (except the last node) contains the _____________________?
  • element of the next node
  • link of the next node
  • address of the next node Correct
  • data of the next node
Every node N in a binary tree T except the root has a unique parent called the ________ of N.
  • Precursor
  • Antecedents
  • Forerunner
  • Predecessor Correct
Explode is used to delete an element from the stack
  • True
  • False Correct
Given an empty array with 5 in size and the following operations have been executedEnqueue(8)Enqueue(1)Enqueue(7)Enqueue(2)Enqueue(6)What will happen if an attempt to execute enqueue(3)?
  • The element will be added into the rear of the array
  • The element will be added in front of the array
  • None of the choices
  • A queue overflow error will occur Correct
Given the code, the program will ____________
  • Delete a node
  • Create a node Correct
  • Store same value to head and tail of the linked list
  • Set null value to the next node
Given the following code which contains THREE pushes and ONE POP, what will be output of the stack?stack<int> s;spush(1);spush(2);spush(3);cout<<spop;
  • 3
  • 123
  • 1233
  • 12 Correct
Given the stack with elements AMAOED, D being the top of the stack What element(s) will remain in the stack after applying pop() four times?
  • AMAO
  • AM Correct
  • ED
  • DEOA
Graph G is _____________ if for any pair u, v of nodes in G, there is a path from u to v or path from v to u.
  • Directly connected
  • Widely connected
  • Literally connected
  • Unliterally connected Correct
Graphs consists of the following :
  • vertices and edges Correct
  • none of the choices
  • headers and tails
  • pointers and arrays
Herder node is used as sentinel in __________________.
  • Binary tree Correct
Identify the data structure which allows deletions at both ends of the list but insertion at only one end.
  • Input restricted dequeue Correct
If a graph has a directional flow, the graph is defined to be ______________
  • connected
  • directed Correct
  • not connected
  • undirected
If a linked list is unordered, we can insert a new item at either the end or the beginning.
  • True Correct
  • False
If Priority queues can be implemented by Heaps, Heaps can be implemented by ___________?
  • Array Correct
  • Queues
  • Lists
  • Stacks
All courses