What is the purpose of a Content Security Policy (CSP) header?
Anonymous Quiz
6%
To speed up CSS parsing
94%
Restricts allowed sources for scripts and other resources
0%
To compress images automatically
0%
To enable dark mode
Topic: Debugging & Code Output
🔍 Quick look before the question:
🔍 Quick look before the question:
def f(n):
if n == 0:
return 0
return n + f(n - 1)
import sys
sys.setrecursionlimit(3)
print(f(5))
What happens when this code runs?
Anonymous Quiz
15%
Prints 15
20%
Prints 0
60%
Raises a RecursionError because the recursion limit is set too low for the required depth
5%
Hangs forever in an infinite loop
What is the main purpose of CORS (Cross-Origin Resource Sharing) headers?
Anonymous Quiz
4%
To compress HTTP responses
81%
To let a server explicitly permit cross-origin browser requests
15%
To encrypt traffic between client and server
0%
To cache static assets
Topic: Debugging & Code Output
🔍 Quick look before the question:
🔍 Quick look before the question:
x = 5
def outer():
x = 10
def inner():
print(x)
x = 20
inner()
outer()
What happens when this code runs?
Anonymous Quiz
41%
Prints 10
29%
Prints 5
29%
Prints 20
0%
Raises an UnboundLocalError
What is the main goal of the Liskov Substitution Principle?
Anonymous Quiz
27%
Subclasses should be substitutable for their base class
27%
Every class must have exactly one subclass
47%
Subclasses should never override any parent methods
0%
It only applies to abstract classes, never concrete ones
Topic: Data Structures & Algorithms
🔍 Quick look before the question:
🔍 Quick look before the question:
def mystery(n, memo={}):
if n in memo:
return memo[n]
if n <= 1:
return n
memo[n] = mystery(n-1, memo) + mystery(n-2, memo)
return memo[n]
print(mystery(30))
What is the time complexity of this function, and why does it differ from naive recursive Fibonacci?
Anonymous Quiz
7%
O(2^n), same as naive recursion since it's still recursive
73%
O(n), because memoization ensures each subproblem is only computed once
13%
O(n^2), because the dictionary lookups are slow
7%
O(log n), because of the recursive halving
What is a common cause of an N+1 query problem in an application using an ORM?
Anonymous Quiz
13%
Using too many indexes on one table
71%
One query per parent's children instead of a single join
13%
Using JOINs instead of subqueries
3%
Caching query results too aggressively
Why might a system use a Content Delivery Network (CDN)?
Anonymous Quiz
2%
To compress source code
93%
To serve static content from servers closer to the user
4%
To manage user authentication
0%
To handle database transactions
What does horizontal scaling mean?
Anonymous Quiz
29%
Upgrading a single server's CPU and RAM
65%
Adding more servers to share the load
6%
Reducing the number of database tables
0%
Compressing files to save space
Why is idempotent design particularly important with at-least-once delivery message queues?
Anonymous Quiz
39%
Because at-least-once queues never actually redeliver messages
56%
The queue may deliver the same message more than once
6%
Because it makes messages arrive faster
0%
It's not relevant to at-least-once delivery
What does the spread operator do when used on an object, like {...obj}?
Anonymous Quiz
10%
Deep clones the object recursively
84%
Creates a shallow copy, copying only the top-level properties
3%
Mutates the original object in place
3%
Only works on arrays, not objects
What is a common reason to introduce a circuit breaker pattern between services?
Anonymous Quiz
0%
To permanently block a failing dependency forever
89%
Stops calling a failing service so it has time to recover
0%
To increase the number of retries indefinitely
11%
To encrypt traffic between services
How does @staticmethod differ from @classmethod in Python?
Anonymous Quiz
48%
A staticmethod receives the class as its first argument, a classmethod doesn't
35%
staticmethod gets neither; classmethod automatically gets the class
13%
They behave identically
3%
staticmethod can only be used with private methods
What is the result of typeof null in JavaScript?
Anonymous Quiz
30%
"null"
42%
"undefined"
24%
"object"
3%
"boolean"
❤1
Which protocol is primarily responsible for translating domain names such as example.com into IP addresses?
Anonymous Quiz
0%
FTP
92%
DNS
8%
SSH
0%
SMTP
❤1