Tip 1: Practice DSA daily.
Tip 2: Solve all fundamental problems thoroughly.
Tip 3: Keep at least two projects handy.
Tip 1: Have at least two projects on your résumé.
Tip 2: Prepare everything written on your résumé very well.
This round had two questions: one SQL-based and one DSA-based.



1. enqueue(x) : Adds an item x to rear of the queue
2. dequeue() : Removes an item from front of the queue
3. size() : Returns number of elements in the queue.
4. front() : Finds the front element.
Let the given queue be { 1, 2, 3, 4, 5 } and K be 3.
You need to reverse the first K integers of Queue which are 1, 2, and 3.
Thus, the final response will be { 3, 2, 1, 4, 5 }.
You are given a table Employees with the following columns:
emp_id, name, department, salary
Write an SQL query to find the second-highest salary in each department.
Use GROUP BY department
Rank salaries using DENSE_RANK()
Filter rows where rank = 2
Also in the above question
Departments having only one employee → excluded from the result
The interviewer was straightforward and preferred direct answers. One SQL question and one DSA question were asked.



Input: 'a' = [7, 12, 1, 20]
Output: NGE = [12, 20, 20, -1]
Explanation: For the given array,
- The next greater element for 7 is 12.
- The next greater element for 12 is 20.
- The next greater element for 1 is 20.
- There is no greater element for 20 on the right side. So we consider NGE as -1.
You are given a table Orders with the following columns:
order_id, customer_id, order_date, amount
Write an SQL query to find customers who have placed more than one order on the same day.

Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
What is recursion?