Round 1
Questions: Given an undirected connected graph of g_nodes and M connections, traverse all nodes at least once, and store the order of traversal in A. Now create the lexicographically largest array B which is a permutation of A.
Example:
- g_from = [4, 5, 1, 4, 3], g_to = [5, 1, 4, 3, 2]
Expected Output: B = [5, 4, 3, 2, 1] with A = [5, 4, 3, 2, 3, 4, 1]
Test Case 1:
- g_from = [3, 3], g_to = [1, 2]
Expected Output: B = [3, 2, 1]
Test Case 2:
- g_from = [1, 2, 3, 2, 1], g_to = [2, 3, 4, 4, 4]
Expected Output: B = [4, 3, 2, 1]
MCQs Breakdown:
- CS Fundamentals: 20 Questions
- Virtual Memory
- Semaphore value (one is binary, other is counting, one increments the value of x, other decrements; the incrementing one is called 5 times and the decrementing one is called 3 times. Given maximum and minimum possible value of x, if initial value of x was 10)
- User mode, Kernel mode
- Which DS is used to implement priority queue efficiently (heap)
- Memoization definition
- Example of Cloud DB (Oracle, AWS RDS, Azure SQL, All of the above)
- Latest long term release of Oracle DB
- ACID full form
- Which SQL constraint do we use to set some value to a field whose value has not been added explicitly? (default)
- Truncate Table in SQL is? (DDL)
- Load balancer
- CAP theorem
- Zombie process in Linux
- HTTP method for resource creation (POST)
- Response status code category for server error in REST (5xx)
- Full form of BGP, where does it operate (application layer)
- How does TCP ensure data sent success and receive success (sequencing and ack)
Others got programming questions based on graphs and binary search on answer.
Candidate's Approach
No approach provided.
Interviewer's Feedback
No feedback provided.