Das ist ein zeitlich begrenztes Quiz.
Du hast 1 Stunde 30 Minuten um die 50 Fragen in diesem Quiz zu beantworten.
Two main measures for the efficiency of an algorithm are
Processor and memory
Complexity and capacity
Time and space
Data and space
The complexity of Binary search algorithm is
O(n)
O(log n)
O(n^2)
O(n log n)
Which of the following data structure is not linear data structure?
Arrays
Linked lists
Both
None
The complexity of merge sort algorithm is
When determining the efficiency of algorithm the time factor is measured by
Counting microseconds
Counting the number of key operations
Counting the number of statements
Counting the kilobytes of algorithm
When determining the efficiency of algorithm, the space factor is measured by
Counting the maximum memory needed by the algorithm
Counting the minimum memory needed by the algorithm
Counting the average memory needed by the algorithm
Counting the maximum disk space needed by the algorithm
Which of the following is not the internal sort?
Insertion Sort
Bubble Sort
Merge Sort
Heap Sort
Given two sorted lists of size m and n respectively.The number of comparisons needed in the worst case by the merge sort algorithm will be?
mn
max(m,n)
min(m,n)
m+n-1
To represent hierarchical relationship between elements, Which data structure is suitable?
Tree
Graph
Queue
Stack
The postfix expression for * + a b - c d is?
ab + cd - *
ab cd + - *
ab + cd * -
ab + - cd *
A circular queue is implemented using an array of size 10. The array index starts with 0, front is 6, and rear is 9. The insertion of next element takes place at the array index.
0
7
9
10
Which type of traversal of binary search tree outputs the value in sorted order?
Pre-order
In-order
Post-order
If the given input array is sorted or nearly sorted, which of the following algorithm gives the best performance?
Insertion sort
Selection sort
Quick sort
Merge sort
The type of expression in which operator succeeds its operands is?
Infix Expression
prefix Expression
postfix Expression
The postfix form of the expression (A+ B)*(C*D- E)*F / G is?
AB+ CD*E - FG /**
AB + CD* E - F **G /
AB + CD* E - *F *G /
AB + CDE * - * F *G /
In linked list, pointer is pointing to the first element of the node then time require to insert element to second position is
O(1)
O(n-1)
Time require to find any element of the linked list is
None of these
If start is pointing to first node of the linked list then consider the following statement - start = start->next; current = start->next; what will be the value of address field of current ?
5571
5572
3225
2184
Consider the following linked list and following linked list representation - struct node { int data; struct node *next; }*start = NULL; what will be the value of following statement ? start->next->next->next->data
12
30
15
25
In Circular Linked List insertion of a node involves the modification of ____ links.
1
2
3
4
If in a linked list address of first node is 1020 then what will be the address of node at 5th position ?
1036
1028
1025
Which of the following operation is performed more efficiently in doubly linked list ?
Inserting a node at given position
Deleting a node at given position
Searching a node at given position
When new element is added in the middle of singly linked list then ________.
Only elements that appear after the new element need to be moved
Only elements that appear before the new element need to be moved
No need to move element
Only elements that appear after the new element and before need to be moved
Consider linked list is used to implement the Stack then which of the following node is considered as Top of the Stack ?
Any Node
Last Node
First Node
Middle Node
Consider the following linked list representation - struct node { int data; struct node *next; }start = NULL;
struct node *new_node; Which of the following statement is used to create a node ?
new_node=(struct node *)malloc((struct node));
new_node=(struct *)malloc(sizeof(struct node));
new_node=(struct node)malloc(sizeof(struct node));
new_node=(struct node *)malloc(sizeof(struct node));
Which of the following data structure is linear type?
Strings
Lists
Queues
All of above
In a Heap tree
Values in a node is greater than every value in left sub tree and smaller than right sub tree
Values in a node is greater than every value in children of it
Both of above conditions applies
None of above conditions applies
The order of an algorithm that finds whether a given Boolean function of 'n' variables, produces a 1 is
linear
constant
exponential
logarithmic
A list integers is read in, one at a time, and a binary search tree is constructed. Next the tree is traversed would result in a printout which duplicates the original order of the list of integers?
Inorder
Preorder
Postorder
A characteristic of the data that binary search uses but the linear search ignores, is
Maximum value in the list
Minimum value in list
Length of the list
Order of the list
Queue can be used to implement
recursion
radix sort
quick sort
depth first search
Which of the following sorting methods sorts a given set of items that is already in sorted order or in reverse sorted order with equal speed?
Heap sort
Suppose DATA array contains 1000000 elements. Using the binary search algorithm, one requires only about n comparisons to find the location of an item in the DATA array, then n is
20
38
45
A sort which iteratively passes through a list to exchange the first element with any element less than it and then repeats with a new first element is called
heap sort
selection sort
insertion sort
The maximum number of comparisons needed to sort 7 items using radix sort is (assume each item is 4 digit decimal number)
23
110
280
450
The postfix equivalent of the prefix * + a b - c d is
ab+cd-*
A complete binary tree with the property that the value at each node is at least as large as the values at its children is called
Heap
Binary Tree
Binary search tree
Completely balanced tree
A full binary tree with n leaves contains
n nodes
log2n nodes
2n+1 nodes
2n - 1 nodes
Traversing a binary tree first root and then left and right subtrees called _______traversal.
inorder
preorder
postorder
none of these
The number of nodes in a complete binary tree of level 5 is
21
63
77
Number of possible binary trees with 3 nodes is
5
11
A binary tree is generated by inserting in order the following integers: 50, 15, 62, 5, 20,58, 91, 3,8,37, 60, 24 The number of nodes in the left of the root respectively is
(3,6)
(4,7)
(6,3)
(7,4)
The depth of a complete binary tree with n nodes is (log is to be base two)
log(n)
log(n) + 1
log (n-1) + 1
log (n+1)-1
Which of the following are valid characters for a numeric literal constant?
a comma ( , )
a dollar sign ($)
a percent sign (%)
None of the above
A default catch block catches
all thrown objects
no thrown objects
any thrown object that has not been caught by an earlier catch block
all thrown objects that have been caught by an earlier catch block
When the compiler cannot differentiate between two overloaded constructors, they are called
overloaded
destructed
ambiguous
dubious
When you pass a variable _____, C++ passes only the contents of the variable to the receiving function
by reference
by value
globally
locally
Paying attention to the important properties while ignoring inessential details is known as________
selectiveness
polymorphism
abstraction
summarizing
When you omit parameters from a function call, values can be provided by
formal parameters
reference parameters
overloaded parameters
default parameters
The items listed in the function header are called _____
actual arguments
passed parameters
sent arguments