Rapid Fire Round - These qs were asked to me
What is a deadlock?
What are the 4 necessary conditions for deadlock?
Explain Circular Wait.
Explain No Preemption.
Explain Hold and Wait.
Networking questions — general networking fundamentals.
What happens when an HTTPS request is made?
What happens on the client side when it sends a request?
What does DNS do?
Is HTTPS application-specific / can multiple applications use HTTPS?
What are the different parts/processes involved when a client sends an HTTPS request?
What is a compound index in MongoDB?
Why does field ordering matter in a compound index?
Key concept discussed:
Compound Index:
{ name: 1, age: 1 }
The interviewer was probing the leftmost-prefix rule.
Difference between BFS and DFS
What are their use cases?
What data structures do BFS and DFS use?
Answer:
BFS → Queue
DFS → Stack / Recursion
Does Quick Sort work / how does Quick Sort work?
Why does Quick Sort degrade to O(n²)?
What happens if the pivot is the last element of an already sorted array?
Why exactly does that case become O(n²)?
Example discussed:
[1, 2, 3, 4, 5]
Pivot = 5
↓
[1, 2, 3, 4] | 5
Pivot = 4
↓
[1, 2, 3] | 4
Pivot = 3
↓
[1, 2] | 3
So partitions become:
n - 1, 0
n - 2, 0
n - 3, 0
...
What are anagrams?
Given two strings, check whether they are anagrams.
Give brute-force, better and optimal approaches.
We discussed:
Brute → O(n²)
Better → Sorting → O(n log n)
Optimal → Frequency Map/Array → O(n)
What if the input contains Unicode characters?
What is Unicode?
Why can't we simply use freq[26] for Unicode?
INTERVIEW
|
┌────────────┼────────────┐
↓ ↓ ↓
DSA CS Development
| | |
BFS / DFS OS Node.js
Quick Sort Deadlock JavaScript
Anagrams Networking TypeScript
HTTPS Payments
DNS Security
MongoDB
Indexes
HR Round
Puzzles (from GFG) Basic HR Discussion