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
Topic: Debugging & Code Output
🔍 Quick look before the question:
🔍 Quick look before the question:
for i in range(5):
if i == 3:
continue
print(i)
Topic: SQL
🔍 Quick look before the question:
🔍 Quick look before the question:
BEGIN TRANSACTION;
UPDATE accounts SET balance = balance - 200 WHERE id = 1;
UPDATE accounts SET balance = balance + 200 WHERE id = 2;
COMMIT;
Why is wrapping both UPDATEs in a single transaction important here?
Anonymous Quiz
13%
It makes the two statements run faster
87%
It ensures both updates succeed or both roll back together
0%
It only matters for SELECT statements
0%
It has no functional effect, just style
Topic: Debugging & Code Output
🔍 Quick look before the question:
🔍 Quick look before the question:
def outer():
result = []
for i in range(3):
def inner():
return i
result.append(inner)
return [f() for f in result]
print(outer())
What does this print?
Anonymous Quiz
40%
[0, 1, 2]
35%
[2, 2, 2]
5%
[0, 0, 0]
20%
This raises a NameError
Which isolation level allows a transaction to read data another concurrent transaction has written but not yet committed?
Anonymous Quiz
15%
Serializable
17%
Repeatable Read
19%
Read Committed
49%
Read Uncommitted
What is the practical difference between Object.is(NaN, NaN) and NaN === NaN?
Anonymous Quiz
5%
Both return false
0%
Both return true
89%
Object.is returns true, === returns false, because === treats NaN as never equal to itself
5%
Object.is throws an error for NaN
Which of these creates a shallow copy of a list in Python?
Anonymous Quiz
0%
list2 = list1
63%
list2 = list1.copy()
26%
list2 = list1[:]
11%
Both B and C
What is a primary key's main purpose in a relational table?
Anonymous Quiz
6%
Speed up joins only
83%
Uniquely identify each row
2%
Store the largest value
9%
Enforce a specific data type
Topic: Python
🔍 Quick look before the question:
🔍 Quick look before the question:
def outer():
x = 10
def inner():
nonlocal x
x += 5
return x
return inner
f = outer()
print(f())
print(f())
What does this print, in order?
Anonymous Quiz
28%
15 then 15
44%
15 then 20
6%
10 then 10
22%
This raises a SyntaxError because nonlocal can't modify enclosing scope
What does the 'volatile' keyword guarantee for a Java field?
Anonymous Quiz
8%
It makes the field immutable
15%
It guarantees atomic compound operations like count++
62%
It ensures reads and writes to the field are visible across threads, preventing stale caching
15%
It prevents the field from being garbage collected
What is the primary advantage of a hash map over a balanced binary search tree for key-value storage?
Anonymous Quiz
6%
Hash maps guarantee sorted iteration order
94%
Hash maps offer average O(1) lookup, insert, and delete versus O(log n) for a balanced tree
0%
Hash maps use less memory in every case
0%
Hash maps never have worst-case degraded performance
What does a composite primary key consist of?
Anonymous Quiz
24%
A primary key generated by combining a hash of every column
59%
Two or more columns that together uniquely identify a row
12%
A primary key that changes automatically over time
6%
A foreign key disguised as a primary key
What is the key idea behind union-find (disjoint set) with path compression and union by rank?
Anonymous Quiz
0%
It sorts elements into a single linked list
77%
Tracks group membership with near-constant amortized time
8%
It's primarily used for sorting algorithms
15%
It guarantees O(1) worst-case for every single operation
In JavaScript, what is a Promise primarily used for?
Anonymous Quiz
2%
Styling components
85%
Handling asynchronous operations
12%
Declaring constants
0%
Looping over arrays
Which of these is a self-balancing binary search tree?
Anonymous Quiz
11%
Binary heap
76%
AVL tree
0%
Trie
13%
Hash map
Topic: Web Development
🔍 Quick look before the question:
🔍 Quick look before the question:
async function loadUser() {
const res = await fetch('/api/user');
const data = await res.json();
return data;
}
console.log(loadUser());
console.log('after call');