Table of Contents
Topic : Stack (Key Note and Questions)
Key Note:
- Stack is a linear data structure that follows LIFO principles.
- LIFO stands for Last In First Out
- We can implement stack using linked list and array.
- Some Application of Data Structure are Infix to Postfix conversion, Infix to Prefix conversion, Postfix and prefix evaluation etc.
Questions
- What is stack? Explain with suitable example with all its application.
- Implement stack with singly linked list.
- What is push and pop operation of stack? Write the algorithm for push and pop operation.
- Write a program in c for array implementation of stack.
- Write a program in c for linked list implementation of stack.
- What is infix, prefix and postfix expression? Explain with example.
- Write down an algorithm to evaluate the infix expression.
- Write down an algorithm to evaluate the postfix expression.
- Write down an algorithm to evaluate the Prefix expression.
- Convert following infix expression into postfix expression A+(B*C+D)/E
- Write an algorithm to convert a postfix expression into an infix expression. Consider the following arithmetic expression in postfix notation: 752+*415-/-
- Write an algorithm to convert Infix expression to Prefix. Convert this expression into prefix
- What is recursion? Write its principle. Explain with the help of example.
- Explain the types of recursion.
- Explain Tower of Hanoi with example.
- Write the recursive algorithm for solving the problem of Tower of Hanoi and also explain its complexity. Illustrate the solution for four disks and three pegs.
Topic : Queue (Key Note and Questions)
Key Note:
- Queue is a linear data structure that follows FIFO principles.
- FIFO stands for First In First Out.
- Queue can be implemented using Array and Linked List.
- Application of Queue is, Queue is helpful in CPU scheduling, Disk Scheduling, Handling of interrupts in real-time systems etc
Questions
- Write a note on queue. Explain its various operations.
- What is circular queue? Write a C code to insert an element in circular queue. Write all the condition for overflow.
- Write a C program to implement the array representation of circular queue.
- Explain queue and priority queue. Also write its types.
What did you think?
Similar Reads
-
Multiplications of Two variable polynomial
Polynomial multiplication is a common operation in algebra, used in areas such as scientific computing, engineering simulations, and symbolic algebra… -
Subtraction of Two-Variable Polynomial in C
Polynomials with two variables are common in engineering, graphics, and scientific computation. While addition is frequently discussed, subtraction is equally… -
Explain the Addition of Two variable polynomial
Polynomials are fundamental in mathematics, and their use extends into computer science, engineering, physics, and more. While single-variable polynomials are… -
Reverses the Doubly Circular Linked List
Algorithm to Reverse a Doubly Circular Linked List Check if the List is Empty or Has Only One Node: If… -
Algorithm and Program in C to traverse Doubly Circular Linked List
A doubly circular linked list is a special type of linked list in which every node is connected to both… -
Polynomial representation Using Array
Polynomials are fundamental mathematical expressions used extensively in various fields. Representing them efficiently in programming is crucial for calculations and… -
Multiplication of Single Variable Polynomial : Algorithm and Program
Multiplication of single-variable polynomials is a fundamental operation in polynomial algebra. The process involves multiplying each term of one polynomial… -
Subtraction of Single variable Polynomial : Algorithm and Program
Subtracting single-variable polynomials involves reducing each corresponding term of the polynomials from each other. This process is similar to addition,… -
Addition of Single variable Polynomial : Program and Algorithm
The addition of single-variable polynomials is a fundamental concept in algebra, often encountered in mathematics and computer science. Let's break… -
Polynomial Representation Using Linked List
Polynomial representation using linked lists is a critical concept in computer science and mathematics. In this guide, we explore how…