What is the time complexity of searching in a balanced binary search tree?
Anonymous Quiz
10%
O(1)
47%
O(log n)
40%
O(n)
3%
O(n log n)
Topic: SQL
🔍 Quick look before the question:
🔍 Quick look before the question:
SELECT e.name, e.salary
FROM employees e
WHERE e.salary > (
SELECT AVG(salary)
FROM employees
WHERE department = e.department
);
What does this query return?
Anonymous Quiz
13%
All employees earning more than the overall company average
77%
Employees earning more than the average salary within their own department
8%
A syntax error, since subqueries can't reference the outer query
2%
The single highest paid employee company-wide
What is the key memory difference between a generator and a list comprehension?
Anonymous Quiz
12%
Generators store all values in memory immediately, lists don't
88%
Generators produce values lazily one at a time, lists build the entire sequence in memory upfront
0%
There is no difference, both are lazy
0%
Lists are always faster regardless of size
❤3
What problem does dependency injection primarily address?
Anonymous Quiz
0%
It makes code run faster at the CPU level
79%
Reduces hardcoded dependencies, making code easier to test
11%
It automatically writes unit tests
11%
It eliminates the need for interfaces
Which keyword is used to inherit a class in Java?
Anonymous Quiz
19%
implements
56%
extends
15%
inherits
11%
super
What is the key difference between composition and inheritance for reusing code?
Anonymous Quiz
4%
They are functionally identical
92%
Inheritance is 'is-a' and couples tightly; composition is 'has-a' and flexible
4%
Composition can only be used in functional languages
0%
Inheritance is always the better choice
Topic: Debugging & Code Output
🔍 Quick look before the question:
🔍 Quick look before the question:
def modify(lst):
lst.append(100)
lst = [1, 2, 3]
lst.append(200)
original = [0]
modify(original)
print(original)
Why might an interviewer intentionally give you an ambiguous or underspecified problem?
Anonymous Quiz
5%
Because they forgot to write a clear problem statement
91%
To see how you handle ambiguity and clarify requirements
5%
Because ambiguous problems are always impossible to solve
0%
It has no intentional purpose
What does idempotent mean for a function or operation, outside the specific API context?
Anonymous Quiz
12%
It runs exactly once and then can never run again
77%
Applying it repeatedly gives the same result as applying it once
12%
It always returns void
0%
It can only take zero arguments
Why might explaining your algorithm's time and space complexity unprompted be a good habit in a coding interview?
Anonymous Quiz
5%
It's unnecessary and wastes time
81%
It shows you're thinking about efficiency, not just correctness
10%
Interviewers always ask for it explicitly, so it's redundant
5%
It's only relevant for senior-level roles
Which collection interface in Java does not allow duplicate elements?
Anonymous Quiz
15%
List
70%
Set
7%
Map
7%
Queue
What is a key difference between arrow functions and regular functions regarding 'this'?
Anonymous Quiz
22%
Arrow functions get their own 'this' bound at call time, just like regular functions
69%
Arrow functions don't have their own 'this'; they inherit it lexically from the surrounding scope
3%
Regular functions never have access to 'this'
6%
There is no meaningful difference
Topic: Java
🔍 Quick look before the question:
🔍 Quick look before the question:
public class Test {
static int counter = 0;
static synchronized void increment() {
counter++;
}
public static void main(String[] args) throws InterruptedException {
Thread t1 = new Thread(() -> {
for (int i = 0; i < 1000; i++) increment();
});
Thread t2 = new Thread(() -> {
for (int i = 0; i < 1000; i++) increment();
});
t1.start(); t2.start();
t1.join(); t2.join();
System.out.println(counter);
}
}
What will counter reliably print, and why?
Anonymous Quiz
35%
Some unpredictable number less than 2000, because of a race condition
35%
Exactly 2000, since synchronized serializes the increments
18%
Exactly 1000, because only one thread actually runs
12%
0, because static fields can't be modified by threads
What does the SQL DISTINCT keyword do?
Anonymous Quiz
7%
Sorts results
83%
Removes duplicate rows
3%
Groups rows
7%
Filters null values
What does Array.prototype.map() return?
Anonymous Quiz
18%
The same array modified in place
68%
A new array with transformed elements
8%
A single combined value
5%
Undefined