DS Slips
DS Slips
DS Slips
- Insert
- Delete
- Display
- Exit
Slip 12
A) Write a C program that accepts the graph as an adjacency matrix and checks
if the graph is undirected. The matrix for undirected graph is symmetric. Also
calculate in degree of all vertices - Read a graph as adjacency Matrix - Check
the matrix is symmetric or not - Calculate indegree of all vertices
B) Write a „C‟ program to accept and sort n elements in ascending order using
Selection sort method.
Slip 13
A) Write a C program to accept an infix expression and convert it into postfix
form.(Use Static Implementation of Stack) Example: - A * B + C as AB*C+
B) Write a „C‟ program to create doubly link list and display nodes having odd
value
Slip 14
A) Write a „C‟ program to accept a string from user and reverse it using
Dynamic implementation of Stack.
B) Write a „C‟ program to accept names from the user and sort in alphabetical
order using bubble sort - Accept n name
- Bubble sort Function
- Display
Slip 15
A) Write a „C‟ program to accept an infix expression, convert it into its
equivalent postfix expression and display the result.(Use Dynamic
Implementation of Stack.
B) Write menu driven program using „C‟ for Dynamic implementation of Stack.
The menu includes following operations:
- Push
- Pop
- Display
- Exit
Slip 16
A) Write a „C‟ program which accept the string and reverse each word of the
string using Static implementation of stack.
Example: Input - This is an input string Output - sihTsinatupnignirts
B) Write a „C‟ program to create to a Singly linked list. Accept the number from
user, search the number in the list. If the number is present display the Position
of node .If number not present print the message “Number not Found”.
Slip 17
A) Write a „C‟ program to read a postfix expression, evaluate it and display the
result. (Use Static Implementation of Stack).
B) Write a „C‟ program to accept the names of cities and store them in array.
Accept the city name from user and use linear search algorithm to check
whether the city is present in array or not.
Slip 18
A) Write a „C‟ program to read „n‟ integers and store them in a binary Search
tree structure and count the following and display it.
- Number of nodes
- Degree of tree
- Leaf nodes
B) Write a „C‟ program to accept and sort n elements in ascending order using
Merge sort method.
Slip 19
A) Write a „C‟ program which accept the string and reverse each word of the
string using Dynamic implementation of stack. Example: Input - This is an
input string Output - sihTsinatupnignirts
B) Write a „C‟ program to create a singly Link list and display its alternative
nodes. (start displaying from first node)
Slip 20
A) Write a „C‟ program which accept the string and check whether the string is
Palindrome or not using stack. (Use Static/Dynamic implementation of Stack)
B) Write a „C‟ program to swap mth and nth element of singly linked list.
Slip 21
A) Write a „C‟ program to read an adjacency matrix of a directed graph and
traverse using BFS.
B) Write a „C‟ program Accept n elements from user store it in an array. Accept
a value from the user and use linear/Sequential search method to check whether
the value is present in array or not. Display proper message.
Slip 22
A) Write a „C‟ program which accept an Expression and check whether the
expression is Parenthesized or not using stack. (Use Static/Dynamic
implementation of Stack)
B) Write a „C‟ program to count all non-zero elements, odd numbers and even
numbers in the singly linked list.
Slip 23
A) Write a menu driven program using „C‟ for singly linked list- - To create
linked list. - To display linked list - To insert node at last position of linked list.
- To delete node from specific position of linked list.
B) Write a „C‟ program to create a random array of n integers. Accept a value x
from user and use Binary search algorithm to check whether the number is
present in array or not. (Students can accept sorted array or can use any sorting
method to sort the array)
Slip 24
A) Write a „C‟ program to read a postfix expression, evaluate it and display the
result. (Use Dynamic Implementation of Stack)
B) Write a „C‟ program to remove last node of the singly linked list and insert it
at the beginning of list
Slip 25
A) Write a „C‟ program to read an adjacency matrix of a directed graph and
traverse it using DFS
B) Write a menu driven program using „C‟ for singly linked list- - To create
linked list. - To display linked list.
Slip 26
A) Write a „C‟ program to accept an infix expression, convert it into its
equivalent prefix expression and display the result. (Use Static Implementation
of Stack).
B) Write a „C‟ program to create two singly linked lists and concatenate one list
at the end of another list.
Slip 27
A) Implement Static implementation of circular queue of integers with
following operation: - Initialize(),insert(), delete(), isempty(), isfull(), display()
B) Write a „C‟ program to create Doubly Link list and display it.
Slip 28
A) Write a „C‟ program to create a Binary Search tree and implements
following functions - Create Binary Search Tree - Search a node in binary
search tree - Display a binary search tree (Post order Traversal)
B) Write a „C‟ program to read n integers and create two lists such that all
positive numbers are in one list and negative numbers are in another list.
Display both the lists.
Slip 29
A) Write a „C‟ program to create a Binary tree, traverse it using recursive
operations like inorder, preorder and postorder and display the result of each
one separately.
B) Write a „C‟ program to create Circular Singly Link list and display it.
Slip 30
A) Implement Dynamic implementation of circular queue of integers with
following operation: - Initialize(),insert(), delete(), isempty(), isfull(), display()
B) Write a „C‟ program to sort elements of a singly linked list in ascending
order and display the sorted List.