SPPU Computer Engineering Second Year (SE) Data Structure Lab (DSL) / Fundamentals of Data Structures (FDS) Assignments (2019 Pattern)
Aledutron Youtube PPS Lab Playlist Link: https://www.youtube.com/playlist?list=PLlShVH4JA0osUGQB95eJ8h5bTTzJO89vz
Question No. | Problem Statement | Code Link | Youtube Link |
---|---|---|---|
Group A | |||
1 | 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 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) |
Group-A/Q01.py | https://www.youtube.com/watch?v=oKGftNwy3ZI&list=PLlShVH4JA0osUGQB95eJ8h5bTTzJO89vz&index=3&pp=iAQB |
2 | 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: 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 |
Group-A/Q02.py | https://www.youtube.com/watch?v=WwJspzHmqEI&list=PLlShVH4JA0osUGQB95eJ8h5bTTzJO89vz&index=4&pp=iAQB |
3 | Write a Python program for department library which has N books, write functions for following: 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-A/Q03.py | https://www.youtube.com/watch?v=E0OdKqu_J9A&list=PLlShVH4JA0osUGQB95eJ8h5bTTzJO89vz&index=5&pp=iAQB |
4 | Write a Python program that computes the net amount of a bank account based a transaction log from console input. The transaction log format is shown as following: D 100 W 200 (Withdrawal is not allowed if balance is going negative. Write functions for withdraw and deposit) D means deposit while W means withdrawal.Suppose the following input is supplied to the program: D 300 D 300 W 200 D 100 Then, the output should be: 500 | Group-A/Q04.py | https://www.youtube.com/watch?v=zvQUya4KT-I&list=PLlShVH4JA0osUGQB95eJ8h5bTTzJO89vz&index=6&pp=iAQB |
5 | Write a Python program to compute following operations on String: a) To display word with the longest length b) To determines the frequency of occurrence of particular character in the string c) To check whether given string is palindrome or not d) To display index of first appearance of the substring e) To count the occurrences of each word in a given string |
||
6 | It is decided that weekly greetings are to be furnished to wish the students having their birthdays in that week. The consolidated sorted list with desired categorical information is to be provided to the authority. Write a python program to store students PRNs with date and month of birth. Let List_A and List_B be the two list for two SE Computer divisions. Lists are sorted on date and month. Merge these two lists into third list “List_SE_Comp_DOB” resulting in sorted information about Date of Birth of SE Computer students | ||
7 | Write a python Program for magic square. A magic square is an n * n matrix of the integers 1 to n2 such that the sum of each row, column, and diagonal is the same. The figure given below is an example of magic square for case n=5. In this example, the common sum is 65. | ||
8 | Write a python program that determines the location of a saddle point of matrix if one exists. An m x n matrix is said to have a saddle point if some entry a[i][j] is the smallest value in row i and the largest value in j. | https://www.youtube.com/watch?v=FROqhMS_rQk&list=PLlShVH4JA0osUGQB95eJ8h5bTTzJO89vz&index=7&pp=iAQB | |
9 | Write a python program to compute following computation on matrix: a) Addition of two matrices b) Subtraction of two matrices c) Multiplication of two matrices d) Transpose of a matrix |
https://www.youtube.com/watch?v=sI7Saf8HHKo&list=PLlShVH4JA0osUGQB95eJ8h5bTTzJO89vz&index=8&pp=iAQB | |
10 | Write a python program for sparse matrix realization and operations on it- Transpose, Fast Transpose and addition of two matrices | ||
Group B | |||
11 | a) Write a pythonprogram to store roll numbers of student in array who attended training program in random order. Write function for searching whether particular student attended training program or not, using Linear search and Sentinel search. b) Write a python program to store roll numbers of student array who attended training program in sorted order. Write function for searching whether particular student attended training program or not, using Binary search and Fibonacci search |
Group-B/Q11.py | https://www.youtube.com/watch?v=5g84mMMFcMU&list=PLlShVH4JA0osUGQB95eJ8h5bTTzJO89vz&index=9&pp=iAQB |
12 | a) Write a python program to store names and mobile numbers of your friends in sorted order on names. Search your friend from list using binary search (recursive and non☻recursive). Insert friend if not present in phonebook b) Write a python program to store names and mobile numbers of your friends in sorted order on names. Search your friend from list using Fibonacci search. Insert friend if not present in phonebook. |
Group-B/Q12.py | https://www.youtube.com/watch?v=_rKyFEmH5Ww&list=PLlShVH4JA0osUGQB95eJ8h5bTTzJO89vz&index=10&pp=iAQB |
13 | Write a python program to maintain club members, sort on roll numbers in ascending order. Write function “Ternary_Search” to search whether particular student is member of club or not. Ternary search is modified binary search that divides array into 3 halves instead of two. | ||
14 | Write a pythonprogram to store first year percentage of students in array. Write function for sorting array of floating point numbers in ascending order using a) Selection Sort b) Bubble sort and display top five scores. |
Group-B/Q14.py | https://www.youtube.com/watch?v=hYzQO5Jkn74&list=PLlShVH4JA0osUGQB95eJ8h5bTTzJO89vz&index=11&pp=iAQB |
15 | Write a python program to store second year percentage of students in array. Write function for sorting array of floating point numbers in ascending order using a) Insertion sort b) Shell Sort and display top five scores |
||
16 | Write a python program to store first year percentage of students in array. Write function for sorting array of floating point numbers in ascending order using quick sort and display top five scores. | ||
17 | Write a python program to store 12th class percentage of students in array. Write function for sorting array of floating point numbers in ascending order using bucket sort and display top five scores. |
||
18 | Write python program to store 10th class percentage of students in array. Write function for sorting array of floating point numbers in ascending order using radix sort and display top five scores | ||
Group C | |||
19 | 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. |
Group-C/Q19.cpp | https://www.youtube.com/watch?v=BCRvaGOenUs&list=PLlShVH4JA0osUGQB95eJ8h5bTTzJO89vz&index=17&pp=iAQB |
20 | 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 pointe r) 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. |
||
21 | Write C++ program for storing appointment schedule for day. Appointments are booked randomly using linked list. Set start and end time and min and max duration for visit slot. Write functions for☻ a) Display free slots b) Book appointment c) Cancel appointment ( check validity, time bounds, availability) d) Sort list based on time e) Sort list based on time using pointer manipulation |
||
22 | Second year Computer Engineering class, set A of students like Vanilla Ice-cream and set B of students like butterscotch ice-cream. Write C++ program to store two sets using linked list. compute and display☻ a) Set of students who like both vanilla and butterscotch b) Set of students who like either vanilla or butterscotch or not both c) Number of students who like neither vanilla nor butterscotch |
||
23 | Write C++ program for storing binary number using doubly linked lists. Write functions to a) To compute 1‘s and 2‘s complement b) Add two binary numbers |
||
24 | Write C++ program to realize Set using Generalized Liked List (GLL) e.g. A ={ a, b, {c, d,e, {}, {f,g}, h, I, {j,k}, l, m}. Store and print as set notation. | ||
Group D | |||
25 | 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 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 |
Group-D/Q25.cpp | https://www.youtube.com/watch?v=8EvsaNWmtqA&list=PLlShVH4JA0osUGQB95eJ8h5bTTzJO89vz&index=12&pp=iAQB |
26 | In any language program mostly syntax error occurs due to unbalancing delimiter such as (),{},[]. Write C++ program using stack to check whether given expression is well parenthesized or not. | Group-D/Q26.cpp | https://www.youtube.com/watch?v=265DLjJRuG8&list=PLlShVH4JA0osUGQB95eJ8h5bTTzJO89vz&index=13&pp=iAQB |
27 | Implement C++ program for expression conversion as infix to postfix and its evaluation using stack based on given conditions: 1. Operands and operator, both must be single character.2. Input Postfix expression must be in a desired format.3. Only '+', '-', '*' and '/ ' operators are expected. | ||
28 | A classic problem that can be solved by backtracking is called the Eight Queens problem, which comes from the game of chess. The chess board consists of 64 square arranged in an 8 by 8 grid. The board normally alternates between black and white square, but this is not relevant for the present problem. The queen can move as far as she wants in any direction, as long as she follows a straight line, Vertically, horizontally, or diagonally. Write C++ program with recursive function for generating all possible configurations for 4-queen's problem. | ||
Group E | |||
29 | 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 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. | Group-E/Q29.cpp | https://www.youtube.com/watch?v=ECUwcDhSDOc&list=PLlShVH4JA0osUGQB95eJ8h5bTTzJO89vz&index=14&pp=iAQB |
30 | Write program to implement a priority queue in C++ using an inorder list to store the items in the queue. Create a class that includes the data items (which should be template) and the priority (which should be int). The inorder list should contain these objects, with operator <= overloaded so that the items with highest priority appear at the beginning of the list (which will make it relatively easy to retrieve the highest item.) | ||
31 | 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 a one☻dimensional array. Write C++ program to simulate deque with functions to add and delete elements from either end of the deque. | Group-E/Q31.cpp | https://www.youtube.com/watch?v=XD20iZgUfcA&list=PLlShVH4JA0osUGQB95eJ8h5bTTzJO89vz&index=15&pp=iAQB |
32 | Pizza parlor accepting maximum M orders. Orders are served in first come first served basis. Order once placed cannot be cancelled. Write C++ program to simulate the system using circular queue using array | Group-E/Q32.cpp | https://www.youtube.com/watch?v=Fsr_pDr-CMg&list=PLlShVH4JA0osUGQB95eJ8h5bTTzJO89vz&index=16&pp=iAQB |