Explore topic-wise MCQs in Computer Science Engineering (CSE).

This section includes 60 Mcqs, each offering curated multiple-choice questions to sharpen your Computer Science Engineering (CSE) knowledge and support exam preparation. Choose a topic below to get started.

1.

In linked list each node contain minimum of two fields. One field is data field to store the data second field is?

A. Pointer to character
B. Pointer to integer
C. Pointer to node
D. Node
Answer» D. Node
2.

If we implement heap as min-heap, deleting root node (value 1)from the heap. What would be the value of root node after second iteration if leaf node (value 100) is chosen to replace the root at start.

A. 2
B. 100
C. 17
D. none
Answer» B. 100
3.

What would be the asymptotic time complexity to add a node at the end of singly linked list, if the pointer is initially pointing to the head of the list?

A. O(1)
B. O(n)
C. (n)
D. (1)
Answer» D. (1)
4.

A _________is a linked list which always contains a special node called the header node, at the beginning of the list.

A. Doubly Linked List.
B. Circular List.
C. Header Linked List.
D. None.
Answer» D. None.
5.

An array consists of n elements. We want to create a heap using the elements. The time complexity of building a heap will be in order of

A. O(n*n*logn)
B. O(n*logn)
C. O(n*n)
D. O(n *logn *logn)
Answer» C. O(n*n)
6.

For which of the following combinations of the degrees of vertices would the connected graph be eulerian?

A. 1,2,3
B. 2,3,4
C. 2,4,5
D. 1,3,5
Answer» B. 2,3,4
7.

If a simple graph G, contains n vertices and m edges, the number of edges in the Graph G'(Complement of G) is

A. (n*n-n-2*m)/2
B. (n*n+n+2*m)/2
C. (n*n-n-2*m)/2
D. (n*n-n+2*m)/2
Answer» B. (n*n+n+2*m)/2
8.

Given a plane graph, G having 2 connected component, having 6 vertices, 7 edges and 4 regions. What will be the number of connected components?

A. 1
B. 2
C. 3
D. 4
Answer» C. 3
9.

The number of possible undirected graphs which may have self loops but no multiple edges and have n vertices is

A. 2((n*(n-1))/2)
B. 2((n*(n+1))/2)
C. 2((n-1)*(n-1))/2)
D. 2((n*n)/2)
Answer» E.
10.

For a given graph G having v vertices and e edges which is connected and has no cycles, which of the following statements is true?

A. v=e
B. v = e+1
C. v + 1 = e
D. v = e-1
Answer» C. v + 1 = e
11.

What would the time complexity to check if an undirected graph with V vertices and E edges is Bipartite or not given its adjacency matrix?

A. O(E*E)
B. O(V*V)
C. O(E)
D. O(V)
Answer» C. O(E)
12.

What is the result of the following operation? Top (Push (S, X))

A. X
B. X+S
C. S
D. none
Answer» B. X+S
13.

New data are to be inserted into a data structure, but there is no available space; this situation is usually called__________.

A. Underflow.
B. Overflow.
C. Houseful.
D. Saturated.
Answer» C. Houseful.
14.

The given array is arr = {3,4,5,2,1}. The number of iterations in bubble sort and selection sort respectively are,

A. 5 and 4
B. 4 and 5
C. 2 and 4
D. 2 and 5
Answer» B. 4 and 5
15.

The given array is arr = {1,2,3,4,5}. (bubble sort is implemented with a flag variable)The number of iterations in selection sort and bubble sort respectively are,

A. 5 and 4
B. 1 and 4
C. 0 and 4
D. 4 and 1
Answer» E.
16.

Statement 1: Shell sort is a stable sorting algorithm. Statement 2: Shell sort is an in-place sorting algorithm.

A. Both statements are true
B. Statement 2 is true but statement 1 is false
C. Statement 2 is false but statement 1 is true
D. none
Answer» C. Statement 2 is false but statement 1 is true
17.

Consider the following data. The pre order traversal of a binary tree is A, B, E, C, D. The in order traversal of the same binary tree is B, E, A, D, C. The level order sequence for the binary tree is

A. A, C, D, B, E
B. A, B, C, D, E
C. A, B, C, E, D
D. D, B, E, A, C
Answer» C. A, B, C, E, D
18.

When converting binary tree into extended binary tree, all the original nodes in binary tree are___________.

A. internal nodes on extended tree.
B. external nodes on extended tree.
C. vanished on extended tree.
D. post order traversal.
Answer» B. external nodes on extended tree.
19.

The pre-order and in-order are traversals of a binary tree are T M L N P O Q and L M N T O P Q. Which of following is post-order traversal of the tree?

A. L N M O Q P T
B. N M O P O L T
C. L M N O P Q T
D. O P L M N Q T
Answer» B. N M O P O L T
20.

An AVL tree is a self balancing binary search tree, in which the heights of the two child sub trees of any node differ by

A. At least one
B. At most one
C. Two
D. At most two
Answer» C. Two
21.

The binary tree sort implemented using a self balancing binary search tree takes time is worst case.

A. O(n log n)
B. O(n)
C. O(n2)
D. O(log n)
Answer» B. O(n)
22.

The maximum number of nodes in a tree for which post-order and pre-order traversals may be equal is

A. 3
B. 1
C. 2
D. any number
Answer» C. 2
23.

The number of swapping needed to sort numbers 8,22,7,9,31,19,5,13 in ascending order using bubble sort is ?

A. 11
B. 12
C. 13
D. 14
Answer» E.
24.

If the elements A, B, C and D are placed in a stack and are deleted one at a time, what is the order of removal?

A. ABCD
B. DCBA
C. DCAB
D. ABDC
Answer» C. DCAB
25.

The given array is arr = {1, 2, 4, 3}. Bubble sort is used to sort the array elements. How many iterations will be done to sort the array?

A. 4
B. 2
C. 1
D. 0
Answer» B. 2
26.

Given an array arr = {45,77,89,90,94,99,100} and key = 99; what are the mid values(corresponding array elements) in the first and second levels of recursion?

A. 90 and 99
B. 90 and 94
C. 89 and 99
D. 89 and 94
Answer» B. 90 and 94
27.

Selection sort and quick sort both fall into the same category of sorting algorithms._________ is that category.

A. O(n log n) sorts.
B. Divide-and-conquer sorts.
C. Interchange sorts.
D. Average time is quadratic.
Answer» D. Average time is quadratic.
28.

The given array is arr = {1,2,4,3}. Bubble sort is used to sort the array elements. How many iterations will be done to sort the array with improvised version?

A. 4
B. 2
C. 1
D. 0
Answer» C. 1
29.

The number of interchanges required to sort 5, 1, 6, 2 4 in ascending order using Bubble Sort is ____________.

A. 6
B. 5
C. 7
D. 8
Answer» C. 7
30.

Given an empty AVL tree, how would you construct AVL tree when a set of numbers are given without performing any rotations?

A. just build the tree with the given input
B. find the median of the set of elements given, make it as root and construct the tree
C. use trial and error
D. use dynamic programming to build the tree
Answer» C. use trial and error
31.

What would be the asymptotic time complexity to insert an element at the front of the linked list (head is known)?

A. O(1)
B. O(n)
C. O(n2)
D. O(n3)
Answer» B. O(n)
32.

Each data item in a record may be a group item composed of sub-items; those items which are indecomposable are called ________

A. elementary items.
B. atoms.
C. scalars.
D. structure.
Answer» E.
33.

The average number of key comparisons done in a successful sequential search in a list of length n is___________.

A. log n
B. n-1/2.
C. n/2.
D. n+1/2.
Answer» E.
34.

The average number of key comparisons done in a successful sequential search in a list of length n is ____________.

A. log n.
B. n-1/2.
C. n/2.
D. n+1/2.
Answer» E.
35.

A linear list of elements in which deletion can be done from one end (front) and insertion can take place only at the other end (rear) is known as a ?

A. Queue
B. Stack
C. Tree
D. Linked list
Answer» B. Stack
36.

Identify the data structure which allows deletions at both ends of the list but insertion at only one end___________.

A. Input-restricted dequeue.
B. Output-restricted dequeue.
C. Priority queues.
D. Data structure.
Answer» B. Output-restricted dequeue.
37.

A _______________ is a reference to a memory location, which is used to store data that is described in a data type.

A. element.
B. variable.
C. pointer.
D. memory.
Answer» C. pointer.
38.

In which of the following self balancing binary search tree the recently accessed element can be accessed quickly?

A. AVL tree
B. AA tree
C. Splay tree
D. Red Black tree
Answer» D. Red Black tree
39.

The initial configuration of the queue is a,b,c,d (a is the front end). To get the configuration d,c,b,a one needs a minimum of ?

A. 2 deletions and 3 additions
B. 3 additions and 2 deletions
C. 3 deletions and 3 additions
D. 3 deletions and 4 additions
Answer» D. 3 deletions and 4 additions
40.

If binary trees are represented in arrays, what formula can be used to locate a left child, if the node has an index i?

A. 2i+1
B. 2i+2
C. 2i
D. 4i
Answer» B. 2i+2
41.

Data structure which is capable of expressing more complex relationship than that of physical adjacency is called______________.

A. linear data structure.
B. linked list.
C. non linear data Structure
D. data structure.
Answer» D. data structure.
42.

A data structure in which elements can be inserted or deleted at/from both the ends but not in the middle is?

A. Queue
B. Circular queue
C. Dequeue
D. Priority queue
Answer» D. Priority queue
43.

If the elements A , B , C and D are placed in a queue and are deleted one at a time, in what order will they be removed?

A. ABCD
B. DCBA
C. DCAB
D. ABDC
Answer» B. DCBA
44.

Important part of any compiler is the construction and maintenances of a dictionary, this types of dictionary are called______________.

A. symbol table.
B. index table.
C. grammar table.
D. pointer table.
Answer» B. index table.
45.

What is the space complexity of the in-order traversal in the recursive fashion? (d is the tree depth and n is the number of nodes)

A. O(1)
B. O(nlogd)
C. O(logd)
D. O(d)
Answer» E.
46.

What is the space complexity of the post-order traversal in the recursive fashion? (d is the tree depth and n is the number of nodes)

A. O(1)
B. O(nlogd)
C. O(logd)
D. O(d)
Answer» E.
47.

What is the value of the sum of the minimum in-degree and maximum out-degree of an Directed Acyclic Graph?

A. Depends on a Graph
B. Will always be zero
C. Will always be greater than zero
D. May be zero or greater than zero
Answer» C. Will always be greater than zero
48.

The OS of a computer may periodically collect all the deleted space onto the free storage list. This technique is called______________.

A. buffering.
B. garbage collection.
C. deal location.
D. buffer collection.
Answer» C. deal location.
49.

How many orders of traversal are applicable to a binary tree (In General)? 3

A. 1
B. 4
C. 2
D. 3
Answer» E.
50.

What data structure would you mostly likely see in a non recursive implementation of a recursive algorithm?

A. Linked List
B. Stack
C. Queue
D. Tree
Answer» C. Queue