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

Data Structures and Algorithms Lab QP 1

The document outlines a lab cycle sheet for a Data Structures and Algorithms course, detailing three main programming tasks: a Balanced Parenthesis Checker, Tower of Hanoi, and Bank Queue Simulation. Each task is divided into low-level, medium-level, and high-level programming challenges, focusing on the implementation of algorithms using C programming. The tasks emphasize the use of stacks and queues to manage data structures effectively.

Uploaded by

kojono8875
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)
10 views1 page

Data Structures and Algorithms Lab QP 1

The document outlines a lab cycle sheet for a Data Structures and Algorithms course, detailing three main programming tasks: a Balanced Parenthesis Checker, Tower of Hanoi, and Bank Queue Simulation. Each task is divided into low-level, medium-level, and high-level programming challenges, focusing on the implementation of algorithms using C programming. The tasks emphasize the use of stacks and queues to manage data structures effectively.

Uploaded by

kojono8875
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

School of Computer Science Engineering and Information

Systems
BITE201P- Data Structures and Algorithms Lab

Cycle Sheet 1

1. Balanced Parenthesis Checker:


a. Low-level: Write a stack -based program that checks whether the
brackets in a string are balanced. The string can contain (), {},
and []. No other processing is required.
b. Medium-level: Write a C program that takes a small C code snippet
as input and verifies whether the brackets: round (), curl y {}, and
square [] are properly balanced and nested. The program should
use a stack to manage the brackets and return whether the syntax
structure is correct in terms of these symbols.
c. High-level: You are given a parentheses string‘s’. In one move,
you can insert a parenthesis at any position of the string .
Return the minimum number of moves required to make‘s’ valid.
2. Tower of Hanoi :
a. Low-level: Write a recursive C program to solve the Tower of
Hanoi problem for ‘n’ disks. Print the steps to move each disk
from the source rod to the destination rod using a temporary rod.
b. Medium-level: Count and print the total number of moves
required.
c. High-level: Implement Tower of Hanoi without recursion , by
using explicit stacks to represent the three rods (A, B, C) and
simulate the movement of disks iteratively.
3. Bank Queue Simulation:
a. Low-level: Write a C program to simulate a bank queue system
using a normal linear queue (array). The operations should include
i. Enqueue: Add a customer to the queue
ii. Dequeue: Serve the customer at the front
iii. Display: Print current queue.
There can be a maximum of 10 customers in the queue. Overflow
and underflow cases must be handled.
b. Medium-level: Write a C program to simulate a bank queue system
using a normal linear queue (array). Each customer has a Customer
ID and name. The operations should include:
i. Enqueue: Add a customer to the queue
ii. Dequeue: Serve the customer at the front
iii. Display: Print current queue.
There can be a maximum of 10 customers in the queue. Overflow
and underflow cases must be handled. During every operation,
display which customer is currentl y being s erved.
c. High-level: Re-implement the bank queue using a circular queue
to avoid memory wastage when customers are served.

You might also like