0% found this document useful (0 votes)
9 views1 page

Assignment2_DS_2021

Uploaded by

Saksham Singhal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views1 page

Assignment2_DS_2021

Uploaded by

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

JSS ACADEMY OF TECHNICAL EDUCATION, NOIDA

Department of Information Technology


BTech III SEM IT
Data Structures (BCS-301)
Assignment 2
CO2 (C203.2): Explain the concept of abstract data types and basic data organization schemes such
as arrays and linked lists; and write algorithms for their operations and applications.

1. Define Abstract data type with a suitable example.


2. Calculate address of X [3,2] in 2-D array X [1:4, 1:5] stored as column major order. Assume
base address to be 1000 and that each element required 4 words of storage.
3. Obtain addressing formula for an element in three-dimensional array represented in row major
and column major order. Also give the addressing formula for n-dimensional array represented
in row major and column major order.
4. Suppose multidimensional arrays P and Q are declared as P(-2:2, 2:22) and Q(1:8,-5:5,-10:5)
stored in column major order
a. Find the length of each dimension of P and Q
b. The number of elements in P and Q
c. Assuming base address (Q) = 400, W = 4. Find the effective indices E1 , E2 , E3 and
address of the element Q[3,3,3]
5. A m × n matrix is said to have a saddle point if some entry a [i] [j] is the smallest value in row i
and largest value in column J. Write C program that determines the saddle point if one exists.
6. Define a sparse matrix. Explain the upper triangular and lower triangular sparse matrices.
Suggest a space efficient representation for space matrices and determine the location
determination formulas for it.
7. Differentiate between Array and Dynamic implementation of Linked list.
8. Write a psuedocode to delete the last element of a linked list.
9. Which sorting algorithm is easily adaptable to singly linked lists? Explain your answer.
10. Write an algorithm that reverses order of all the elements in a singly linked list.
11. Write a 'C' function that creates a new linear linked list by selecting alternate elements of a
given linear linked list.
12. Discuss the representation of polynomial of single variable using linked list. Write 'C' functions
to add two such polynomials represented by linked list.
13. Write a function in C to free all nodes in circular list using array/dynamic implementation.
14. List the advantages of doubly linked list over single linked list.

You might also like