Which of The Following Is An External Sorting?: Merge Sort Tree Sort Bubble Sort Insertion Sort

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

Breadth First Search is equivalent to which of the traversal in the Binary Trees?

a) Pre-order Traversal b) Post-order Traversal

c) Level-order Traversal d) In-order Traversal

A technique for direct search is

(a) Binary Search (b) Linear Search

(c) Tree Search (d) Hashing

Compact representation of the suffix trie for a string X of size n from an alphabet of size
d

(a) Uses O(n) space (b) Can be constructed in O(n) time

(c) Supports arbitrary pattern matching queries in X in O(dm) time, where m is the size of the
pattern

(d) All of the above.

Heap sort uses ________________data structure

(a) Binary Search Tree

(b) Stack

(c) Priority Queue

(d) Queue

Which of the following is an external sorting?

(a) Merge Sort (b) Tree Sort

(c) Bubble Sort (d) Insertion Sort

Pivot element can be used in _________sorting technique

(a) Bubble Sort (b) Merge Sort

(c) Quick Sort (d) Heap Sort

In bad match table of Boyer Moore algorithm, the suffix value for the characters of
pattern is calculated using
(a) max(1, len(P), index(ch))

(b) max(1, len(P)-index(ch)-1)

(c) len(P)- index(ch)

(d) max(1,len(P)-index(ch))

The number of elements in the adjacency matrix of a graph having 7 vertices is

a) 7 b) 14

c) 36 d) 49

What is the number of edges present in a complete graph having n vertices?


a) (n*(n+1))/2
b) (n*(n-1))/2
c) n

d) Information given is insufficient

In the ____________ traversal we process all of a vertex’s descendants before we move to


an adjacent vertex

A __________is a graph that has weights of costs associated with its edges.

A ________ is a special Tree-based data structure in which the tree is a complete binary tree.?

A graph with every edge is directed edge is called as


___________________________________________

The sorting algorithm operates on the divide and conquer principle is


__________________________

_______________________________ Data structure used in standard implementation of Death First


Search.

A compressed trie is obtained from____________________________________________________trie.

The brute-force pattern matching algorithm compares the pattern P with the text T for each

possible shift of P relative to T, until either

___________________________________________________.

LPS stands for_________________________________________________________________________.

KMP algorithm runs in__________________________________________________________ optimal


time.
What are splay trees?

a) self adjusting binary search trees


b) self adjusting binary trees
c) a tree with strings

d) a tree with probability distributions

In a max-heap, element with the greatest key is always in the which node?

a) Leaf node

b) First node of left sub tree


c) root node

d) First node of right sub tree

A graph is a collection of nodes, called ………. And line segments called arcs or ……….. that
connect pair of nodes.

You might also like