Your browser does not support JavaScript!

Data Structures and Algorithm Analysis

Showing 151-225 of 228 answers

The rearranging of pairs of elements which are out of order, until no such pairs remain.
  • Distribution
  • Selection
  • Exchange Correct
  • Insertion
The retrieval of items in a stack is ___________ operation.
  • pop Correct
The root of a tree is the node that has no ancestors.
  • TRUE Correct
The situation when in a linked list START=NULL is ____________________.
  • Houseful
  • Overflow
  • Underflow Correct
  • Saturated
The term push and pop is related to _____________
  • stacks Correct
The term push and pop is related to _____________.
  • lists
  • trees
  • array
  • stacks Correct
The term used to insert an element into stack.
  • pop
  • pump
  • push Correct
  • pull
The terms depth-first and breadth-first are two most common graph ______________ algorithm
  • traversal Correct
  • generating
  • pairing
  • sorting
The top element of a tree is called the
  • main
  • root Correct
  • initial
  • head
The tree ADT stores elements at the nodes of the tree.
  • True Correct
  • False
The upward movement of the newly inserted entry by means of swapping
  • up-heap swapping
  • up-heap sorting
  • up-heap traversing
  • up-heap bubbling Correct
the upward movement of the newly inserted entry by means of swaps is conventionally called __________________
  • up-heap transfer
  • up-heap adding
  • up-heap bubbling Correct
  • up-heap sorting
The value in the left child of a node (if it exists) in a binary search tree will be greater than the value in the node itself.
  • FALSE Correct
The value in the right child of a node (if it exists) in a binary search tree will be greater than the value in the node itself.
  • TRUE Correct
The worst case occurs in linear search algorithm when ________________.
  • Item is not in the array at all
  • Item is somewhere in the middle of the array
  • Item is the last element in the array or item is not there at all Correct
  • Item is the last element in the array
There are 3 auxiliary operations of a stack
  • True Correct
  • False
There are two types of linked lists; sorted lists and unsorted lists.
  • True Correct
  • False
This form of access is used to add and remove nodes from a queue.
  • None of these
  • LIFO, Last In First Out
  • FIFO, First In First Out Correct
  • Both of these
This form of access is used to add/remove nodes from a stack.
  • None of these
  • FIFO
  • LIFO Correct
  • Both of these
This indicates the end of the list.
  • Guard
  • Last pointer
  • End pointer
  • Sentinel Correct
This is a binary tree whose every node has either zero or two children.
  • data structure
  • extended binary tree Correct
  • complete binary tree
  • binary search tree
This is a linear list in which insertions and deletions are made to form either end of the structure.
  • Dequeue Correct
This is a terminal node in a binary tree.
  • Branch
  • Child
  • Root
  • Leaf Correct
This is the insertion operation in the stack.
  • top
  • pop
  • insert
  • push Correct
This is the term used to delete an element from the stack.
  • Push
  • Pump
  • Pull
  • Pop Correct
This is very useful in situation when data have to be stored and then retrieved in reverse order.
  • stack Correct
This may take place only when there is some minimum amount or no space left in free storage list.
  • Garbage collection Correct
This refers to a linear collection of data items.
  • List Correct
To delete an element, we get the data from the first node
  • True Correct
  • False
To make heap from range we used ____________
  • create()
  • makeheap()
  • make_heap() Correct
  • heap()
To represent a graph (in computer memory), we can use _______________________.
  • linear
  • adjacent angles
  • circle and bar
  • adjacency matrices Correct
To return the number of nodes of a Binary Tree ADT in C++ we use number()
  • True
  • False Correct
To take the topmost element from a stack
  • clear()
  • push()
  • top()
  • pop() Correct
Tree is usually visualized by connections between parents and children with straight lines.
  • True Correct
  • False
TREE[1]=NULL indicates tree is _________
  • Empty Correct
  • Overflow
  • Full
  • Underflow
Trees are ________ if they are similar and have the same contents at corresponding nodes.
  • duplicate
  • copies Correct
  • carbon copy
  • replica
Two nodes that are children of the same parents
  • siblings Correct
  • Roots
  • group
  • child node
Unlike an array, inserting an element on a particular node is not allowed in a linked list
  • True
  • False Correct
Unsorted lists are elements arranged according to some criteria.
  • True
  • False Correct
Using put() can perform
  • replace key-value pair Correct
  • iterator to first entry
  • find an entry with key
  • remove key-value pair
Value of first linked list index is _______________.
  • 0 Correct
  • 1
  • 2
  • -1
We can also define a binary tree in a recursive way
  • True Correct
  • False
We use a ______________, which corresponds to a heap where the largest element is at the top.
  • Comparator Correct
  • Pointer
  • Root
  • Sort
What are the basic operations performed on a stack?
  • Initialize, insert, delete, recover
  • Test, initialize, insert, save
  • Push, insertm initialize, test
  • Push and pop, initialize, and test Correct
What does the sequential representation of binary trees use?
  • Single linear array
  • Three dimensional arrays
  • Two dimensional arrays
  • Array with pointers Correct
What happens when you push a new node onto a stack?
  • The new node is placed at the front of the linked list Correct
  • No changes happen
  • The new node is placed at the back of the linked list
  • The new node is placed at the middle of the linked list
What is a queue?
  • FIFO Correct
What is a run list?
  • number of elements having same value
  • small batches of records from a file Correct
  • number of files in external storage
  • number of records
What is the 1st step in the algorithm for popping a data element?
  • Check if memory is full
  • Check if stack is empty Correct
  • Check the index of the element
  • Check the type of data structure
What is the minimum number of stacks needed to implement a queue?
  • 0
  • 2 Correct
  • 1
  • -1
What operation is used to check the number of objects in the queue?
  • size() Correct
  • length()
  • len()
  • objects()
When the largest element is at its root it's called
  • Priority queue
  • Max-heap Correct
  • Min-heap
  • Heap pointer
When using single inheritance, the inheritance relation between classes in a C++ program forms a tree.
  • True Correct
  • False
Which data structure allows deleting data elements from and inserting at rear?
  • queues Correct
Which data structure is suitable to represent the hierarchal relationship between elements?
  • Tree Correct
Which data structure is used in breadth first search of a graph to hold nodes?
  • Queue Correct
Which indicates pre-order traversal?
  • Root, Left sub-tree, Right sub-tree Correct
  • Right sub-tree, Left sub-tree and root
  • Right sub-tree, Root, Left sub-tree
  • Left sub-tree, Right sub-tree and root
Which is the pointer associated with the availability list?
  • TOP
  • AVAIL Correct
  • FIRST
  • REAR
Which is the pointer associated with the stack?
  • TOP Correct
  • FIRST
  • FRONT
  • REAR
Which of the following an application of a stack?
  • Finding factorial of a number
  • Solve an index into an array of slots
  • Base conversion Correct
  • Check if a number is a prime
Which of the following best describes the code apush(10);
  • The element will be added 10 times in the stack
  • The element 10 will be stored in the memory variable s
  • The element 10 will be added in the stack Correct
  • The element 10 will be delete in the stack
Which of the following best describes the code spop(10);
  • Element 10 will be added in the stack
  • Element will be added 10 in the stack
  • Element 10 will be deleted in the stack
  • An error will occur Correct
Which of the following data structure can't store the non-homogeneous data elements?
  • Arrays Correct
Which of the following data structure is non-linear type?
  • Graph Correct
Which of the following data structures is linear type?
  • Stack Correct
Which of the following is a pros of a sequential implementation of a stack?
  • Easy to implement Correct
  • Implementation can grow
  • Memory allocation can shrink according to runtime
  • Implementation is static
Which of the following is a two-way list?
  • List traversed in two directions Correct
Which of the following is an application of stack?
  • all of these Correct
Which of the following is non-linear data structure?
  • Trees Correct
Which of the following is not a limitation of binary search algorithm?
  • there must be a mechanism to access middle element directly
  • must use a sorted array
  • binary search algorithm is not efficient when the data elements more than 1500 Correct
  • requirement of sorted array is expensive when a lot of insertion and deletions are needed
Which of the following is not the part of ADT description?
  • None of these Correct
Which of the following is not the required condition for binary search algorithm?
  • The list must be sorted
  • There should be the direct access to the middle element in any sub list
  • Number values should only be present
  • There must be mechanism to delete and/or insert elements in list Correct
Which of the following is two way lists?
  • Linked list with header and trailer nodes
  • List traversed in two directions Correct
  • Grounded header list
  • Circular header list
Which of the following is/are the levels of implementation of data structure?
  • All of these Correct
Which of the following names does not relate to stacks?
  • Push down lists
  • Piles
  • LIFO lists
  • FIFO lists Correct
All courses