Professional Documents
Culture Documents
1- using the following code write a function to insert a new node in a specific position in the
LinkedList.
class Node
{
public:
int data;
Node *next;
};
Solution:
2- Convert the following statement to Postfix then Show the algorithm in action to evaluate it using
Stack:
6-(3*5/4)+2*(9+3)
3- Using the following code write a function called enqueue to add an element to the queue:
int q[50];
int front = -1;
int rear = -1;
int number = 0;
Solution: