- What do you mean by data structure? Explain various types of data structures.
- What do you mean by operations of data structure? Explain various types of operations that can be performed on data structures.
- What do you mean by Analysis of an Algorithm? Explain Worst Case, Average Case and Best Case Complexity.
- What do you mean by Time and space complexity? Explain trade off situation between them.
- What do you mean by searching and its types.
- What are the conditions for Binary Search? Which searching is better and why?
- What do you mean by sorting? Explain various types of sorting with their complexities.
- Given array is 23, 45, 32, 21. Write the steps to :
- Given array is 10, 20, 30, 40, 50 Write the steps to
- Explain different types of complexities worst case, average case and best case for linear and binary search.
- Write algorithm/function for linear search
- Write algorithm/function for binary search
- What do you mean by sparse matrix? How they are stored in memory to save the storage space.
- What do you mean by array? How 1 dimensional array is stored in memory.
- How two dimensional arrays are stored in memory? Explain row major and column major forms to find the address of any element.
- Two Dimensional Array Address calculation Questions
- Evaluate the following postfix notation of expression (Show status of stack after execution of each operation ): 4, 10, 5, +, *, 15, 3, /, –
- Evaluate the following postfix notation of expression : 20 10 + 5 2 * – 10 /
- Evaluate the following postfix notation of expression (Show status of stack after execution of each operations): 5, 20, 15, -, *,25, 2, *, + 2
- Evaluate the following postfix notation of expression : 25 8 3 – / 6 * 10 + (2)
- Evaluate the following postfix expression using a stack and show the contents of stack after execution of each operation: 20, 45, +, 20, 10, -, 15, +, *
- Evaluate the following postfix notation of expression : 15 3 2 + / 7 + 2. * .
- Write the equivalent infix expression for 10, 3, *, 7, 1, –,*, 23, +
- Write the equivalent infix expression for a, b, AND, a, c, AND, OR
- Evaluate the following postfix notation of expression : 10 20 + 25 15 – * 30 /
- Write the equivalent prefix and postfix expression for the given infix expressions :
- A + B – D / X x Y
- (X + Y) / (Z x Y) – R
- Evaluate the following postfix expression and show the contents of stack after execution each operation :
- 20 10 + 25 10 – * 5 /
- 20 10 + 55 5 * – 10 /
- 120,45,20,+25,15,-,+,*
- 60,45,+,20,10,-,5,-,10,+,*
- 60,6,/,5,2,*,5,-,+
- 5,3,+,2,*,6,9,7,-,/,-
- 3,1,+,2,🡩,7,4,-,2,*,+,5,-
- T, F, NOT, AND, T, OR , F, AND
- True, False, NOT, AND, False, True, OR, AND
- Convert the following infix expression to its equivalent postfix expression showing stack contents for the conversion :
- A + B * (C – D) / E
- X – Y / (Z + U ) * V
- (A + B) * C + D / E – F
- A * (B + (C + D) * (E + F) / G) * H
- A + [(B + C)+ (D + E) * F] / G
- A + B * C 🡩 (D / E) /F
- NOT A OR NOT B AND NOT C
- NOT (A OR B) AND C
- ( A + B 🡩 D) / (E – F) + G
- Obtain the postfix notation for the following infix notation of expression showing the contents of the stack and postfix expression formed after each step of conversion : (P—Q)/(R*(S—T)+U)
Ans: Postfix Form: PQ-RST-*U+/
Solution:
S.N o | Symbol Scanned | Stack | Expression Y |
1 | ( | ( | |
2 | ( | (( | |
3 | P | (( | P |
4 | – | ((- | P |
5 | Q | ((- | P Q |
6 | ) | ( | P Q – |
7 | / | (/ | P Q – |
8 | ( | (/( | P Q – |
9 | ( | (/(( | P Q – |
10 | R | (/(( | P Q – |
11 | * | (/((* | P Q – R |
12 | ( | (/((*( | P Q – R |
13 | S | (/((*( | P Q – R |
14 | – | (/((*(- | P Q – R S |
15 | T | (/((*(- | P Q – R S |
16 | ) | (/((* | P Q – R S T |
17 | ) | (/( | P Q – R S T – |
18 | + | (/(+ | P Q – R S T – * |
19 | U | (/(+ | P Q – R S T – * U + |
20 | ) | (/ | P Q – R S T – * U+ |
21 | ) | P Q – R S T – * U+ / |