Technical Interview
Candidate 1
Low
Java
What is the difference between == and .equals()?
Expected solution
== compares primitive values or object references. .equals() compares object content when the class overrides it.
String a = new String("Java");
String b = new String("Java");
a == b // false
a.equals(b) // true
Interviewer should look for: Understand reference vs content.
Medium
SQL
A query using customer_id is very slow on a large table. What would you check?
Expected solution
Check the execution plan, check whether customer_id has an index, verify whether the index is actually used, avoid unnecessary columns/joins, and check table statistics.
Interviewer should look for: Index + execution plan should be mentioned; increasing server size should not be the first answer.
High
Backend
An API normally takes 200 ms but sometimes takes 10 seconds. How would you debug it?
Expected solution
1. Check application logs and request IDs.
2. Check database query time.
3. Check external API calls.
4. Check connection/thread pools.
5. Check CPU, memory and GC.
6. Use tracing/metrics to identify where the delay occurs.
2. Check database query time.
3. Check external API calls.
4. Check connection/thread pools.
5. Check CPU, memory and GC.
6. Use tracing/metrics to identify where the delay occurs.
Interviewer should look for: A strong candidate isolates the bottleneck before changing anything.