DATA STRUCTURE AND ALGORITHM
1)In Second year Computer Engineering class of M students, set A of students play cricket and set B of students play badminton. Write C/C++ program to find and display- i. Set of students who play either cricket or badminton or both ii. Set of students who play both cricket and badminton iii. Set of students who play only cricket iv. Set of students who play only badminton v. Number of students who play neither cricket nor badminton
__________________________________________________________________________________________________
2)Write C/C++ program for storing matrix. Write functions for a) Check whether given matrix is upper triangular or not b) Compute summation of diagonal elements c) Compute transpose of matrix d) Add, subtract and multiply two matrices
__________________________________________________________________________________________________
3)Set A=(1,3, a, s, t, i} represent alphanumeric characters permitted to be used to set the password of length 4. Write C/C++ program to generate all possible passwords
__________________________________________________________________________________________________
4)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) Display list in reverse order using recursion e) Two linked lists exists for two divisions. Concatenate two lists
__________________________________________________________________________________________
5)Second year Computer Engineering class, set A of students like Vanilla Ice-cream and set B of students like butterscotch ice-cream. Write C/C++ program to store two sets using linked list. compute and display- i. Set of students who like either vanilla or butterscotch or both ii. Set of students who like both vanilla and butterscotch iii. Set of students who like only vanilla not butterscotch iv. Set of students who like only butterscotch not vanilla v. Number of students who like neither vanilla nor butterscotch _________________________________________________________________________________________________
6)Write C++ program for storing binary number using doubly linked lists. Write functions- a) to compute 1‘s and 2‘s complement b) add two binary numbers
__________________________________________________________________________________________________
7)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.
__________________________________________________________________________________________________
8)Implement C++ program for expression conversion as infix to postfix and its evaluation using stack based on given conditions i. Operands and operator, both must be single character. ii. Input Postfix expression must be in a desired format. iii. Only '+', '-', '*' and '/ ' operators are expected.
__________________________________________________________________________________________________
9)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
__________________________________________________________________________________________________
10)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
__________________________________________________________________________________________________
11)Write C++ program to store first year percentage of students in array. Sort array of floating point numbers in ascending order using quick sort and display top five scores
__________________________________________________________________________________________________
2)Write C/C++ program for storing matrix. Write functions for a) Check whether given matrix is upper triangular or not b) Compute summation of diagonal elements c) Compute transpose of matrix d) Add, subtract and multiply two matrices
__________________________________________________________________________________________________
3)Set A=(1,3, a, s, t, i} represent alphanumeric characters permitted to be used to set the password of length 4. Write C/C++ program to generate all possible passwords
__________________________________________________________________________________________________
__________________________________________________________________________________________
5)Second year Computer Engineering class, set A of students like Vanilla Ice-cream and set B of students like butterscotch ice-cream. Write C/C++ program to store two sets using linked list. compute and display- i. Set of students who like either vanilla or butterscotch or both ii. Set of students who like both vanilla and butterscotch iii. Set of students who like only vanilla not butterscotch iv. Set of students who like only butterscotch not vanilla v. Number of students who like neither vanilla nor butterscotch _________________________________________________________________________________________________
6)Write C++ program for storing binary number using doubly linked lists. Write functions- a) to compute 1‘s and 2‘s complement b) add two binary numbers
__________________________________________________________________________________________________
7)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.
__________________________________________________________________________________________________
8)Implement C++ program for expression conversion as infix to postfix and its evaluation using stack based on given conditions i. Operands and operator, both must be single character. ii. Input Postfix expression must be in a desired format. iii. Only '+', '-', '*' and '/ ' operators are expected.
__________________________________________________________________________________________________
9)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
__________________________________________________________________________________________________
10)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
__________________________________________________________________________________________________
11)Write C++ program to store first year percentage of students in array. Sort array of floating point numbers in ascending order using quick sort and display top five scores
Comments
Post a Comment