0% found this document useful (0 votes)
16 views2 pages

DS Assignment I

Uploaded by

muttagisiddappa4
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views2 pages

DS Assignment I

Uploaded by

muttagisiddappa4
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

DS Assignment I Date: 17-11-24

1. Define Data structures. Classify the data structures.


2. Convert the infix expression a/b – c+ d * e – a * c into postfix
expression. Write a function to evaluate that postfix expression and
trace that for given data a=6, b=3, c = 1, d = 2, e =4.
3. What is self-referential structures? Explain with example.
4. Define the union. How it is different from the structure.
5. Explain dynamic memory allocation with examples.
6. Explain the sparse matrix representation.
7. Explain the representation of multidimensional arrays.
8. What is a polynomial? Apply appropriate data structures to represent
two polynomials and write a function to add the polynomials.
9. Write a functions to perform following operations on strings without
using built in functions i) Length of string ii) Concatenation of string iii)
Substring.

10. Define Queue. Implement the operations of queue using arrays.


11. Give the disadvantage of ordinary queue and how it is solved in circular queue.
Explain with suitable example how you would implement circular queue using
dynamically allocated array.
12. Define priority queue. What are the types of priority queue? Write program to
implement priority queue.

Assignment II Date: 17-12-24


1. Define linked list. Write the representation of linked lists in memory.
2. How the nodes are represented using C. Explain linked list operation with examples.
3. Apply linked list to represent two polynomials and write a function to add the
polynomials using linked list
4. Explain a linked list representation for sparse matrices.
5. Write the following functions for singly linked list: i) Reverse the list ii) Concatenate
two lists
6. With an example, explain the different types of representation of tree.
7. Define a binary tree. With example show array and linked representation of binary tree.
8. Write an expression tree for an expression
i) A / B + C * D + E ii) ((6+(3-2)*5)^2+3)
9. Write the C-routines to traverse the given tree using
i) Inorder ii) Pre-order iii) Post-order

10. Construct a binary search tree for the inputs 22, 14, 18, 50, 9, 15, 7, 6, 12, 32, 25
11. Mention different types of binary trees and explain briefly.
12. What is threaded binary tree? Write the rules to construct the threads

You might also like