Let a matrix of size m X n contains elements either 0 or 1. Write a code to replace an element 0 with 1, if all its surrounding elements are 1.
Write the code to delete all the nodes in a doubly linked list, where the data element
of the node is greater than data element of all its previous nodes and is less than data
element of all the next nodes.
Reverse a singly linked list using recursion.
· WAP to convert an infix expression into its equivalent prefix notation.
3. Write a program for evaluating the value for a given postfix expression using stack data structure.
a) Infix to Postfix
b)Prefix to Infix
Write a menu driven program to perform the following operations in a double linked list by
using suitable user defined functions for each case.
a) Traverse the list forward
b) Traverse the list backward
c) Check if the list is empty
d) Insert a node at the certain position (at beginning/end/any position)
e) Delete a node at the certain position (at beginning/end/any position)
f) Delete a node for the given key
g) Count the total number of nodes
h) Search for an element in the linked list
Verify & validate each function from main method.
Let a linked list consists of n number of nodes, where each node consists of a unique
number, a priority number (in between 1 to 5), and pointer to next node. Design the
algorithm/develop pseudocode to divide the nodes into different linked list where
each linked consists of nodes having same priority.
WAP to create a single circular double linked list of n nodes and display the linked list by
using suitable user defined functions for create and display operations.