LawMint Sign in

Karnataka SET (KSET) Data Structures and Algorithms Previous Year Questions

Try the preview and open any solution for a worked explanation.

Karnataka SET (KSET) practice pack

The practice pack for Karnataka SET (KSET) is coming soon to LawMint.

Question 1

Assume the following priorities in evaluating an expression (1) parentheses (2) exponentiation (3) division and multiplication (4) addition and subtraction (5) assignment. What is the equivalent post-fix expression of the infix expression a = b/c ^ d * (e + f) – g/h.

Select one answer

Question 2

Which of the following are true about a circular queue with array size being n (numbered from 0 to n – 1), 'f' being the index of the first element and 'r' the index of the next insertion slot, with one array slot reserved to distinguish full and empty states?
a. The Queue is full if (r + 1) mod n == f.
b. The maximum number of elements that can be stored in a Queue is n – 1
c. This is an efficient algorithm compared to linear Queue
d. This is a non-linear data structure.

Select one answer

Question 3

Which one of the following are true about Huffman Algorithm?
a. It is Dynamic Programming Algorithm
b. It is a Greedy Algorithm
c. Used for text compression
d. Used for image compression

Select one answer

Question 4

The cost of the Minimum spanning tree using Prim's Algorithm for the following graph, ignoring arrow directions, is

Weighted graph: 2 to 1 weight 2; 1 to 3 weight 3; 3 to 2 weight 2; 2 to 4 weight 2; 4 to 3 weight 3; 3 to 5 weight 4; 5 to 4 weight 1; 4 to 6 weight 3; 5 to 6 weight 4.
Select one answer

Question 5

Given the inorder of a tree as e, b, f, c, g, h, d and pre-order of the tree as c, b, e, f, d, g, h, the post-order of the tree is

Select one answer

Question 6

Which one among the following is true about a binary tree?
a. The indegree of the root is zero
b. The outdegree of a leaf node is zero
c. The maximum number of elements a tree with depth d (counting the root level as 1) can have is 2d– 1
d. Is a subset of a graph

Select one answer

Question 7

The complexity of brute force algorithm to find all the substrings in a given string of 'm' characters and a substring of length 'n' (where m >> n) is

Select one answer

Question 8

A model which uses the previously computed values for further computation is called

Select one answer

Question 9

Match the following:

List-IList-II
a. Prim's algorithm(i) Dynamic Programming
b. Queen's problem(ii) Divide and conquer
c. Quick sort(iii) Greedy Algorithm
d. Binomial coefficient(iv) Backtracking
Select one answer

Question 10

In a multiprocessor environment, assume that there are n = 8 elements, and the number of processors given N = 4. If we use the Binary tree model to find the greatest of 'n' elements using parallel processing, then the time taken to find the greatest of 'n' elements is __________ (Assume the communication cost to be 0)

Select one answer

Continue practising

The practice pack for Karnataka SET (KSET) is coming soon to LawMint.

Karnataka SET (KSET) practice pack

The practice pack for Karnataka SET (KSET) is coming soon to LawMint.