Algorithm And Arrays-Data Structures-Assignment, Exercises of Data Structures and Algorithms

This is assignment for Data Structures course. It was assigned by Sukeshi Dwivedi at Bengal Engineering and Science University. It includes: Data, Structure, Operations, Algorithm, Worst, Cases, Analysis, Prefix, Memory, Storage, Order, Stack, Conversion

Typology: Exercises

2011/2012

Uploaded on 07/19/2012

amrapali
amrapali 🇮🇳

4.6

(8)

87 documents

1 / 1

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
ASSIGNMENT No. 1
(Units: 14)
Note: All questions are compulsory. All questions carry equal marks.
Q. 1 (a) Define data structure. Name and explain different types of data structure. Explain operations
that can be performed on these data structures.
(b) What is an algorithm? What is time and space analysis of an algorithm? Elaborate the concept of
the best, average & worst cases analysis.
Q. 2 (a) What are the principle differences between arrays and structures? How address calculations are
performed for the access of an item for each?
(b) A dynamically declared array A is defined with row and column subscripts varying from 1 to
5. Give the storage mapping function to map A into memory assuming column-major and
row-major storage order.
Q. 3 (a) Define and explain stack. Give representation of a stack in memory.
(b) Write an algorithm and a program for the insertion (push) and deletion (pop) of an element
from a stack.
Q. 4 (a) What are infix, postfix and prefix notations? Write an algorithm for the conversion of infix
expression to polish or reverse polish expression.
(b) Give a trace for the translation of given infix string to polish and reverse polish string. A / B
C * D + A
Q. 5 (a) Define and explain queue and de-queue. Give memory representation of each.
(b) Formulate an algorithm and a program for the insertion and deletion of an element from a
queue.
docsity.com

Partial preview of the text

Download Algorithm And Arrays-Data Structures-Assignment and more Exercises Data Structures and Algorithms in PDF only on Docsity!

ASSIGNMENT No. 1

(Units: 1–4)

Note: All questions are compulsory. All questions carry equal marks.

Q. 1 (a) Define data structure. Name and explain different types of data structure. Explain operations that can be performed on these data structures. (b) What is an algorithm? What is time and space analysis of an algorithm? Elaborate the concept of the best, average & worst cases analysis.

Q. 2 (a) What are the principle differences between arrays and structures? How address calculations are performed for the access of an item for each? (b) A dynamically declared array A is defined with row and column subscripts varying from 1 to

  1. Give the storage mapping function to map A into memory assuming column-major and row-major storage order.

Q. 3 (a) Define and explain stack. Give representation of a stack in memory. (b) Write an algorithm and a program for the insertion (push) and deletion (pop) of an element from a stack.

Q. 4 (a) What are infix, postfix and prefix notations? Write an algorithm for the conversion of infix expression to polish or reverse polish expression. (b) Give a trace for the translation of given infix string to polish and reverse polish string. A / B – C * D + A

Q. 5 (a) Define and explain queue and de-queue. Give memory representation of each. (b) Formulate an algorithm and a program for the insertion and deletion of an element from a queue.

docsity.com