Index
Index
No Index
Group A
In second year computer engineering class, group A student’s play cricket,
group B students play badminton and group C students play football.
Write a Python program using functions to compute following: -
a) List of students who play both cricket and badminton
b) List of students who play either cricket or badminton but not both
1
c) Number of students who play neither cricket nor badminton
d) Number of students who play cricket and football but not badminton.
(Note- While realizing the group, duplicate entries should be avoided, Do not
use SET
built-in functions)
Write a Python program to store marks scored in subject “Fundamental of
Data
Structure” by N students in the class. Write functions to compute following:
2 a) The average score of class
b) Highest score and lowest score of class
c) Count of students who were absent for the test
d) Display mark with highest frequency
Write a Python program for department library which has N books, write
functions for
following:
3 a) Delete the duplicate entries
b) Display books in ascending order based on cost of books
c) Count number of books with cost more than 500.
d) Copy books in a new list which has cost less than 500.
Group B
Write a pythonprogram to store first year percentage of students in array.
Write function
4 for sorting array of floating point numbers in ascending order using
a) Selection Sort
b) Bubble sort and display top five scores.
Write a python program to store second year percentage of students in array.
Write
5 function for sorting array of floating point numbers in ascending order using
a) Insertion sort
b) Shell Sort and display top five scores
Write a python program to store first year percentage of students in array.
Write function
6 for sorting array of floating point numbers in ascending order using quick
sort and display
top five scores.
Group C
7 Department of Computer Engineering has student's club named 'Pinnacle
Club'. Students of second, third and final year of department can be granted
membership on request. Similarly one may cancel the membership of club.
First node is reserved for president of club and last node is reserved for
secretary of club. Write C++ program to maintain club member‘s information
using singly linked list. Store student PRN and Name. Write functions to:
a) Add and delete the members as well as president or even secretary.
b) Compute total number of members of club
c) Display members
d) Two linked lists exists for two divisions. Concatenate two lists.
The ticket booking system of Cinemax theater has to be implemented using
C++ program. There are 10 rows and 7 seats in each row. Doubly circular
linked list has to be maintained to keep track of free seats at rows. Assume
some random booking to start with. Use array to store pointers (Head pointer)
8
to each row. On demand
a) The list of available seats is to be displayed
b) The seats are to be booked
c) The booking can be cancelled.
Group D
A palindrome is a string of character that‘s the same forward and backward.
Typically, punctuation, capitalization, and spaces are ignored. For example,
“Poor Dan is in a droop” is a palindrome, as can be seen by examining the
characters “poor danisina droop” and observing that they are the same
forward and backward. One way to check for a palindrome is to reverse the
9
characters in the string and then compare with them the original-in a
palindrome, the sequence will be identical. Write C++ program with
functions-
a) To print original string followed by reversed string using stack
b) To check whether given string is palindrome or not
In any language program mostly syntax error occurs due to unbalancing
10 delimiter such as (),{},[]. Write C++ program using stack to check whether
given expression is well parenthesized or not.
Group E
Queues are frequently used in computer programming, and a typical example
is the creation of a job queue by an operating system. If the operating system
11 does not use priorities, then the jobs are processed in the order they enter the
system. Write C++ program for simulating job queue. Write functions to add
job and delete job from queue.
A double-ended queue (deque) is a linear list in which additions and deletions
may be made at either end. Obtain a data representation mapping a deque into
12
a one-dimensional array. Write C++ program to simulate deque with
functions to add and delete elements from either end of the deque.
Pizza parlor accepting maximum M orders. Orders are served in first come
13 first served basis. Order once placed cannot be cancelled. Write C++ program
to simulate the system using circular queue using array.