Zoho Mock Interview Question Paper
1. C++ Aptitude & Output Prediction Round
- Q1: What will be the output of the following code?
- ```cpp
int x = 5;
x = x++ * ++x;
cout << x;
```
- Q2: Predict the final value of 'a' after the loop executes:
- ```cpp
int a = 1;
for(int i = 1; i <= 5; i++) {
a *= i;
}
```
- Q3: Identify the error in this C++ code snippet and fix it:
- ```cpp
int main() {
int *p;
cout << *p;
return 0;
}
```
2. Programming Round (DSA)
- Q4: Reverse a linked list both iteratively and recursively.
- Q5: Find the first non-repeating character in a given string.
- Q6: Implement a stack using an array and a linked list.
- Q7: Given a sorted array, remove duplicates in O(n) time complexity.
- Q8: Detect if a linked list has a cycle (Floyd's Cycle Detection Algorithm).
3. Advanced Programming Round
- Q9: Implement Dijkstra's Algorithm to find the shortest path in a weighted graph.
- Q10: Solve the Coin Change Problem using Dynamic Programming.
- Q11: Convert a given binary tree into a doubly linked list.
- Q12: Implement an LRU Cache using HashMap and Doubly Linked List.
- Q13: Count the number of islands in a 2D grid using DFS.
4. Technical Interview Round
- Q14: Explain the difference between abstraction and encapsulation.
- Q15: Write an SQL query to find the second-highest salary from an Employee table.
- Q16: How does indexing work in databases?
- Q17: What happens when you type a URL in a web browser?
- Q18: Explain multithreading in C++ with an example.
5. HR Interview Round
- Q19: Tell me about yourself.
- Q20: Why do you want to join Zoho?
- Q21: What are your strengths and weaknesses?
- Q22: Describe a situation where you had to work in a team to solve a problem.
- Q23: Where do you see yourself in five years?