JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD

JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD B.Tech IV DATA STRUCTURES Previous Question Paper (February/March - 2022 - R18)

B.Tech | IV | I | R18 | February/March - 2022

Answer PaperPaper Code: 157EKMaximum Marks: 75Time: 3 Hours

Answer any Five Questions. All Questions Carry Equal Marks.

Main

115 marks
a

What is a linked list? Explain insertion, deletion and search operation on singly linked list with an example.

12 marks

Answer

A singly linked list is a linear data structure where elements, called nodes, are not stored in contiguous memory locations. Each node consists of two parts: a data field and a pointer (or reference) to the next node in the sequence. The last node contains a null pointer, indicating the end of the list.

Operations on a singly linked list:

  1. Insertion: To insert a node, we update the pointers. For insertion at the beginning, the new node's next pointer is set to the current head, and the head is updated to the new node. For insertion after a specific node, the new node's next pointer is set to the current node's next, and the current node's next is updated to the new node.
  2. Deletion: To delete a node, we traverse the list to find the node preceding the one to be deleted. We then update the preceding node's next pointer to skip the target node, effectively removing it from the chain.
  3. Search: Searching involves traversing the list starting from the head node. We compare the data in each node with the target value. If a match is found, the node is returned; if the end of the list is reached without a match, the value is not present.

Example: Consider a list 10 -> 20 -> 30. To insert 15 after 10, we create a node with value 15, set its next pointer to 20, and update the next pointer of the node containing 10 to point to the new node 15, resulting in 10 -> 15 -> 20 -> 30.

b

Write the applications of stack.

3 marks

Answer

Stacks are used in various computing applications due to their Last-In-First-Out (LIFO) property:

  • Expression Evaluation: Used for parsing and evaluating mathematical expressions, such as converting infix to postfix notation.
  • Function Call Management: The system stack stores activation records, local variables, and return addresses during recursive function calls.
  • Undo Mechanisms: Editors and browsers use stacks to keep track of operations or visited pages to enable 'undo' or 'back' functionality.
  • Syntax Checking: Compilers use stacks to verify balanced parentheses and delimiters in source code.
215 marks
a

What is a stack? Explain how to implement stack using linked list.

12 marks

Answer

Sign in to view the complete answer paper.

b

What is ADT?

3 marks

Answer

Sign in to view the complete answer paper.

3

What is hashing? Explain various hash functions.

15 marks

Answer

Sign in to view the complete answer paper.

4

What is a skip list? Explain insertion, deletion and search operation of skip list with an example.

15 marks

Answer

Sign in to view the complete answer paper.

5

What are AVL trees? Explain insertion, deletion and search operations of AVL tree with an example.

15 marks

Answer

Sign in to view the complete answer paper.

6

Write an algorithm of operations of Red-Black tree.

15 marks

Answer

Sign in to view the complete answer paper.

7

What is heap sort? Explain with example and also write an algorithm of heap sort.

15 marks

Answer

Sign in to view the complete answer paper.

815 marks
a

Explain Boyer-Moore algorithm.

10 marks

Answer

Sign in to view the complete answer paper.

b

Explain about compressed Trie.

5 marks

Answer

Sign in to view the complete answer paper.

About this paper

This page contains the question paper of DATA STRUCTURES from JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD for B.Tech CE IV I, February/March - 2022, R18.

For the solved question paper with answers, switch to the Answer Paper tab.

Other papers in DATA STRUCTURES

Loading Question Papers

Fetching data from database...