answer string | choices dict | id string | kind string | lang string | question string | steps list | subject string | text string | topic string |
|---|---|---|---|---|---|---|---|---|---|
A virtual environment isolates project packages from system Python. | null | cs_0351 | concept | en | What is a Python virtual environment? | [
"Separate folder.",
"Own packages.",
"Avoid conflicts."
] | computer_science | Answer: Isolated packages.
Steps:
1. Separate folder.
2. Own packages.
3. Avoid conflicts. | python |
[5,6].indexOf(6) is 1. | {
"A": "0",
"B": "1",
"C": "2",
"D": "-1"
} | cs_0352 | multiple_choice | en | What does [5,6].indexOf(6) give? | [
"Index from 0.",
"6 at position 1.",
"Select option B."
] | computer_science | Answer: 1.
Steps:
1. Index from 0.
2. 6 at position 1.
3. Select option B.
Answer: (B) | javascript |
SELECT 12 + 30 returns 42. | null | cs_0353 | worked_example | en | What does SELECT 12 + 30 return? | [
"Add numbers.",
"12 + 30 = 42.",
"Result is 42."
] | computer_science | Answer: 42.
Steps:
1. Add numbers.
2. 12 + 30 = 42.
3. Result is 42. | sql |
A /21 network has 2046 usable hosts. | null | cs_0354 | worked_example | en | How many usable hosts in a /21 network? | [
"Host bits = 11.",
"Addresses = 2048.",
"Usable = 2048 - 2 = 2046."
] | computer_science | Answer: 2046.
Steps:
1. Host bits = 11.
2. Addresses = 2048.
3. Usable = 2048 - 2 = 2046. | networking |
Normalizace odstraňuje redundanci rozdělením tabulek. | {
"A": "Odstraňuje redundanci",
"B": "Maže tabulky",
"C": "Třídí řádky",
"D": "Spojuje databáze"
} | cs_0355 | multiple_choice | cs | Co je normalizace databáze? | [
"Méně duplicit.",
"Více tabulek.",
"Vyber možnost A."
] | computer_science | Answer: Odstraňuje redundanci.
Steps:
1. Méně duplicit.
2. Více tabulek.
3. Vyber možnost A.
Answer: (A) | databases |
The kernel is the core managing CPU, memory, and devices. | null | cs_0356 | concept | en | What is an OS kernel? | [
"Core software.",
"Manages resources.",
"Runs privileged."
] | computer_science | Answer: Resource core.
Steps:
1. Core software.
2. Manages resources.
3. Runs privileged. | operating_systems |
20 plus 5 gives 25. | null | cs_0357 | worked_example | en | Thermostat 20 degrees, increase(5). What is the setting? | [
"Start 20.",
"Add 5.",
"Setting = 25."
] | computer_science | Answer: 25.
Steps:
1. Start 20.
2. Add 5.
3. Setting = 25. | oop |
Floyd-Warshall computes all-pairs shortest paths. | {
"A": "Dijkstra",
"B": "Floyd-Warshall",
"C": "Bubble sort",
"D": "DFS"
} | cs_0358 | multiple_choice | en | Which computes all-pairs shortest paths? | [
"All pairs needed.",
"Floyd-Warshall does.",
"Select option B."
] | computer_science | Answer: Floyd-Warshall.
Steps:
1. All pairs needed.
2. Floyd-Warshall does.
3. Select option B.
Answer: (B) | algorithms |
Insertion sort worst case is O(n^2) with reverse-sorted input. | null | cs_0359 | concept | en | What is insertion sort worst-case complexity? | [
"Shift many items.",
"Nested work.",
"O(n^2)."
] | computer_science | Answer: O(n^2).
Steps:
1. Shift many items.
2. Nested work.
3. O(n^2). | complexity |
Prostřední prvek je 3. | null | cs_0360 | worked_example | cs | Seznam je [1,2,3,4,5]. Co je prostřední prvek? | [
"Délka 5.",
"Index 2.",
"Prvek je 3."
] | computer_science | Answer: 3.
Steps:
1. Délka 5.
2. Index 2.
3. Prvek je 3. | data_structures |
Docstrings are triple-quoted strings documenting modules and functions. | null | cs_0361 | concept | en | What are Python docstrings? | [
"Triple quotes.",
"Describe purpose.",
"Shown by help()."
] | computer_science | Answer: Inline documentation.
Steps:
1. Triple quotes.
2. Describe purpose.
3. Shown by help(). | python |
'hello'.slice(1,3) is 'el'. | {
"A": "'el'",
"B": "'hel'",
"C": "'llo'",
"D": "'h'"
} | cs_0362 | multiple_choice | en | What does 'hello'.slice(1,3) give? | [
"Index 1 to 3.",
"Letters e, l.",
"Select option A."
] | computer_science | Answer: 'el'.
Steps:
1. Index 1 to 3.
2. Letters e, l.
3. Select option A.
Answer: (A) | javascript |
SELECT 2 * 3 * 4 returns 24. | null | cs_0363 | worked_example | en | What does SELECT 2 * 3 * 4 return? | [
"2 x 3 = 6.",
"6 x 4 = 24.",
"Result is 24."
] | computer_science | Answer: 24.
Steps:
1. 2 x 3 = 6.
2. 6 x 4 = 24.
3. Result is 24. | sql |
100 MB at 10 MB/s takes 10 seconds. | null | cs_0364 | worked_example | en | Download 100 MB at 10 MB/s. How many seconds? | [
"Size 100.",
"Rate 10.",
"100 / 10 = 10."
] | computer_science | Answer: 10.
Steps:
1. Size 100.
2. Rate 10.
3. 100 / 10 = 10. | networking |
LIMIT omezuje počet vrácených řádků. | {
"A": "Omezuje počet",
"B": "Třídí řádky",
"C": "Spojuje tabulky",
"D": "Maže řádky"
} | cs_0365 | multiple_choice | cs | Co dělá LIMIT? | [
"Ber prvních N.",
"Méně řádků.",
"Vyber možnost A."
] | computer_science | Answer: Omezuje počet.
Steps:
1. Ber prvních N.
2. Méně řádků.
3. Vyber možnost A.
Answer: (A) | databases |
A daemon is a background service process without direct user control. | null | cs_0366 | concept | en | What is a system daemon? | [
"Runs background.",
"No terminal.",
"Serves requests."
] | computer_science | Answer: Background service.
Steps:
1. Runs background.
2. No terminal.
3. Serves requests. | operating_systems |
150 minus 150 leaves 0. | null | cs_0367 | worked_example | en | Balance 150, withdraw(150). What is the balance? | [
"Start 150.",
"Minus 150.",
"Balance = 0."
] | computer_science | Answer: 0.
Steps:
1. Start 150.
2. Minus 150.
3. Balance = 0. | oop |
N-queens is solved with backtracking search. | {
"A": "N-queens",
"B": "Bubble sort",
"C": "Linear search",
"D": "BFS"
} | cs_0368 | multiple_choice | en | Which uses backtracking? | [
"Try and undo.",
"N-queens fits.",
"Select option A."
] | computer_science | Answer: N-queens.
Steps:
1. Try and undo.
2. N-queens fits.
3. Select option A.
Answer: (A) | algorithms |
Exponential growth eventually outgrows any polynomial bound. | null | cs_0369 | concept | en | How do exponential and polynomial compare? | [
"Polynomial bounded power.",
"Exponential multiplies.",
"Exponential wins."
] | computer_science | Answer: Exponential outgrows.
Steps:
1. Polynomial bounded power.
2. Exponential multiplies.
3. Exponential wins. | complexity |
Plný strom hloubky 2 má 7 uzlů. | null | cs_0370 | worked_example | cs | Kolik uzlů má plný binární strom hloubky 2? | [
"Úroveň 0: 1.",
"Úroveň 1: 2, úroveň 2: 4.",
"Celkem 1+2+4 = 7."
] | computer_science | Answer: 7.
Steps:
1. Úroveň 0: 1.
2. Úroveň 1: 2, úroveň 2: 4.
3. Celkem 1+2+4 = 7. | data_structures |
len() on a dict returns the number of keys. | null | cs_0371 | concept | en | What does len() give for dicts? | [
"Count keys.",
"Each once.",
"Example: 3 keys = 3."
] | computer_science | Answer: Number of keys.
Steps:
1. Count keys.
2. Each once.
3. Example: 3 keys = 3. | python |
Array.isArray([]) is true. | {
"A": "true",
"B": "false",
"C": "[]",
"D": "TypeError"
} | cs_0372 | multiple_choice | en | What does Array.isArray([]) give? | [
"[] is array.",
"Check true.",
"Select option A."
] | computer_science | Answer: true.
Steps:
1. [] is array.
2. Check true.
3. Select option A.
Answer: (A) | javascript |
SELECT 100 / 10 returns 10. | null | cs_0373 | worked_example | en | What does SELECT 100 / 10 return? | [
"Divide 100 by 10.",
"100 / 10 = 10.",
"Result is 10."
] | computer_science | Answer: 10.
Steps:
1. Divide 100 by 10.
2. 100 / 10 = 10.
3. Result is 10. | sql |
Splitting /24 into /26 gives 4 subnets. | null | cs_0374 | worked_example | en | Split /24 into /26. How many subnets? | [
"Bits added = 2.",
"2^2 = 4.",
"Subnets = 4."
] | computer_science | Answer: 4.
Steps:
1. Bits added = 2.
2. 2^2 = 4.
3. Subnets = 4. | networking |
Tabulku maže příkaz DROP. | {
"A": "DROP",
"B": "DELETE",
"C": "REMOVE",
"D": "CLEAR"
} | cs_0375 | multiple_choice | cs | Která operace maže celou tabulku? | [
"DELETE maže řádky.",
"DROP maže tabulku.",
"Vyber možnost A."
] | computer_science | Answer: DROP.
Steps:
1. DELETE maže řádky.
2. DROP maže tabulku.
3. Vyber možnost A.
Answer: (A) | databases |
Kontextový manažer řídí zdroje blokem with. | null | cs_0376 | concept | cs | Co je kontextový manažer? | [
"Blok with.",
"Enter a exit.",
"Příklad: open()."
] | computer_science | Answer: Správa zdrojů.
Steps:
1. Blok with.
2. Enter a exit.
3. Příklad: open(). | python |
Hoisting moves declarations to the top before execution. | null | cs_0377 | concept | en | What is hoisting? | [
"var hoisted.",
"let in TDZ.",
"Functions hoisted."
] | computer_science | Answer: Top declarations.
Steps:
1. var hoisted.
2. let in TDZ.
3. Functions hoisted. | javascript |
SELECT returns 15. | {
"A": "14",
"B": "15",
"C": "16",
"D": "17"
} | cs_0378 | multiple_choice | en | Which value does SELECT 21 - 6 return? | [
"Subtract.",
"21-6=15.",
"Select option B."
] | computer_science | Answer: 15.
Steps:
1. Subtract.
2. 21-6=15.
3. Select option B.
Answer: (B) | sql |
TCP opens with SYN, SYN-ACK, and ACK before data. | null | cs_0379 | concept | en | What is a TCP handshake? | [
"SYN sent.",
"SYN-ACK back.",
"ACK confirms."
] | computer_science | Answer: Three-way open.
Steps:
1. SYN sent.
2. SYN-ACK back.
3. ACK confirms. | networking |
Denormalization adds redundancy to speed up reads. | null | cs_0380 | concept | en | What is denormalization? | [
"Join less.",
"Store twice.",
"Faster reads."
] | computer_science | Answer: Redundant speed.
Steps:
1. Join less.
2. Store twice.
3. Faster reads. | databases |
A microkernel keeps minimal core with services in user space. | null | cs_0381 | concept | en | What is a microkernel? | [
"IPC services.",
"More stable.",
"More switches."
] | computer_science | Answer: Tiny core.
Steps:
1. IPC services.
2. More stable.
3. More switches. | operating_systems |
Composition holds parts while inheritance extends a parent type. | null | cs_0382 | concept | en | What is composition versus inheritance? | [
"Compose objects.",
"Inherit behavior.",
"Prefer compose."
] | computer_science | Answer: Has versus is.
Steps:
1. Compose objects.
2. Inherit behavior.
3. Prefer compose. | oop |
Sorted = [2, 3, 4]. | null | cs_0383 | worked_example | en | Selection-sort [4, 2, 3] (case 1). Result? | [
"Min 2.",
"Swap.",
"[2, 3, 4]."
] | computer_science | Answer: [2, 3, 4].
Steps:
1. Min 2.
2. Swap.
3. [2, 3, 4]. | algorithms |
Count = 4096. | null | cs_0384 | worked_example | en | Subsets of 12 items (case 1). Count? | [
"2^12.",
"=4096.",
"4096."
] | computer_science | Answer: 4096.
Steps:
1. 2^12.
2. =4096.
3. 4096. | complexity |
A circular queue wraps indices to reuse freed slots. | null | cs_0385 | concept | en | What is a circular queue? | [
"Head tail.",
"Modulo move.",
"Fixed size."
] | computer_science | Answer: Wrapped buffer.
Steps:
1. Head tail.
2. Modulo move.
3. Fixed size. | data_structures |
Context managers handle setup and cleanup with with blocks. | null | cs_0386 | concept | en | What is a context manager? | [
"Uses with.",
"Calls enter/exit.",
"Example: open()."
] | computer_science | Answer: Setup and cleanup.
Steps:
1. Uses with.
2. Calls enter/exit.
3. Example: open(). | python |
'x' + 4 is 'x4'. | {
"A": "'4x'",
"B": "'x4'",
"C": "'5'",
"D": "4"
} | cs_0387 | multiple_choice | en | What does 'x' + 4 give? | [
"String concat.",
"Result 'x4'.",
"Select option B."
] | computer_science | Answer: 'x4'.
Steps:
1. String concat.
2. Result 'x4'.
3. Select option B.
Answer: (B) | javascript |
SELECT returns 25. | {
"A": "24",
"B": "26",
"C": "25",
"D": "10"
} | cs_0388 | multiple_choice | cs | Kterou hodnotu vrátí SELECT 5 * 5? | [
"Multiply.",
"5x5=25.",
"Select option C."
] | computer_science | Answer: 25.
Steps:
1. Multiply.
2. 5x5=25.
3. Select option C.
Answer: (C) | sql |
Subnets = 4. | null | cs_0389 | worked_example | en | Split /20 into /22 (case 1). How many subnets? | [
"Bits 2.",
"2^2=4.",
"4."
] | computer_science | Answer: 4.
Steps:
1. Bits 2.
2. 2^2=4.
3. 4. | networking |
INSERT adds rows. | {
"A": "SELECT",
"B": "INSERT",
"C": "DELETE",
"D": "UPDATE"
} | cs_0390 | multiple_choice | en | Which adds rows (case 1)? | [
"Write op.",
"INSERT fits.",
"Select option B."
] | computer_science | Answer: INSERT.
Steps:
1. Write op.
2. INSERT fits.
3. Select option B.
Answer: (B) | databases |
Round-robin používá časová kvanta. | {
"A": "FIFO",
"B": "Round-robin",
"C": "LIFO",
"D": "Stack"
} | cs_0391 | multiple_choice | cs | Co používá kvanta (případ 1)? | [
"Rotate tasks.",
"Fixed quantum.",
"Select option B."
] | computer_science | Answer: Round-robin.
Steps:
1. Střídej úlohy.
2. Pevné kvantum.
3. Select option B.
Answer: (B) | operating_systems |
__init__ constructs. | {
"A": "__len__",
"B": "__init__",
"C": "__add__",
"D": "__str__"
} | cs_0392 | multiple_choice | cs | Co je konstruktor (případ 1)? | [
"Init runs.",
"Sets fields.",
"Select option B."
] | computer_science | Answer: __init__.
Steps:
1. Init runs.
2. Sets fields.
3. Select option B.
Answer: (B) | oop |
factorial(6) is 720. | {
"A": "120",
"B": "720",
"C": "820",
"D": "60"
} | cs_0393 | multiple_choice | en | What is factorial(6)? | [
"Multiply down.",
"Result 720.",
"Select option B."
] | computer_science | Answer: 720.
Steps:
1. Multiply down.
2. Result 720.
3. Select option B.
Answer: (B) | algorithms |
About 11. | null | cs_0394 | worked_example | en | Binary steps n=2000 (case 2). About? | [
"log2.",
"~11.",
"11."
] | computer_science | Answer: 11.
Steps:
1. log2.
2. ~11.
3. 11. | complexity |
Load = 0.83. | null | cs_0395 | worked_example | en | 10 items in 12 slots (case 1). Load? | [
"10/12.",
"=0.83.",
"0.83."
] | computer_science | Answer: 0.83.
Steps:
1. 10/12.
2. =0.83.
3. 0.83. | data_structures |
11//4 is 2. | {
"A": "3",
"B": "2",
"C": "1",
"D": "4"
} | cs_0396 | multiple_choice | en | What does 11 // 4 give in Python? | [
"Floor divide.",
"11//4=2.",
"Select option B."
] | computer_science | Answer: 2.
Steps:
1. Floor divide.
2. 11//4=2.
3. Select option B.
Answer: (B) | python |
Result is 'hi1'. | null | cs_0397 | worked_example | en | What does 'Hi1'.toLowerCase() give? | [
"Lowercase.",
"'hi1'.",
"Result."
] | computer_science | Answer: 'hi1'.
Steps:
1. Lowercase.
2. 'hi1'.
3. Result. | javascript |
SELECT returns 11. | null | cs_0398 | worked_example | en | What does SELECT 22 / 2 return? | [
"Divide.",
"22/2=11.",
"11."
] | computer_science | Answer: 11.
Steps:
1. Divide.
2. 22/2=11.
3. 11. | sql |
192.168.1.1 is private. | {
"A": "8.8.1.1",
"B": "192.168.1.1",
"C": "1.1.1.1",
"D": "203.0.1.1"
} | cs_0399 | multiple_choice | en | Which IP is private (set 1)? | [
"Private ranges.",
"192.168.1.1 fits.",
"Select option B."
] | computer_science | Answer: 192.168.1.1.
Steps:
1. Private ranges.
2. 192.168.1.1 fits.
3. Select option B.
Answer: (B) | networking |
Sharding splits data across servers by key ranges. | null | cs_0400 | concept | en | What is sharding? | [
"Hash key.",
"Route shard.",
"Scale out."
] | computer_science | Answer: Split by key.
Steps:
1. Hash key.
2. Route shard.
3. Scale out. | databases |
Mutex ensures one. | {
"A": "Queue",
"B": "Array",
"C": "Mutex",
"D": "File"
} | cs_0401 | multiple_choice | en | What ensures one access (case 2)? | [
"Lock it.",
"One holder.",
"Select option C."
] | computer_science | Answer: Mutex.
Steps:
1. Lock it.
2. One holder.
3. Select option C.
Answer: (C) | operating_systems |
Encapsulation bundles. | {
"A": "Loop",
"B": "Sort",
"C": "Encapsulation",
"D": "Search"
} | cs_0402 | multiple_choice | en | Which bundles data and methods (case 2)? | [
"Hide inside.",
"One unit.",
"Select option C."
] | computer_science | Answer: Encapsulation.
Steps:
1. Hide inside.
2. One unit.
3. Select option C.
Answer: (C) | oop |
Steps = 7. | {
"A": "6",
"B": "8",
"C": "7",
"D": "128"
} | cs_0403 | multiple_choice | cs | Kolik kroků binárně pro n = 128? | [
"log2(128)=7.",
"Halve 7x.",
"Select option C."
] | computer_science | Answer: 7.
Steps:
1. log2(128)=7.
2. Halve 7x.
3. Select option C.
Answer: (C) | algorithms |
Iterations = 27. | {
"A": "9",
"B": "27",
"C": "18",
"D": "12"
} | cs_0404 | multiple_choice | en | Triple loops n = 3. How many iterations? | [
"3^3.",
"=27.",
"Select option B."
] | computer_science | Answer: 27.
Steps:
1. 3^3.
2. =27.
3. Select option B.
Answer: (B) | complexity |
K7 has 21 edges. | {
"A": "20",
"B": "21",
"C": "22",
"D": "49"
} | cs_0405 | multiple_choice | en | How many edges in K7? | [
"n(n-1)/2.",
"=21.",
"Select option B."
] | computer_science | Answer: 21.
Steps:
1. n(n-1)/2.
2. =21.
3. Select option B.
Answer: (B) | data_structures |
Asyncio runs concurrent I/O with async and await. | null | cs_0406 | concept | en | What is asyncio used for? | [
"Async def.",
"Await pauses.",
"Event loop runs."
] | computer_science | Answer: Concurrent I/O.
Steps:
1. Async def.
2. Await pauses.
3. Event loop runs. | python |
Repeat gives 'abababab'. | null | cs_0407 | worked_example | en | What does 'ab'.repeat(4) give? | [
"Repeat.",
"4x.",
"'abababab'."
] | computer_science | Answer: 'abababab'.
Steps:
1. Repeat.
2. 4x.
3. 'abababab'. | javascript |
MAX is 8. | {
"A": "6",
"B": "7",
"C": "9",
"D": "8"
} | cs_0408 | multiple_choice | en | Which value does SELECT MAX of (6,8,7) give? | [
"Compare.",
"Largest 8.",
"Select option D."
] | computer_science | Answer: 8.
Steps:
1. Compare.
2. Largest 8.
3. Select option D.
Answer: (D) | sql |
UDP suits low-latency loss-tolerant traffic like calls. | null | cs_0409 | concept | en | What is UDP used for? | [
"No handshake.",
"No retry.",
"Low overhead."
] | computer_science | Answer: Fast datagrams.
Steps:
1. No handshake.
2. No retry.
3. Low overhead. | networking |
Max = 12. | null | cs_0410 | worked_example | en | Cross-join 3 and 4 rows (case 1). Max? | [
"3x4.",
"=12.",
"12."
] | computer_science | Answer: 12.
Steps:
1. 3x4.
2. =12.
3. 12. | databases |
Kernel manages. | {
"A": "Shell",
"B": "App",
"C": "Driver",
"D": "Kernel"
} | cs_0411 | multiple_choice | cs | Co řídí zdroje (případ 3)? | [
"Core role.",
"CPU mem.",
"Select option D."
] | computer_science | Answer: Kernel.
Steps:
1. Core role.
2. CPU mem.
3. Select option D.
Answer: (D) | operating_systems |
Area = 20. | null | cs_0412 | worked_example | en | Rectangle 4 by 5 (case 1). Area? | [
"4x5.",
"=20.",
"20."
] | computer_science | Answer: 20.
Steps:
1. 4x5.
2. =20.
3. 20. | oop |
Backtracking tries options and undoes failing paths. | null | cs_0413 | concept | en | What is backtracking? | [
"Choose step.",
"Recurse on.",
"Undo if fail."
] | computer_science | Answer: Try and undo.
Steps:
1. Choose step.
2. Recurse on.
3. Undo if fail. | algorithms |
Pseudo-polynomial depends on numeric values, not just input length. | null | cs_0414 | concept | en | What is pseudo-polynomial time? | [
"Knapsack case.",
"Big numbers slow.",
"Not true poly."
] | computer_science | Answer: Value dependent.
Steps:
1. Knapsack case.
2. Big numbers slow.
3. Not true poly. | complexity |
Edges = 45. | null | cs_0415 | worked_example | en | Edges in K10 (case 2). Count? | [
"n(n-1)/2.",
"=45.",
"45."
] | computer_science | Answer: 45.
Steps:
1. n(n-1)/2.
2. =45.
3. 45. | data_structures |
max is 4. | null | cs_0416 | worked_example | en | What does max([1,4,2]) return? | [
"Compare three.",
"Largest 4.",
"Result 4."
] | computer_science | Answer: 4.
Steps:
1. Compare three.
2. Largest 4.
3. Result 4. | python |
The event loop runs queued callbacks when the stack is empty. | null | cs_0417 | concept | en | What is the event loop? | [
"Stack first.",
"Queue next.",
"Async appears."
] | computer_science | Answer: Queued callbacks.
Steps:
1. Stack first.
2. Queue next.
3. Async appears. | javascript |
Result is 0. | null | cs_0418 | worked_example | en | Compute SELECT 12 % 3. | [
"Modulo.",
"12%3=0.",
"0."
] | computer_science | Answer: 0.
Steps:
1. Modulo.
2. 12%3=0.
3. 0. | sql |
UDP is connectionless. | {
"A": "TCP",
"B": "HTTP",
"C": "UDP",
"D": "IP"
} | cs_0419 | multiple_choice | en | What is connectionless (case 2)? | [
"No handshake.",
"UDP fits.",
"Select option C."
] | computer_science | Answer: UDP.
Steps:
1. No handshake.
2. UDP fits.
3. Select option C.
Answer: (C) | networking |
Count = 7. | null | cs_0420 | worked_example | en | INSERT 7 rows into empty (case 2). Count? | [
"Start 0.",
"Add 7.",
"7."
] | computer_science | Answer: 7.
Steps:
1. Start 0.
2. Add 7.
3. 7. | databases |
FIFO evicts oldest. | {
"A": "FIFO",
"B": "LIFO",
"C": "LRU",
"D": "Random"
} | cs_0421 | multiple_choice | en | Which evicts oldest page (case 4)? | [
"Queue order.",
"Oldest first.",
"Select option A."
] | computer_science | Answer: FIFO.
Steps:
1. Queue order.
2. Oldest first.
3. Select option A.
Answer: (A) | operating_systems |
Inheritance reuses. | {
"A": "Loop",
"B": "Recursion",
"C": "Sorting",
"D": "Inheritance"
} | cs_0422 | multiple_choice | en | Which reuses parent behavior (case 3)? | [
"Child extends.",
"Gets methods.",
"Select option D."
] | computer_science | Answer: Inheritance.
Steps:
1. Child extends.
2. Gets methods.
3. Select option D.
Answer: (D) | oop |
factorial(8) = 40320. | null | cs_0423 | worked_example | en | Compute factorial(8) (case 2). | [
"Expand.",
"Product.",
"40320."
] | computer_science | Answer: 40320.
Steps:
1. Expand.
2. Product.
3. 40320. | algorithms |
Master theorem solves divide-and-conquer recurrences quickly. | null | cs_0424 | concept | en | What is the master theorem? | [
"Compare parts.",
"Pick case.",
"Gives Big-O."
] | computer_science | Answer: Recurrence solver.
Steps:
1. Compare parts.
2. Pick case.
3. Gives Big-O. | complexity |
A deque allows push and pop on both ends. | null | cs_0425 | concept | en | What is a deque? | [
"Left right.",
"O(1) ends.",
"Flexible."
] | computer_science | Answer: Both ends.
Steps:
1. Left right.
2. O(1) ends.
3. Flexible. | data_structures |
x becomes [1, 2, 12]. | null | cs_0426 | worked_example | en | x=[1,2]; x.append(12). What is x? | [
"Start [1,2].",
"Append 12.",
"x=[1, 2, 12]."
] | computer_science | Answer: [1, 2, 12].
Steps:
1. Start [1,2].
2. Append 12.
3. x=[1, 2, 12]. | python |
12%4 is 0. | {
"A": "1",
"B": "2",
"C": "0",
"D": "4"
} | cs_0427 | multiple_choice | en | What does 12 % 4 give in JavaScript? | [
"Remainder.",
"12%4=0.",
"Select option C."
] | computer_science | Answer: 0.
Steps:
1. Remainder.
2. 12%4=0.
3. Select option C.
Answer: (C) | javascript |
LENGTH is 6. | null | cs_0428 | worked_example | en | Compute SELECT LENGTH('hello3'). | [
"Count chars.",
"'hello3'.",
"6."
] | computer_science | Answer: 6.
Steps:
1. Count chars.
2. 'hello3'.
3. 6. | sql |
ARP maps IP to MAC. | {
"A": "IP to port",
"B": "MAC to IP",
"C": "Port to MAC",
"D": "IP to MAC"
} | cs_0429 | multiple_choice | en | What does ARP map (case 3)? | [
"LAN lookup.",
"IP to MAC.",
"Select option D."
] | computer_science | Answer: IP to MAC.
Steps:
1. LAN lookup.
2. IP to MAC.
3. Select option D.
Answer: (D) | networking |
Returned = 5. | null | cs_0430 | worked_example | en | 13 rows, WHERE matches 5 (case 3). Returned? | [
"Total 13.",
"Match 5.",
"5."
] | computer_science | Answer: 5.
Steps:
1. Total 13.
2. Match 5.
3. 5. | databases |
Copy-on-write shares pages until a write forces a copy. | null | cs_0431 | concept | en | What is copy-on-write? | [
"Fork shares.",
"Write copies.",
"Saves memory."
] | computer_science | Answer: Share until write.
Steps:
1. Fork shares.
2. Write copies.
3. Saves memory. | operating_systems |
An abstract class cannot instantiate and defines required methods. | null | cs_0432 | concept | en | What is an abstract class? | [
"No direct make.",
"Subclass fills.",
"Enforces API."
] | computer_science | Answer: Unfinished blueprint.
Steps:
1. No direct make.
2. Subclass fills.
3. Enforces API. | oop |
DP solves overlapping subproblems once and reuses answers. | null | cs_0433 | concept | en | What is dynamic programming? | [
"Memo table.",
"Bottom up.",
"Optimal parts."
] | computer_science | Answer: Reuse subanswers.
Steps:
1. Memo table.
2. Bottom up.
3. Optimal parts. | algorithms |
200 vs 40000. | null | cs_0434 | worked_example | en | O(n) vs O(n^2) n=200 (case 3). Steps? | [
"O(n)=200.",
"O(n^2)=40000.",
"Done."
] | computer_science | Answer: 200 vs 40000.
Steps:
1. O(n)=200.
2. O(n^2)=40000.
3. Done. | complexity |
A trie stores strings by shared prefixes for fast lookup. | null | cs_0435 | concept | en | What is a trie? | [
"Char nodes.",
"Share start.",
"Word end."
] | computer_science | Answer: Prefix tree.
Steps:
1. Char nodes.
2. Share start.
3. Word end. | data_structures |
12%5 je 2. | {
"A": "3",
"B": "4",
"C": "2",
"D": "5"
} | cs_0436 | multiple_choice | cs | Co vrátí 12 % 5 v Pythonu? | [
"Zbytek.",
"12%5=2.",
"Vyber možnost C."
] | computer_science | Answer: 2.
Steps:
1. Zbytek.
2. 12%5=2.
3. Vyber možnost C.
Answer: (C) | python |
Math.floor(3.7) is 3. | null | cs_0437 | worked_example | en | What does Math.floor(3.7) give? | [
"Round down.",
"3.7 to 3.",
"3."
] | computer_science | Answer: 3.
Steps:
1. Round down.
2. 3.7 to 3.
3. 3. | javascript |
MIN is 9. | null | cs_0438 | worked_example | en | Compute SELECT MIN of (9,12). | [
"Compare.",
"Smallest 9.",
"9."
] | computer_science | Answer: 9.
Steps:
1. Compare.
2. Smallest 9.
3. 9. | sql |
Time = 3.5 s. | null | cs_0439 | worked_example | en | Download 70 MB at 20 MB/s (case 2). Seconds? | [
"Size 70.",
"Rate 20.",
"3.5 s."
] | computer_science | Answer: 3.5.
Steps:
1. Size 70.
2. Rate 20.
3. 3.5 s. | networking |
Index speeds reads. | {
"A": "Deletes data",
"B": "Drops table",
"C": "Speeds reads",
"D": "Stops DB"
} | cs_0440 | multiple_choice | cs | K čemu je index (případ 2)? | [
"Lookup aid.",
"Faster.",
"Select option C."
] | computer_science | Answer: Speeds reads.
Steps:
1. Lookup aid.
2. Faster.
3. Select option C.
Answer: (C) | databases |
Thrashing is excess paging that stalls useful work. | null | cs_0441 | concept | en | What is thrashing? | [
"Too few frames.",
"Swap always.",
"Throughput falls."
] | computer_science | Answer: Paging storm.
Steps:
1. Too few frames.
2. Swap always.
3. Throughput falls. | operating_systems |
Value = 8. | null | cs_0442 | worked_example | en | Counter 7, inc() (case 2). Value? | [
"Start 7.",
"Plus 1.",
"8."
] | computer_science | Answer: 8.
Steps:
1. Start 7.
2. Plus 1.
3. 8. | oop |
A spanning tree connects all vertices with fewest edges. | null | cs_0443 | concept | en | What is a spanning tree? | [
"V-1 edges.",
"No cycles.",
"Min variant."
] | computer_science | Answer: Connect all.
Steps:
1. V-1 edges.
2. No cycles.
3. Min variant. | algorithms |
Průměrná konstantní cena přes mnoho operací. | null | cs_0444 | concept | cs | Co je amortizovaná složitost O(1)? | [
"Občas drahá.",
"Většinou levná.",
"Pole."
] | computer_science | Answer: Průměrná konstanta.
Steps:
1. Občas drahá.
2. Většinou levná.
3. Pole. | complexity |
Kruhová fronta obtáčí indexy. | null | cs_0445 | concept | cs | Co je kruhová fronta? | [
"Hlava pata.",
"Modulo.",
"Pevná velikost."
] | computer_science | Answer: Obtočený buffer.
Steps:
1. Hlava pata.
2. Modulo.
3. Pevná velikost. | data_structures |
Result is [5, 6, 7]. | null | cs_0446 | worked_example | en | What does list(range(5,8)) give? | [
"From 5.",
"To 7.",
"[5, 6, 7]."
] | computer_science | Answer: [5, 6, 7].
Steps:
1. From 5.
2. To 7.
3. [5, 6, 7]. | python |
4+9 is 13. | null | cs_0447 | worked_example | en | What does 4 + 9 give in JavaScript? | [
"Add.",
"=13.",
"13."
] | computer_science | Answer: 13.
Steps:
1. Add.
2. =13.
3. 13. | javascript |
Poddotaz je SELECT vnořený v jiném dotazu. | null | cs_0448 | concept | cs | Co je poddotaz? | [
"Vnitřní běží.",
"Vnější použije.",
"Ve WHERE či FROM."
] | computer_science | Answer: Vnořený SELECT.
Steps:
1. Vnitřní běží.
2. Vnější použije.
3. Ve WHERE či FROM. | sql |
TCP otevírá spojením SYN, SYN-ACK a ACK. | null | cs_0449 | concept | cs | Co je TCP handshake? | [
"SYN ven.",
"SYN-ACK zpět.",
"ACK potvrdí."
] | computer_science | Answer: Trojcestné otevření.
Steps:
1. SYN ven.
2. SYN-ACK zpět.
3. ACK potvrdí. | networking |
Remain = 9. | null | cs_0450 | worked_example | en | Table has 14 rows, DELETE removes 5 (case 4). Remain? | [
"Start 14.",
"Minus 5.",
"9."
] | computer_science | Answer: 9.
Steps:
1. Start 14.
2. Minus 5.
3. 9. | databases |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.