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

DS Prorating Assignment III Semester

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

DS Prorating Assignment III Semester

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

III Semester, B.

Tech
Data Structures (CSE 2122)
Assignment Questions for Prorating
Note: If a student missed any ONE of the components of IA for a genuine reason, he/she has to submit
an assignment by answering the first THREE questions, and if he/she missed any TWO components of
IA for a genuine reason, then he has to submit an assignment for all FIVE questions. (Submission is
hand-written hard copy to the respective faculty on or before 7th November 2024)

Questions:
1. Solve the problem of sorting one-dimensional arrays using a C program. Write a C program that
reads integers from the keyboard and places them in an array. The program then sorts the array into
ascending and descending order and prints the sorted lists. The program must not change the
original array or create any other integer arrays. [Hint: Use an array of pointers]
2. Outline an algorithm to convert a prefix expression to a postfix expression. Apply the same
algorithm to convert the expression + * + A * - B C D E F to its postfix form by showing the steps
involved:
3. Consider an Organizational chart given below, which represents the organizational structure of a
company. Write a program to represent the chart using an efficient data structure. For each
employee, the name of the employee and designation must be recorded. The program should also
print all the employees with a given designation.

4. Write a C program(Menu driven) to implement ‘n’ stacks using a single 1-D array containing ‘m’
locations with the following prototypes: i) push(int i, int item, STACK *S); //pushing an item on
ith stack ii) pop(int i, STACK *S);//poping an item from ith stack iii) display(S) // displaying all ‘n’
stack contents For the STACK structure, the members boundary[i] and top[i] represents boundary
and top respectively for the ith stack along with element represented by other members. While
pushing if the particular stack is full, and if there is space available elsewhere in the array of ‘m’
locations, it should shift the stacks so that space is allocated to the full stack.
5. Write a complete C program consisting of a function sortedInsert(. . .) to insert an integer into a
sorted doubly linked list, such that after insertion, the list remains sorted. Also, include function to
display the contents of the list

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy