File size: 283,885 Bytes
0b8fa4f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
{"answer": "Binary search halves a sorted array each step, reaching O(log n) time.", "choices": null, "id": "cs_0001", "kind": "concept", "lang": "en", "question": "How does binary search work?", "steps": ["Require a sorted array.", "Compare middle to target.", "Recurse into the matching half."], "subject": "computer_science", "text": "Answer: Halve sorted array each step.\nSteps:\n1. Require a sorted array.\n2. Compare middle to target.\n3. Recurse into the matching half.", "topic": "algorithms"}
{"answer": "Binary search runs in O(log n) time on sorted data.", "choices": {"A": "O(n)", "B": "O(log n)", "C": "O(n log n)", "D": "O(1)"}, "id": "cs_0002", "kind": "multiple_choice", "lang": "en", "question": "What is the time complexity of binary search?", "steps": ["Halving each step.", "Log steps total.", "Select option B."], "subject": "computer_science", "text": "Answer: O(log n).\nSteps:\n1. Halving each step.\n2. Log steps total.\n3. Select option B.\nAnswer: (B)", "topic": "algorithms"}
{"answer": "Finding 7 takes 4 comparisons: mids 8, 4, 6, then 7.", "choices": null, "id": "cs_0003", "kind": "worked_example", "lang": "en", "question": "Binary search for 7 in [1..15]. How many comparisons?", "steps": ["Mid of 1-15 is 8: go left.", "Mid of 1-7 is 4: go right.", "Mid of 5-7 is 6: go right; mid of 7-7 is 7: found in 4."], "subject": "computer_science", "text": "Answer: 4 comparisons.\nSteps:\n1. Mid of 1-15 is 8: go left.\n2. Mid of 1-7 is 4: go right.\n3. Mid of 5-7 is 6: go right; mid of 7-7 is 7: found in 4.", "topic": "algorithms"}
{"answer": "Binární vyhledávání půlí seřazené pole a běží v čase O(log n).", "choices": null, "id": "cs_0004", "kind": "concept", "lang": "cs", "question": "Co je binární vyhledávání?", "steps": ["Vyžaduje seřazené pole.", "Porovná střed s cílem.", "Pokračuje v polovině."], "subject": "computer_science", "text": "Answer: Půlení seřazeného pole.\nSteps:\n1. Vyžaduje seřazené pole.\n2. Porovná střed s cílem.\n3. Pokračuje v polovině.", "topic": "algorithms"}
{"answer": "Quicksort averages O(n log n) via partitioning around pivots.", "choices": {"A": "O(n)", "B": "O(log n)", "C": "O(n log n)", "D": "O(n^2) average"}, "id": "cs_0005", "kind": "multiple_choice", "lang": "en", "question": "What is quicksort's average complexity?", "steps": ["Partition around pivot.", "Recurse both sides.", "Select option C."], "subject": "computer_science", "text": "Answer: O(n log n).\nSteps:\n1. Partition around pivot.\n2. Recurse both sides.\n3. Select option C.\nAnswer: (C)", "topic": "algorithms"}
{"answer": "Bubble sort needs 2 swaps: [3,1,2] -> [1,3,2] -> [1,2,3].", "choices": null, "id": "cs_0006", "kind": "worked_example", "lang": "en", "question": "How many swaps bubble-sort [3,1,2]?", "steps": ["Compare 3,1: swap to [1,3,2].", "Compare 3,2: swap to [1,2,3].", "Total swaps = 2."], "subject": "computer_science", "text": "Answer: 2 swaps.\nSteps:\n1. Compare 3,1: swap to [1,3,2].\n2. Compare 3,2: swap to [1,2,3].\n3. Total swaps = 2.", "topic": "algorithms"}
{"answer": "Merge sort splits the array, sorts halves, and merges them in O(n log n).", "choices": null, "id": "cs_0007", "kind": "concept", "lang": "en", "question": "How does merge sort work?", "steps": ["Divide array in half.", "Sort each half.", "Merge sorted halves."], "subject": "computer_science", "text": "Answer: Divide, sort, merge.\nSteps:\n1. Divide array in half.\n2. Sort each half.\n3. Merge sorted halves.", "topic": "algorithms"}
{"answer": "Lineárním vyhledáváním najdeme 5 na 3. porovnání.", "choices": null, "id": "cs_0008", "kind": "worked_example", "lang": "cs", "question": "Kolik porovnání najde 5 v [2,4,5,7] lineárně?", "steps": ["Porovnej 2: ne.", "Porovnej 4: ne.", "Porovnej 5: ano, celkem 3."], "subject": "computer_science", "text": "Answer: 3 porovnání.\nSteps:\n1. Porovnej 2: ne.\n2. Porovnej 4: ne.\n3. Porovnej 5: ano, celkem 3.", "topic": "algorithms"}
{"answer": "Merge sort is stable: equal elements keep their order.", "choices": {"A": "Merge sort", "B": "Quicksort", "C": "Heap sort", "D": "Selection sort"}, "id": "cs_0009", "kind": "multiple_choice", "lang": "en", "question": "Which sort is stable?", "steps": ["Stable keeps equal order.", "Merge sort qualifies.", "Select option A."], "subject": "computer_science", "text": "Answer: Merge sort.\nSteps:\n1. Stable keeps equal order.\n2. Merge sort qualifies.\n3. Select option A.\nAnswer: (A)", "topic": "algorithms"}
{"answer": "Every recursion needs a base case that stops the calls.", "choices": null, "id": "cs_0010", "kind": "concept", "lang": "en", "question": "What is a base case in recursion?", "steps": ["Recursive calls shrink input.", "Base case returns directly.", "Without it, stack overflows."], "subject": "computer_science", "text": "Answer: Stopping condition.\nSteps:\n1. Recursive calls shrink input.\n2. Base case returns directly.\n3. Without it, stack overflows.", "topic": "algorithms"}
{"answer": "factorial(5) = 120, from 5 x 4 x 3 x 2 x 1.", "choices": null, "id": "cs_0011", "kind": "worked_example", "lang": "en", "question": "Compute factorial(5) recursively.", "steps": ["5 x factorial(4).", "Unwind: 5x4x3x2x1.", "Result = 120."], "subject": "computer_science", "text": "Answer: 120.\nSteps:\n1. 5 x factorial(4).\n2. Unwind: 5x4x3x2x1.\n3. Result = 120.", "topic": "algorithms"}
{"answer": "DFS uses a stack to explore deep before wide.", "choices": {"A": "Queue", "B": "Heap", "C": "Tree", "D": "Stack"}, "id": "cs_0012", "kind": "multiple_choice", "lang": "en", "question": "Which structure does DFS use?", "steps": ["DFS goes deep first.", "Stack gives LIFO.", "Select option D."], "subject": "computer_science", "text": "Answer: Stack.\nSteps:\n1. DFS goes deep first.\n2. Stack gives LIFO.\n3. Select option D.\nAnswer: (D)", "topic": "algorithms"}
{"answer": "Rekurze je volání funkce sebe sama s ukončovací podmínkou.", "choices": null, "id": "cs_0013", "kind": "concept", "lang": "cs", "question": "Co je rekurze?", "steps": ["Funkce volá sebe.", "Vstup se zmenšuje.", "Báze zastaví volání."], "subject": "computer_science", "text": "Answer: Sebevolání s bází.\nSteps:\n1. Funkce volá sebe.\n2. Vstup se zmenšuje.\n3. Báze zastaví volání.", "topic": "algorithms"}
{"answer": "BFS expands level by level, so first visit is shortest in unweighted graphs.", "choices": {"A": "Longest path", "B": "Shortest path", "C": "Random path", "D": "No path"}, "id": "cs_0014", "kind": "multiple_choice", "lang": "en", "question": "What does BFS find in unweighted graphs?", "steps": ["Levels expand evenly.", "First hit is nearest.", "Select option B."], "subject": "computer_science", "text": "Answer: Shortest path.\nSteps:\n1. Levels expand evenly.\n2. First hit is nearest.\n3. Select option B.\nAnswer: (B)", "topic": "algorithms"}
{"answer": "Insertion sort gives [2,4,5]: insert 2 first, then 4.", "choices": null, "id": "cs_0015", "kind": "worked_example", "lang": "en", "question": "Insertion-sort [5,2,4]. What are the steps?", "steps": ["Insert 2 before 5: [2,5,4].", "Insert 4 between: [2,4,5].", "Sorted in 2 insertions."], "subject": "computer_science", "text": "Answer: [2,4,5].\nSteps:\n1. Insert 2 before 5: [2,5,4].\n2. Insert 4 between: [2,4,5].\n3. Sorted in 2 insertions.", "topic": "algorithms"}
{"answer": "Big-O bounds growth rate, ignoring constants and small inputs.", "choices": null, "id": "cs_0016", "kind": "concept", "lang": "en", "question": "What is Big-O notation?", "steps": ["Measures growth with n.", "Keeps dominant term.", "Example: O(n^2)."], "subject": "computer_science", "text": "Answer: Growth-rate bound.\nSteps:\n1. Measures growth with n.\n2. Keeps dominant term.\n3. Example: O(n^2).", "topic": "complexity"}
{"answer": "Nested loops over n each give O(n^2) time.", "choices": {"A": "O(n)", "B": "O(log n)", "C": "O(n^2)", "D": "O(1)"}, "id": "cs_0017", "kind": "multiple_choice", "lang": "en", "question": "Two nested loops over n give what complexity?", "steps": ["Inner runs n per outer.", "Total n x n.", "Select option C."], "subject": "computer_science", "text": "Answer: O(n^2).\nSteps:\n1. Inner runs n per outer.\n2. Total n x n.\n3. Select option C.\nAnswer: (C)", "topic": "complexity"}
{"answer": "A double loop with n = 100 runs 10,000 iterations.", "choices": null, "id": "cs_0018", "kind": "worked_example", "lang": "en", "question": "How many iterations for nested loops with n = 100?", "steps": ["Outer runs 100 times.", "Inner runs 100 each.", "Total = 100 x 100 = 10,000."], "subject": "computer_science", "text": "Answer: 10,000.\nSteps:\n1. Outer runs 100 times.\n2. Inner runs 100 each.\n3. Total = 100 x 100 = 10,000.", "topic": "complexity"}
{"answer": "Časová složitost měří růst doby běhu s velikostí vstupu.", "choices": null, "id": "cs_0019", "kind": "concept", "lang": "cs", "question": "Co je časová složitost?", "steps": ["Závislost na n.", "Zápis O(...).", "Příklad: O(n log n)."], "subject": "computer_science", "text": "Answer: Růst doby s n.\nSteps:\n1. Závislost na n.\n2. Zápis O(...).\n3. Příklad: O(n log n).", "topic": "complexity"}
{"answer": "Linear search best case finds the target first: O(1).", "choices": {"A": "O(n)", "B": "O(log n)", "C": "O(n^2)", "D": "O(1)"}, "id": "cs_0020", "kind": "multiple_choice", "lang": "en", "question": "What is linear search's best case?", "steps": ["Target at index 0.", "One comparison.", "Select option D."], "subject": "computer_science", "text": "Answer: O(1).\nSteps:\n1. Target at index 0.\n2. One comparison.\n3. Select option D.\nAnswer: (D)", "topic": "complexity"}
{"answer": "Worst case bounds the slowest input; average case weights typical inputs.", "choices": null, "id": "cs_0021", "kind": "concept", "lang": "en", "question": "How do worst and average case differ?", "steps": ["Worst: slowest input.", "Average: typical input.", "Quicksort: O(n^2) vs O(n log n)."], "subject": "computer_science", "text": "Answer: Slowest versus typical.\nSteps:\n1. Worst: slowest input.\n2. Average: typical input.\n3. Quicksort: O(n^2) vs O(n log n).", "topic": "complexity"}
{"answer": "Binary search on 1024 items needs at most 10 steps, since log2(1024) = 10.", "choices": null, "id": "cs_0022", "kind": "worked_example", "lang": "en", "question": "How many binary search steps for n = 1024?", "steps": ["Steps = log2(n).", "log2(1024) = 10.", "At most 10 steps."], "subject": "computer_science", "text": "Answer: 10 steps.\nSteps:\n1. Steps = log2(n).\n2. log2(1024) = 10.\n3. At most 10 steps.", "topic": "complexity"}
{"answer": "Dvě vnořené smyčky po 50 dají 2500 operací.", "choices": null, "id": "cs_0023", "kind": "worked_example", "lang": "cs", "question": "Kolik operací mají vnořené smyčky n = 50?", "steps": ["Vnější běží 50krát.", "Vnitřní pokaždé 50krát.", "Celkem 50 x 50 = 2500."], "subject": "computer_science", "text": "Answer: 2500.\nSteps:\n1. Vnější běží 50krát.\n2. Vnitřní pokaždé 50krát.\n3. Celkem 50 x 50 = 2500.", "topic": "complexity"}
{"answer": "O(1) means constant time regardless of input size.", "choices": {"A": "Linear time", "B": "Constant time", "C": "Log time", "D": "Quadratic time"}, "id": "cs_0024", "kind": "multiple_choice", "lang": "en", "question": "What does O(1) mean?", "steps": ["No growth with n.", "Fixed cost.", "Select option B."], "subject": "computer_science", "text": "Answer: Constant time.\nSteps:\n1. No growth with n.\n2. Fixed cost.\n3. Select option B.\nAnswer: (B)", "topic": "complexity"}
{"answer": "Space complexity measures extra memory growth with input size.", "choices": null, "id": "cs_0025", "kind": "concept", "lang": "en", "question": "What is space complexity?", "steps": ["Count extra memory.", "Express in n.", "Example: merge sort O(n)."], "subject": "computer_science", "text": "Answer: Memory growth with n.\nSteps:\n1. Count extra memory.\n2. Express in n.\n3. Example: merge sort O(n).", "topic": "complexity"}
{"answer": "Iterative binary search uses O(1) extra space with two indices.", "choices": null, "id": "cs_0026", "kind": "worked_example", "lang": "en", "question": "What extra space does iterative binary search use?", "steps": ["Only lo/hi indices stored.", "No recursion stack.", "Extra space = O(1)."], "subject": "computer_science", "text": "Answer: O(1).\nSteps:\n1. Only lo/hi indices stored.\n2. No recursion stack.\n3. Extra space = O(1).", "topic": "complexity"}
{"answer": "Bad pivots degrade quicksort to O(n^2) worst case.", "choices": {"A": "O(n)", "B": "O(log n)", "C": "O(n^2)", "D": "O(1)"}, "id": "cs_0027", "kind": "multiple_choice", "lang": "en", "question": "What is quicksort's worst case?", "steps": ["Pivot splits 1 vs n-1.", "Depth becomes n.", "Select option C."], "subject": "computer_science", "text": "Answer: O(n^2).\nSteps:\n1. Pivot splits 1 vs n-1.\n2. Depth becomes n.\n3. Select option C.\nAnswer: (C)", "topic": "complexity"}
{"answer": "Amortizovaná složitost průměruje cenu operací v sekvenci.", "choices": null, "id": "cs_0028", "kind": "concept", "lang": "cs", "question": "Co je amortizovaná složitost?", "steps": ["Drahé operace vzácné.", "Průměr přes sekvenci.", "Příklad: append O(1)."], "subject": "computer_science", "text": "Answer: Průměrná cena v sekvenci.\nSteps:\n1. Drahé operace vzácné.\n2. Průměr přes sekvenci.\n3. Příklad: append O(1).", "topic": "complexity"}
{"answer": "The sum 1..100 is 5050, from 100 x 101 / 2.", "choices": null, "id": "cs_0029", "kind": "worked_example", "lang": "en", "question": "Compute the sum 1 + 2 + ... + 100.", "steps": ["Formula: n(n+1)/2.", "Substitute: 100 x 101/2.", "Sum = 5050."], "subject": "computer_science", "text": "Answer: 5050.\nSteps:\n1. Formula: n(n+1)/2.\n2. Substitute: 100 x 101/2.\n3. Sum = 5050.", "topic": "complexity"}
{"answer": "NP problems verify in polynomial time; P also solves in polynomial time.", "choices": {"A": "Verifiable fast", "B": "Solvable fast", "C": "Unsolvable", "D": "Trivial"}, "id": "cs_0030", "kind": "multiple_choice", "lang": "en", "question": "What defines class NP?", "steps": ["Solutions check quickly.", "Finding may be slow.", "Select option A."], "subject": "computer_science", "text": "Answer: Verifiable fast.\nSteps:\n1. Solutions check quickly.\n2. Finding may be slow.\n3. Select option A.\nAnswer: (A)", "topic": "complexity"}
{"answer": "Arrays index in O(1) but insert slowly; linked lists insert fast but index in O(n).", "choices": null, "id": "cs_0031", "kind": "concept", "lang": "en", "question": "How do arrays and linked lists differ?", "steps": ["Array: contiguous, O(1) index.", "List: nodes, O(n) index.", "List inserts in O(1) given node."], "subject": "computer_science", "text": "Answer: Index speed versus insert speed.\nSteps:\n1. Array: contiguous, O(1) index.\n2. List: nodes, O(n) index.\n3. List inserts in O(1) given node.", "topic": "data_structures"}
{"answer": "Array indexing is O(1) via address arithmetic.", "choices": {"A": "O(n)", "B": "O(1)", "C": "O(log n)", "D": "O(n^2)"}, "id": "cs_0032", "kind": "multiple_choice", "lang": "en", "question": "What is array index access time?", "steps": ["Base plus offset.", "Single step.", "Select option B."], "subject": "computer_science", "text": "Answer: O(1).\nSteps:\n1. Base plus offset.\n2. Single step.\n3. Select option B.\nAnswer: (B)", "topic": "data_structures"}
{"answer": "After pushing 1, 2, 3, pop returns 3 (LIFO).", "choices": null, "id": "cs_0033", "kind": "worked_example", "lang": "en", "question": "Push 1, 2, 3 onto a stack. What does pop return?", "steps": ["Stack top is 3.", "Pop removes top.", "Returns 3."], "subject": "computer_science", "text": "Answer: 3.\nSteps:\n1. Stack top is 3.\n2. Pop removes top.\n3. Returns 3.", "topic": "data_structures"}
{"answer": "Zásobník je LIFO struktura s operacemi push a pop.", "choices": null, "id": "cs_0034", "kind": "concept", "lang": "cs", "question": "Co je zásobník (stack)?", "steps": ["Poslední dovnitř, první ven.", "Operace push a pop.", "Příklad: zásobník volání."], "subject": "computer_science", "text": "Answer: LIFO struktura.\nSteps:\n1. Poslední dovnitř, první ven.\n2. Operace push a pop.\n3. Příklad: zásobník volání.", "topic": "data_structures"}
{"answer": "A queue is FIFO: first in, first out.", "choices": {"A": "FIFO", "B": "LIFO", "C": "LILO", "D": "FILO"}, "id": "cs_0035", "kind": "multiple_choice", "lang": "en", "question": "What order does a queue use?", "steps": ["Enqueue at back.", "Dequeue from front.", "Select option A."], "subject": "computer_science", "text": "Answer: FIFO.\nSteps:\n1. Enqueue at back.\n2. Dequeue from front.\n3. Select option A.\nAnswer: (A)", "topic": "data_structures"}
{"answer": "After enqueueing 1, 2, dequeue returns 1 (FIFO).", "choices": null, "id": "cs_0036", "kind": "worked_example", "lang": "en", "question": "Enqueue 1, 2 into a queue. What does dequeue return?", "steps": ["Front holds 1.", "Dequeue removes front.", "Returns 1."], "subject": "computer_science", "text": "Answer: 1.\nSteps:\n1. Front holds 1.\n2. Dequeue removes front.\n3. Returns 1.", "topic": "data_structures"}
{"answer": "Collisions occur when two keys hash to one slot, fixed by chaining or probing.", "choices": null, "id": "cs_0037", "kind": "concept", "lang": "en", "question": "What is a hash collision?", "steps": ["Two keys, one slot.", "Chain them in a list.", "Or probe next slots."], "subject": "computer_science", "text": "Answer: Two keys, one slot.\nSteps:\n1. Two keys, one slot.\n2. Chain them in a list.\n3. Or probe next slots.", "topic": "data_structures"}
{"answer": "Klíč 7 v tabulce velikosti 5 patří na index 2.", "choices": null, "id": "cs_0038", "kind": "worked_example", "lang": "cs", "question": "Kam patří klíč 7 v hash tabulce velikosti 5?", "steps": ["Spočti 7 mod 5.", "Zbytek je 2.", "Index = 2."], "subject": "computer_science", "text": "Answer: 2.\nSteps:\n1. Spočti 7 mod 5.\n2. Zbytek je 2.\n3. Index = 2.", "topic": "data_structures"}
{"answer": "Balanced BST search averages O(log n).", "choices": {"A": "O(n)", "B": "O(1)", "C": "O(log n)", "D": "O(n^2)"}, "id": "cs_0039", "kind": "multiple_choice", "lang": "en", "question": "What is average BST search time?", "steps": ["Halve tree each step.", "Depth is log n.", "Select option C."], "subject": "computer_science", "text": "Answer: O(log n).\nSteps:\n1. Halve tree each step.\n2. Depth is log n.\n3. Select option C.\nAnswer: (C)", "topic": "data_structures"}
{"answer": "Inorder visits left-root-right; preorder root-first; postorder root-last.", "choices": null, "id": "cs_0040", "kind": "concept", "lang": "en", "question": "What are the tree traversal orders?", "steps": ["Inorder: left, root, right.", "Preorder: root first.", "Postorder: root last."], "subject": "computer_science", "text": "Answer: Inorder, preorder, postorder.\nSteps:\n1. Inorder: left, root, right.\n2. Preorder: root first.\n3. Postorder: root last.", "topic": "data_structures"}
{"answer": "Inorder of root 2 with children 1, 3 gives 1, 2, 3.", "choices": null, "id": "cs_0041", "kind": "worked_example", "lang": "en", "question": "Inorder-traverse root 2, left 1, right 3. What order?", "steps": ["Visit left: 1.", "Visit root: 2.", "Visit right: 3."], "subject": "computer_science", "text": "Answer: 1, 2, 3.\nSteps:\n1. Visit left: 1.\n2. Visit root: 2.\n3. Visit right: 3.", "topic": "data_structures"}
{"answer": "A min-heap root always holds the smallest element.", "choices": {"A": "Largest", "B": "Median", "C": "Random", "D": "Smallest"}, "id": "cs_0042", "kind": "multiple_choice", "lang": "en", "question": "What does a min-heap root hold?", "steps": ["Heap orders by extremum.", "Min-heap keeps min top.", "Select option D."], "subject": "computer_science", "text": "Answer: Smallest.\nSteps:\n1. Heap orders by extremum.\n2. Min-heap keeps min top.\n3. Select option D.\nAnswer: (D)", "topic": "data_structures"}
{"answer": "Fronta je datová struktura FIFO s operacemi enqueue a dequeue.", "choices": null, "id": "cs_0043", "kind": "concept", "lang": "cs", "question": "Co je fronta (queue)?", "steps": ["První dovnitř, první ven.", "Přidávání na konec.", "Odebírání ze začátku."], "subject": "computer_science", "text": "Answer: FIFO struktura.\nSteps:\n1. První dovnitř, první ven.\n2. Přidávání na konec.\n3. Odebírání ze začátku.", "topic": "data_structures"}
{"answer": "Head insertion only rewires one pointer: O(1).", "choices": {"A": "O(1)", "B": "O(n)", "C": "O(log n)", "D": "O(n^2)"}, "id": "cs_0044", "kind": "multiple_choice", "lang": "en", "question": "What is linked-list head insertion time?", "steps": ["Point new node at head.", "Update head.", "Select option A."], "subject": "computer_science", "text": "Answer: O(1).\nSteps:\n1. Point new node at head.\n2. Update head.\n3. Select option A.\nAnswer: (A)", "topic": "data_structures"}
{"answer": "The list 3 -> 5 -> 7 -> None has 3 nodes.", "choices": null, "id": "cs_0045", "kind": "worked_example", "lang": "en", "question": "How many nodes in 3 -> 5 -> 7 -> None?", "steps": ["Count 3.", "Count 5.", "Count 7: total 3."], "subject": "computer_science", "text": "Answer: 3.\nSteps:\n1. Count 3.\n2. Count 5.\n3. Count 7: total 3.", "topic": "data_structures"}
{"answer": "Lists are mutable while tuples are immutable in Python.", "choices": null, "id": "cs_0046", "kind": "concept", "lang": "en", "question": "How do Python lists and tuples differ?", "steps": ["Lists allow item changes.", "Tuples forbid them.", "Both support indexing."], "subject": "computer_science", "text": "Answer: Mutable versus immutable.\nSteps:\n1. Lists allow item changes.\n2. Tuples forbid them.\n3. Both support indexing.", "topic": "python"}
{"answer": "Tuples are immutable; lists, dicts, and sets are mutable.", "choices": {"A": "list", "B": "tuple", "C": "dict", "D": "set"}, "id": "cs_0047", "kind": "multiple_choice", "lang": "en", "question": "Which Python type is immutable?", "steps": ["Lists mutate.", "Dicts and sets mutate.", "Select option B."], "subject": "computer_science", "text": "Answer: tuple.\nSteps:\n1. Lists mutate.\n2. Dicts and sets mutate.\n3. Select option B.\nAnswer: (B)", "topic": "python"}
{"answer": "The comprehension yields [0, 2, 4] by doubling 0, 1, 2.", "choices": null, "id": "cs_0048", "kind": "worked_example", "lang": "en", "question": "What does [x*2 for x in range(3)] produce?", "steps": ["range(3) gives 0, 1, 2.", "Double each: 0, 2, 4.", "Result [0, 2, 4]."], "subject": "computer_science", "text": "Answer: [0, 2, 4].\nSteps:\n1. range(3) gives 0, 1, 2.\n2. Double each: 0, 2, 4.\n3. Result [0, 2, 4].", "topic": "python"}
{"answer": "Seznam je měnitelná posloupnost prvků v hranatých závorkách.", "choices": null, "id": "cs_0049", "kind": "concept", "lang": "cs", "question": "Co je seznam (list) v Pythonu?", "steps": ["Hranaté závorky.", "Prvky lze měnit.", "Indexování od 0."], "subject": "computer_science", "text": "Answer: Měnitelná posloupnost.\nSteps:\n1. Hranaté závorky.\n2. Prvky lze měnit.\n3. Indexování od 0.", "topic": "python"}
{"answer": "len('hello') counts 5 characters.", "choices": {"A": "4", "B": "6", "C": "5", "D": "0"}, "id": "cs_0050", "kind": "multiple_choice", "lang": "en", "question": "What is len('hello')?", "steps": ["Count h,e,l,l,o.", "Total 5.", "Select option C."], "subject": "computer_science", "text": "Answer: 5.\nSteps:\n1. Count h,e,l,l,o.\n2. Total 5.\n3. Select option C.\nAnswer: (C)", "topic": "python"}
{"answer": "dict.get returns the default 0 when the key is missing.", "choices": null, "id": "cs_0051", "kind": "worked_example", "lang": "en", "question": "What does {'a':1}.get('b',0) return?", "steps": ["Key 'b' missing.", "Default 0 applies.", "Returns 0."], "subject": "computer_science", "text": "Answer: 0.\nSteps:\n1. Key 'b' missing.\n2. Default 0 applies.\n3. Returns 0.", "topic": "python"}
{"answer": "Slicing takes [start:stop:step] with stop excluded.", "choices": null, "id": "cs_0052", "kind": "concept", "lang": "en", "question": "How does Python slicing work?", "steps": ["Start included.", "Stop excluded.", "Step skips items."], "subject": "computer_science", "text": "Answer: [start:stop:step].\nSteps:\n1. Start included.\n2. Stop excluded.\n3. Step skips items.", "topic": "python"}
{"answer": "Řez 'abcdef'[1:4] dá 'bcd'.", "choices": null, "id": "cs_0053", "kind": "worked_example", "lang": "cs", "question": "Co vrátí 'abcdef'[1:4]?", "steps": ["Indexy 1 až 3.", "Znaky b, c, d.", "Výsledek 'bcd'."], "subject": "computer_science", "text": "Answer: 'bcd'.\nSteps:\n1. Indexy 1 až 3.\n2. Znaky b, c, d.\n3. Výsledek 'bcd'.", "topic": "python"}
{"answer": "range(3) yields 0, 1, 2.", "choices": {"A": "0, 1, 2", "B": "1, 2, 3", "C": "0, 1, 2, 3", "D": "3, 2, 1"}, "id": "cs_0054", "kind": "multiple_choice", "lang": "en", "question": "What does range(3) produce?", "steps": ["Starts at 0.", "Stops before 3.", "Select option A."], "subject": "computer_science", "text": "Answer: 0, 1, 2.\nSteps:\n1. Starts at 0.\n2. Stops before 3.\n3. Select option A.\nAnswer: (A)", "topic": "python"}
{"answer": "Functions are defined with def and send values back via return.", "choices": null, "id": "cs_0055", "kind": "concept", "lang": "en", "question": "How are Python functions defined?", "steps": ["Use def keyword.", "Name parameters.", "Return the result."], "subject": "computer_science", "text": "Answer: def with return.\nSteps:\n1. Use def keyword.\n2. Name parameters.\n3. Return the result.", "topic": "python"}
{"answer": "f(3) = 3**2 + 1 = 10.", "choices": null, "id": "cs_0056", "kind": "worked_example", "lang": "en", "question": "If f(x) = x**2 + 1, what is f(3)?", "steps": ["Square: 3**2 = 9.", "Add 1.", "Result = 10."], "subject": "computer_science", "text": "Answer: 10.\nSteps:\n1. Square: 3**2 = 9.\n2. Add 1.\n3. Result = 10.", "topic": "python"}
{"answer": "The def keyword defines a Python function.", "choices": {"A": "fun", "B": "function", "C": "define", "D": "def"}, "id": "cs_0057", "kind": "multiple_choice", "lang": "en", "question": "Which keyword defines a function?", "steps": ["Python uses def.", "Others are wrong.", "Select option D."], "subject": "computer_science", "text": "Answer: def.\nSteps:\n1. Python uses def.\n2. Others are wrong.\n3. Select option D.\nAnswer: (D)", "topic": "python"}
{"answer": "Slovník mapuje klíče na hodnoty ve složených závorkách.", "choices": null, "id": "cs_0058", "kind": "concept", "lang": "cs", "question": "Co je slovník (dict)?", "steps": ["Páry klíč: hodnota.", "Složené závorky.", "Přístup přes klíč."], "subject": "computer_science", "text": "Answer: Mapování klíčů.\nSteps:\n1. Páry klíč: hodnota.\n2. Složené závorky.\n3. Přístup přes klíč.", "topic": "python"}
{"answer": "The average is 2.5, from 10 divided by 4.", "choices": null, "id": "cs_0059", "kind": "worked_example", "lang": "en", "question": "What is sum([1,2,3,4])/4?", "steps": ["Sum = 10.", "Divide by 4.", "Result = 2.5."], "subject": "computer_science", "text": "Answer: 2.5.\nSteps:\n1. Sum = 10.\n2. Divide by 4.\n3. Result = 2.5.", "topic": "python"}
{"answer": "'a' in 'cat' is True since 'a' appears in the string.", "choices": {"A": "Error", "B": "True", "C": "False", "D": "None"}, "id": "cs_0060", "kind": "multiple_choice", "lang": "en", "question": "What is 'a' in 'cat'?", "steps": ["Check membership.", "'a' is present.", "Select option B."], "subject": "computer_science", "text": "Answer: True.\nSteps:\n1. Check membership.\n2. 'a' is present.\n3. Select option B.\nAnswer: (B)", "topic": "python"}
{"answer": "let allows reassignment, const forbids it, and var is legacy function-scoped.", "choices": null, "id": "cs_0061", "kind": "concept", "lang": "en", "question": "How do let, const, and var differ?", "steps": ["let: block-scoped, mutable.", "const: no reassignment.", "var: legacy, function-scoped."], "subject": "computer_science", "text": "Answer: Mutable, fixed, legacy.\nSteps:\n1. let: block-scoped, mutable.\n2. const: no reassignment.\n3. var: legacy, function-scoped.", "topic": "javascript"}
{"answer": "const forbids rebinding the variable to a new value.", "choices": {"A": "Allows anything", "B": "Makes objects frozen", "C": "Forbids reassignment", "D": "Deletes variables"}, "id": "cs_0062", "kind": "multiple_choice", "lang": "en", "question": "What does const prevent?", "steps": ["Binding stays fixed.", "Contents may mutate.", "Select option C."], "subject": "computer_science", "text": "Answer: Forbids reassignment.\nSteps:\n1. Binding stays fixed.\n2. Contents may mutate.\n3. Select option C.\nAnswer: (C)", "topic": "javascript"}
{"answer": "map doubles each element, giving [2, 4, 6].", "choices": null, "id": "cs_0063", "kind": "worked_example", "lang": "en", "question": "What does [1,2,3].map(x => x*2) return?", "steps": ["Apply x*2 to 1: 2.", "To 2: 4; to 3: 6.", "Result [2, 4, 6]."], "subject": "computer_science", "text": "Answer: [2, 4, 6].\nSteps:\n1. Apply x*2 to 1: 2.\n2. To 2: 4; to 3: 6.\n3. Result [2, 4, 6].", "topic": "javascript"}
{"answer": "Pole je seřazená kolekce prvků v hranatých závorkách.", "choices": null, "id": "cs_0064", "kind": "concept", "lang": "cs", "question": "Co je pole v JavaScriptu?", "steps": ["Hranaté závorky.", "Indexování od 0.", "Metody map, filter."], "subject": "computer_science", "text": "Answer: Seřazená kolekce.\nSteps:\n1. Hranaté závorky.\n2. Indexování od 0.\n3. Metody map, filter.", "topic": "javascript"}
{"answer": "'hello'.length counts 5 characters.", "choices": null, "id": "cs_0065", "kind": "worked_example", "lang": "en", "question": "What is 'hello'.length?", "steps": ["Count h,e,l,l,o.", "Total 5.", "length = 5."], "subject": "computer_science", "text": "Answer: 5.\nSteps:\n1. Count h,e,l,l,o.\n2. Total 5.\n3. length = 5.", "topic": "javascript"}
{"answer": "Strict === compares value and type without coercion.", "choices": {"A": "Value and type", "B": "Value only", "C": "Type only", "D": "Nothing"}, "id": "cs_0066", "kind": "multiple_choice", "lang": "en", "question": "What does === check?", "steps": ["No type coercion.", "Both must match.", "Select option A."], "subject": "computer_science", "text": "Answer: Value and type.\nSteps:\n1. No type coercion.\n2. Both must match.\n3. Select option A.\nAnswer: (A)", "topic": "javascript"}
{"answer": "Arrow functions are compact (x) => expr with lexical this.", "choices": null, "id": "cs_0067", "kind": "concept", "lang": "en", "question": "What are arrow functions?", "steps": ["Short syntax.", "Lexical this binding.", "Example: x => x*2."], "subject": "computer_science", "text": "Answer: Compact lexical functions.\nSteps:\n1. Short syntax.\n2. Lexical this binding.\n3. Example: x => x*2.", "topic": "javascript"}
{"answer": "Filtr vrátí [2, 3], prvky větší než 1.", "choices": null, "id": "cs_0068", "kind": "worked_example", "lang": "cs", "question": "Co vrátí [1,2,3].filter(x => x > 1)?", "steps": ["Testuj 1: ne.", "Testuj 2, 3: ano.", "Výsledek [2, 3]."], "subject": "computer_science", "text": "Answer: [2, 3].\nSteps:\n1. Testuj 1: ne.\n2. Testuj 2, 3: ano.\n3. Výsledek [2, 3].", "topic": "javascript"}
{"answer": "JSON.parse converts a JSON string into an object.", "choices": {"A": "Object to string", "B": "Number to string", "C": "Array to set", "D": "String to object"}, "id": "cs_0069", "kind": "multiple_choice", "lang": "en", "question": "What does JSON.parse do?", "steps": ["Takes JSON text.", "Builds value.", "Select option D."], "subject": "computer_science", "text": "Answer: String to object.\nSteps:\n1. Takes JSON text.\n2. Builds value.\n3. Select option D.\nAnswer: (D)", "topic": "javascript"}
{"answer": "Promises represent future values with then/catch chains instead of nested callbacks.", "choices": null, "id": "cs_0070", "kind": "concept", "lang": "en", "question": "What are promises?", "steps": ["Pending, then settled.", "then handles success.", "catch handles errors."], "subject": "computer_science", "text": "Answer: Future values with chains.\nSteps:\n1. Pending, then settled.\n2. then handles success.\n3. catch handles errors.", "topic": "javascript"}
{"answer": "2 + '2' coerces to string concatenation, giving '22'.", "choices": null, "id": "cs_0071", "kind": "worked_example", "lang": "en", "question": "What is 2 + '2' in JavaScript?", "steps": ["One operand is string.", "Number coerces to '2'.", "Concat gives '22'."], "subject": "computer_science", "text": "Answer: '22'.\nSteps:\n1. One operand is string.\n2. Number coerces to '2'.\n3. Concat gives '22'.", "topic": "javascript"}
{"answer": "Object literals group key-value pairs in braces.", "choices": null, "id": "cs_0072", "kind": "concept", "lang": "en", "question": "What are object literals?", "steps": ["Braces hold pairs.", "Keys map to values.", "Example: {a: 1}."], "subject": "computer_science", "text": "Answer: Key-value in braces.\nSteps:\n1. Braces hold pairs.\n2. Keys map to values.\n3. Example: {a: 1}.", "topic": "javascript"}
{"answer": "Arrays are objects, so typeof [] is 'object'.", "choices": {"A": "array", "B": "object", "C": "list", "D": "undefined"}, "id": "cs_0073", "kind": "multiple_choice", "lang": "en", "question": "What is typeof []?", "steps": ["Arrays inherit objects.", "typeof reports object.", "Select option B."], "subject": "computer_science", "text": "Answer: 'object'.\nSteps:\n1. Arrays inherit objects.\n2. typeof reports object.\n3. Select option B.\nAnswer: (B)", "topic": "javascript"}
{"answer": "Math.max(3, 7, 5) vrátí 7.", "choices": null, "id": "cs_0074", "kind": "worked_example", "lang": "cs", "question": "Co vrátí Math.max(3, 7, 5)?", "steps": ["Porovnej 3 a 7.", "Větší je 7.", "Proti 5 vítězí 7."], "subject": "computer_science", "text": "Answer: 7.\nSteps:\n1. Porovnej 3 a 7.\n2. Větší je 7.\n3. Proti 5 vítězí 7.", "topic": "javascript"}
{"answer": "Template literals use backticks with ${} interpolation.", "choices": null, "id": "cs_0075", "kind": "concept", "lang": "en", "question": "What are template literals?", "steps": ["Backtick strings.", "Embed ${expr}.", "Span multiple lines."], "subject": "computer_science", "text": "Answer: Backtick interpolated strings.\nSteps:\n1. Backtick strings.\n2. Embed ${expr}.\n3. Span multiple lines.", "topic": "javascript"}
{"answer": "SELECT lists columns from a table, optionally filtered and ordered.", "choices": null, "id": "cs_0076", "kind": "concept", "lang": "en", "question": "What does SELECT do in SQL?", "steps": ["Names columns.", "Names table.", "Adds filters."], "subject": "computer_science", "text": "Answer: Reads columns from table.\nSteps:\n1. Names columns.\n2. Names table.\n3. Adds filters.", "topic": "sql"}
{"answer": "WHERE filters rows by a condition.", "choices": {"A": "WHERE", "B": "ORDER", "C": "GROUP", "D": "JOIN"}, "id": "cs_0077", "kind": "multiple_choice", "lang": "en", "question": "Which clause filters rows?", "steps": ["Need row condition.", "That is WHERE.", "Select option A."], "subject": "computer_science", "text": "Answer: WHERE.\nSteps:\n1. Need row condition.\n2. That is WHERE.\n3. Select option A.\nAnswer: (A)", "topic": "sql"}
{"answer": "SELECT 2 + 3 returns 5.", "choices": null, "id": "cs_0078", "kind": "worked_example", "lang": "en", "question": "What does SELECT 2 + 3 return?", "steps": ["Add 2 and 3.", "Result 5.", "One row returned."], "subject": "computer_science", "text": "Answer: 5.\nSteps:\n1. Add 2 and 3.\n2. Result 5.\n3. One row returned.", "topic": "sql"}
{"answer": "SELECT čte sloupce z tabulky, volitelně s filtrem.", "choices": null, "id": "cs_0079", "kind": "concept", "lang": "cs", "question": "Co je dotaz SELECT?", "steps": ["Jmenuje sloupce.", "Jmenuje tabulku.", "Přidá filtr."], "subject": "computer_science", "text": "Answer: Čtení z tabulky.\nSteps:\n1. Jmenuje sloupce.\n2. Jmenuje tabulku.\n3. Přidá filtr.", "topic": "sql"}
{"answer": "COUNT(*) over 4 rows returns 4.", "choices": null, "id": "cs_0080", "kind": "worked_example", "lang": "en", "question": "Table t has 4 rows. What does SELECT COUNT(*) FROM t return?", "steps": ["Count all rows.", "Four present.", "Returns 4."], "subject": "computer_science", "text": "Answer: 4.\nSteps:\n1. Count all rows.\n2. Four present.\n3. Returns 4.", "topic": "sql"}
{"answer": "ORDER BY sorts result rows by columns.", "choices": {"A": "WHERE", "B": "GROUP BY", "C": "ORDER BY", "D": "HAVING"}, "id": "cs_0081", "kind": "multiple_choice", "lang": "en", "question": "Which clause sorts results?", "steps": ["Need ordering.", "That is ORDER BY.", "Select option C."], "subject": "computer_science", "text": "Answer: ORDER BY.\nSteps:\n1. Need ordering.\n2. That is ORDER BY.\n3. Select option C.\nAnswer: (C)", "topic": "sql"}
{"answer": "INNER keeps matches, LEFT keeps all left rows, FULL keeps everything.", "choices": null, "id": "cs_0082", "kind": "concept", "lang": "en", "question": "How do JOIN types differ?", "steps": ["INNER: matches only.", "LEFT: all left rows.", "FULL: all rows both."], "subject": "computer_science", "text": "Answer: Match scope differs.\nSteps:\n1. INNER: matches only.\n2. LEFT: all left rows.\n3. FULL: all rows both.", "topic": "sql"}
{"answer": "SELECT 10.0 / 4 vrátí 2.5.", "choices": null, "id": "cs_0083", "kind": "worked_example", "lang": "cs", "question": "Co vrátí SELECT 10.0 / 4?", "steps": ["Vyděl 10.0 čtyřmi.", "Výsledek 2.5.", "Jeden řádek."], "subject": "computer_science", "text": "Answer: 2.5.\nSteps:\n1. Vyděl 10.0 čtyřmi.\n2. Výsledek 2.5.\n3. Jeden řádek.", "topic": "sql"}
{"answer": "DISTINCT drops duplicate rows from results.", "choices": {"A": "UNIQUE", "B": "DISTINCT", "C": "FILTER", "D": "LIMIT"}, "id": "cs_0084", "kind": "multiple_choice", "lang": "en", "question": "Which keyword removes duplicates?", "steps": ["Need dedup.", "That is DISTINCT.", "Select option B."], "subject": "computer_science", "text": "Answer: DISTINCT.\nSteps:\n1. Need dedup.\n2. That is DISTINCT.\n3. Select option B.\nAnswer: (B)", "topic": "sql"}
{"answer": "GROUP BY aggregates per group; HAVING filters groups like WHERE filters rows.", "choices": null, "id": "cs_0085", "kind": "concept", "lang": "en", "question": "How do GROUP BY and HAVING work?", "steps": ["Group rows by key.", "Aggregate each group.", "HAVING filters groups."], "subject": "computer_science", "text": "Answer: Aggregate then filter groups.\nSteps:\n1. Group rows by key.\n2. Aggregate each group.\n3. HAVING filters groups.", "topic": "sql"}
{"answer": "SUM(1, 2, 3) totals 6.", "choices": null, "id": "cs_0086", "kind": "worked_example", "lang": "en", "question": "What does SELECT SUM(x) give for x in (1,2,3)?", "steps": ["Add 1 + 2 + 3.", "Total 6.", "One row returned."], "subject": "computer_science", "text": "Answer: 6.\nSteps:\n1. Add 1 + 2 + 3.\n2. Total 6.\n3. One row returned.", "topic": "sql"}
{"answer": "A primary key uniquely identifies each row and cannot be NULL.", "choices": null, "id": "cs_0087", "kind": "concept", "lang": "en", "question": "What is a primary key?", "steps": ["Unique per row.", "Never NULL.", "Example: id column."], "subject": "computer_science", "text": "Answer: Unique row identifier.\nSteps:\n1. Unique per row.\n2. Never NULL.\n3. Example: id column.", "topic": "sql"}
{"answer": "PRIMARY KEY enforces unique non-null row identity.", "choices": {"A": "FOREIGN KEY", "B": "INDEX", "C": "NULL", "D": "PRIMARY KEY"}, "id": "cs_0088", "kind": "multiple_choice", "lang": "en", "question": "Which constraint gives unique row identity?", "steps": ["Need unique id.", "That is PRIMARY KEY.", "Select option D."], "subject": "computer_science", "text": "Answer: PRIMARY KEY.\nSteps:\n1. Need unique id.\n2. That is PRIMARY KEY.\n3. Select option D.\nAnswer: (D)", "topic": "sql"}
{"answer": "Primární klíč jednoznačně určuje každý řádek a není NULL.", "choices": null, "id": "cs_0089", "kind": "concept", "lang": "cs", "question": "Co je primární klíč?", "steps": ["Jedinečný na řádek.", "Nikdy NULL.", "Příklad: sloupec id."], "subject": "computer_science", "text": "Answer: Jedinečný identifikátor.\nSteps:\n1. Jedinečný na řádek.\n2. Nikdy NULL.\n3. Příklad: sloupec id.", "topic": "sql"}
{"answer": "AVG(10, 20, 30) = 60/3 = 20.0.", "choices": null, "id": "cs_0090", "kind": "worked_example", "lang": "en", "question": "What does SELECT AVG(x) give for x in (10,20,30)?", "steps": ["Sum = 60.", "Count = 3.", "Average = 20.0."], "subject": "computer_science", "text": "Answer: 20.0.\nSteps:\n1. Sum = 60.\n2. Count = 3.\n3. Average = 20.0.", "topic": "sql"}
{"answer": "TCP guarantees ordered delivery; UDP is fast but unreliable.", "choices": null, "id": "cs_0091", "kind": "concept", "lang": "en", "question": "How do TCP and UDP differ?", "steps": ["TCP: reliable, ordered.", "UDP: fast, best-effort.", "Use: web vs video."], "subject": "computer_science", "text": "Answer: Reliable versus fast.\nSteps:\n1. TCP: reliable, ordered.\n2. UDP: fast, best-effort.\n3. Use: web vs video.", "topic": "networking"}
{"answer": "TCP retransmits lost packets for reliability.", "choices": {"A": "TCP", "B": "UDP", "C": "IP", "D": "ICMP"}, "id": "cs_0092", "kind": "multiple_choice", "lang": "en", "question": "Which protocol is reliable?", "steps": ["Needs retransmission.", "TCP provides it.", "Select option A."], "subject": "computer_science", "text": "Answer: TCP.\nSteps:\n1. Needs retransmission.\n2. TCP provides it.\n3. Select option A.\nAnswer: (A)", "topic": "networking"}
{"answer": "A /24 network holds 254 usable hosts (2^8 - 2).", "choices": null, "id": "cs_0093", "kind": "worked_example", "lang": "en", "question": "How many usable hosts in 192.168.1.0/24?", "steps": ["Host bits = 32 - 24 = 8.", "Total = 2^8 = 256.", "Minus network/broadcast = 254."], "subject": "computer_science", "text": "Answer: 254.\nSteps:\n1. Host bits = 32 - 24 = 8.\n2. Total = 2^8 = 256.\n3. Minus network/broadcast = 254.", "topic": "networking"}
{"answer": "IP adresa je číselný identifikátor zařízení v síti.", "choices": null, "id": "cs_0094", "kind": "concept", "lang": "cs", "question": "Co je IP adresa?", "steps": ["Číselný identifikátor.", "IPv4 má 32 bitů.", "Příklad: 192.168.1.1."], "subject": "computer_science", "text": "Answer: Identifikátor zařízení.\nSteps:\n1. Číselný identifikátor.\n2. IPv4 má 32 bitů.\n3. Příklad: 192.168.1.1.", "topic": "networking"}
{"answer": "DNS resolves domain names to IP addresses via hierarchical lookup.", "choices": null, "id": "cs_0095", "kind": "concept", "lang": "en", "question": "How does DNS resolution work?", "steps": ["Query resolver.", "Walk root to TLD to auth.", "Cache the answer."], "subject": "computer_science", "text": "Answer: Names to IPs hierarchically.\nSteps:\n1. Query resolver.\n2. Walk root to TLD to auth.\n3. Cache the answer.", "topic": "networking"}
{"answer": "DNS maps domain names to IP addresses.", "choices": {"A": "IPs to MACs", "B": "Names to IPs", "C": "Ports to apps", "D": "Files to URLs"}, "id": "cs_0096", "kind": "multiple_choice", "lang": "en", "question": "What does DNS map?", "steps": ["Names in, IPs out.", "Eliminate others.", "Select option B."], "subject": "computer_science", "text": "Answer: Names to IPs.\nSteps:\n1. Names in, IPs out.\n2. Eliminate others.\n3. Select option B.\nAnswer: (B)", "topic": "networking"}
{"answer": "A /16 holds 65,534 usable hosts (2^16 - 2).", "choices": null, "id": "cs_0097", "kind": "worked_example", "lang": "en", "question": "How many usable hosts in a /16 network?", "steps": ["Host bits = 16.", "Total = 2^16 = 65,536.", "Minus 2 = 65,534."], "subject": "computer_science", "text": "Answer: 65,534.\nSteps:\n1. Host bits = 16.\n2. Total = 2^16 = 65,536.\n3. Minus 2 = 65,534.", "topic": "networking"}
{"answer": "HTTP standardně používá port 80.", "choices": null, "id": "cs_0098", "kind": "worked_example", "lang": "cs", "question": "Kolik je standardní port HTTP?", "steps": ["HTTP má 80.", "HTTPS má 443.", "Odpověď: 80."], "subject": "computer_science", "text": "Answer: 80.\nSteps:\n1. HTTP má 80.\n2. HTTPS má 443.\n3. Odpověď: 80.", "topic": "networking"}
{"answer": "HTTP defaults to port 80.", "choices": {"A": "21", "B": "25", "C": "80", "D": "443"}, "id": "cs_0099", "kind": "multiple_choice", "lang": "en", "question": "What is the default HTTP port?", "steps": ["HTTP standard.", "Port 80.", "Select option C."], "subject": "computer_science", "text": "Answer: 80.\nSteps:\n1. HTTP standard.\n2. Port 80.\n3. Select option C.\nAnswer: (C)", "topic": "networking"}
{"answer": "The OSI model has 7 layers from physical to application.", "choices": null, "id": "cs_0100", "kind": "concept", "lang": "en", "question": "How many OSI layers exist?", "steps": ["Physical to application.", "Seven total.", "Example: network is 3."], "subject": "computer_science", "text": "Answer: 7 layers.\nSteps:\n1. Physical to application.\n2. Seven total.\n3. Example: network is 3.", "topic": "networking"}
{"answer": "A /24 mask is 255.255.255.0: 24 ones then 8 zeros.", "choices": null, "id": "cs_0101", "kind": "worked_example", "lang": "en", "question": "What is the subnet mask for /24?", "steps": ["24 network bits set.", "Three full octets.", "Mask = 255.255.255.0."], "subject": "computer_science", "text": "Answer: 255.255.255.0.\nSteps:\n1. 24 network bits set.\n2. Three full octets.\n3. Mask = 255.255.255.0.", "topic": "networking"}
{"answer": "HTTPS defaults to port 443.", "choices": {"A": "80", "B": "21", "C": "25", "D": "443"}, "id": "cs_0102", "kind": "multiple_choice", "lang": "en", "question": "What is the default HTTPS port?", "steps": ["Encrypted HTTP.", "Port 443.", "Select option D."], "subject": "computer_science", "text": "Answer: 443.\nSteps:\n1. Encrypted HTTP.\n2. Port 443.\n3. Select option D.\nAnswer: (D)", "topic": "networking"}
{"answer": "DNS převádí doménová jména na IP adresy.", "choices": null, "id": "cs_0103", "kind": "concept", "lang": "cs", "question": "Co je DNS?", "steps": ["Jména na adresy.", "Hierarchické dotazy.", "Ukládání do mezipaměti."], "subject": "computer_science", "text": "Answer: Překlad jmen na IP.\nSteps:\n1. Jména na adresy.\n2. Hierarchické dotazy.\n3. Ukládání do mezipaměti.", "topic": "networking"}
{"answer": "Switches forward within a LAN by MAC; routers join networks by IP.", "choices": null, "id": "cs_0104", "kind": "concept", "lang": "en", "question": "How do routers and switches differ?", "steps": ["Switch: LAN, MAC-based.", "Router: networks, IP-based.", "Layers 2 vs 3."], "subject": "computer_science", "text": "Answer: LAN versus networks.\nSteps:\n1. Switch: LAN, MAC-based.\n2. Router: networks, IP-based.\n3. Layers 2 vs 3.", "topic": "networking"}
{"answer": "192.168.1.1 is private; the rest are public addresses.", "choices": {"A": "192.168.1.1", "B": "8.8.8.8", "C": "1.1.1.1", "D": "9.9.9.9"}, "id": "cs_0105", "kind": "multiple_choice", "lang": "en", "question": "Which IP is private?", "steps": ["192.168.x is private.", "Others are public.", "Select option A."], "subject": "computer_science", "text": "Answer: 192.168.1.1.\nSteps:\n1. 192.168.x is private.\n2. Others are public.\n3. Select option A.\nAnswer: (A)", "topic": "networking"}
{"answer": "The relational model stores data in tables of rows and columns.", "choices": null, "id": "cs_0106", "kind": "concept", "lang": "en", "question": "What is the relational model?", "steps": ["Tables hold data.", "Rows are records.", "Keys link tables."], "subject": "computer_science", "text": "Answer: Tables of rows.\nSteps:\n1. Tables hold data.\n2. Rows are records.\n3. Keys link tables.", "topic": "databases"}
{"answer": "Table rows are also called records.", "choices": {"A": "Attributes", "B": "Records", "C": "Schemas", "D": "Keys"}, "id": "cs_0107", "kind": "multiple_choice", "lang": "en", "question": "What are table rows also called?", "steps": ["Rows hold one entry.", "Called records.", "Select option B."], "subject": "computer_science", "text": "Answer: Records.\nSteps:\n1. Rows hold one entry.\n2. Called records.\n3. Select option B.\nAnswer: (B)", "topic": "databases"}
{"answer": "Three INSERTs into an empty table leave 3 rows.", "choices": null, "id": "cs_0108", "kind": "worked_example", "lang": "en", "question": "INSERT 3 rows into an empty table. How many rows?", "steps": ["Start at 0.", "Add 3.", "Total = 3."], "subject": "computer_science", "text": "Answer: 3.\nSteps:\n1. Start at 0.\n2. Add 3.\n3. Total = 3.", "topic": "databases"}
{"answer": "Relační databáze ukládá data do tabulek propojených klíči.", "choices": null, "id": "cs_0109", "kind": "concept", "lang": "cs", "question": "Co je relační databáze?", "steps": ["Tabulky řádků.", "Sloupce atributů.", "Klíče spojují."], "subject": "computer_science", "text": "Answer: Tabulky s klíči.\nSteps:\n1. Tabulky řádků.\n2. Sloupce atributů.\n3. Klíče spojují.", "topic": "databases"}
{"answer": "Indexes speed lookups by avoiding full table scans.", "choices": null, "id": "cs_0110", "kind": "concept", "lang": "en", "question": "What is a database index?", "steps": ["Sorted lookup aid.", "Skips full scans.", "Costs write speed."], "subject": "computer_science", "text": "Answer: Fast lookup aid.\nSteps:\n1. Sorted lookup aid.\n2. Skips full scans.\n3. Costs write speed.", "topic": "databases"}
{"answer": "Indexes exist to make lookups faster.", "choices": {"A": "Faster lookup", "B": "Slower reads", "C": "More storage only", "D": "No effect"}, "id": "cs_0111", "kind": "multiple_choice", "lang": "en", "question": "What is an index for?", "steps": ["Avoid full scans.", "Speed queries.", "Select option A."], "subject": "computer_science", "text": "Answer: Faster lookup.\nSteps:\n1. Avoid full scans.\n2. Speed queries.\n3. Select option A.\nAnswer: (A)", "topic": "databases"}
{"answer": "A cross join of 3 and 4 rows yields at most 12 rows.", "choices": null, "id": "cs_0112", "kind": "worked_example", "lang": "en", "question": "Cross-join tables of 3 and 4 rows. How many rows max?", "steps": ["Each left pairs each right.", "Multiply: 3 x 4.", "Max = 12."], "subject": "computer_science", "text": "Answer: 12.\nSteps:\n1. Each left pairs each right.\n2. Multiply: 3 x 4.\n3. Max = 12.", "topic": "databases"}
{"answer": "Po smazání 1 ze 3 řádků zbudou 2.", "choices": null, "id": "cs_0113", "kind": "worked_example", "lang": "cs", "question": "Tabulka má 3 řádky, DELETE smaže 1. Kolik zbude?", "steps": ["Začni na 3.", "Odečti 1.", "Zbývají 2."], "subject": "computer_science", "text": "Answer: 2.\nSteps:\n1. Začni na 3.\n2. Odečti 1.\n3. Zbývají 2.", "topic": "databases"}
{"answer": "ACID stands for atomicity, consistency, isolation, durability.", "choices": {"A": "Availability", "B": "Accuracy", "C": "Atomicity", "D": "Audit"}, "id": "cs_0114", "kind": "multiple_choice", "lang": "en", "question": "What is the A in ACID?", "steps": ["All-or-nothing.", "That is atomicity.", "Select option C."], "subject": "computer_science", "text": "Answer: Atomicity.\nSteps:\n1. All-or-nothing.\n2. That is atomicity.\n3. Select option C.\nAnswer: (C)", "topic": "databases"}
{"answer": "A transaction groups statements into one atomic unit.", "choices": null, "id": "cs_0115", "kind": "concept", "lang": "en", "question": "What is a transaction?", "steps": ["Group statements.", "Commit or rollback.", "Stays atomic."], "subject": "computer_science", "text": "Answer: Atomic statement group.\nSteps:\n1. Group statements.\n2. Commit or rollback.\n3. Stays atomic.", "topic": "databases"}
{"answer": "Raising 100 by 10% gives 110.", "choices": null, "id": "cs_0116", "kind": "worked_example", "lang": "en", "question": "UPDATE sets price = price * 1.1 with price 100. New value?", "steps": ["Multiply: 100 x 1.1.", "Result 110.", "One row updated."], "subject": "computer_science", "text": "Answer: 110.\nSteps:\n1. Multiply: 100 x 1.1.\n2. Result 110.\n3. One row updated.", "topic": "databases"}
{"answer": "A foreign key references another table's primary key.", "choices": null, "id": "cs_0117", "kind": "concept", "lang": "en", "question": "What is a foreign key?", "steps": ["Points to other table.", "Matches its PK.", "Enforces links."], "subject": "computer_science", "text": "Answer: Link to other PK.\nSteps:\n1. Points to other table.\n2. Matches its PK.\n3. Enforces links.", "topic": "databases"}
{"answer": "Foreign keys reference another table's primary key.", "choices": {"A": "Own index", "B": "Another table's PK", "C": "Any column", "D": "Nothing"}, "id": "cs_0118", "kind": "multiple_choice", "lang": "en", "question": "What does a foreign key reference?", "steps": ["Links tables.", "Targets PK.", "Select option B."], "subject": "computer_science", "text": "Answer: Another table's PK.\nSteps:\n1. Links tables.\n2. Targets PK.\n3. Select option B.\nAnswer: (B)", "topic": "databases"}
{"answer": "Transakce je atomická skupina příkazů s commitem nebo rollbackem.", "choices": null, "id": "cs_0119", "kind": "concept", "lang": "cs", "question": "Co je transakce?", "steps": ["Skupina příkazů.", "Commit nebo rollback.", "Vše nebo nic."], "subject": "computer_science", "text": "Answer: Atomická skupina.\nSteps:\n1. Skupina příkazů.\n2. Commit nebo rollback.\n3. Vše nebo nic.", "topic": "databases"}
{"answer": "The query returns the 2 matching rows.", "choices": null, "id": "cs_0120", "kind": "worked_example", "lang": "en", "question": "5 rows exist, WHERE matches 2. How many returned?", "steps": ["Filter 5 rows.", "Keep 2.", "Returns 2."], "subject": "computer_science", "text": "Answer: 2.\nSteps:\n1. Filter 5 rows.\n2. Keep 2.\n3. Returns 2.", "topic": "databases"}
{"answer": "A process owns memory; threads share it while running code.", "choices": null, "id": "cs_0121", "kind": "concept", "lang": "en", "question": "How do processes and threads differ?", "steps": ["Process: own memory.", "Thread: shared memory.", "Threads run inside processes."], "subject": "computer_science", "text": "Answer: Own versus shared memory.\nSteps:\n1. Process: own memory.\n2. Thread: shared memory.\n3. Threads run inside processes.", "topic": "operating_systems"}
{"answer": "A thread is the lightweight unit of execution.", "choices": {"A": "Process", "B": "Program", "C": "File", "D": "Thread"}, "id": "cs_0122", "kind": "multiple_choice", "lang": "en", "question": "What is the lightweight execution unit?", "steps": ["Runs code.", "Shares memory.", "Select option D."], "subject": "computer_science", "text": "Answer: Thread.\nSteps:\n1. Runs code.\n2. Shares memory.\n3. Select option D.\nAnswer: (D)", "topic": "operating_systems"}
{"answer": "4 cores with 2 threads each give 8 logical CPUs.", "choices": null, "id": "cs_0123", "kind": "worked_example", "lang": "en", "question": "4 cores, 2 threads each. How many logical CPUs?", "steps": ["Multiply: 4 x 2.", "Result 8.", "8 logical CPUs."], "subject": "computer_science", "text": "Answer: 8.\nSteps:\n1. Multiply: 4 x 2.\n2. Result 8.\n3. 8 logical CPUs.", "topic": "operating_systems"}
{"answer": "Proces je běžící program s vlastním paměťovým prostorem.", "choices": null, "id": "cs_0124", "kind": "concept", "lang": "cs", "question": "Co je proces?", "steps": ["Běžící program.", "Vlastní paměť.", "Spravuje ho OS."], "subject": "computer_science", "text": "Answer: Běžící program.\nSteps:\n1. Běžící program.\n2. Vlastní paměť.\n3. Spravuje ho OS.", "topic": "operating_systems"}
{"answer": "Paging splits memory into fixed pages swapped between RAM and disk.", "choices": null, "id": "cs_0125", "kind": "concept", "lang": "en", "question": "What is virtual memory paging?", "steps": ["Fixed-size pages.", "Swap RAM to disk.", "Illusion of more RAM."], "subject": "computer_science", "text": "Answer: Page swapping illusion.\nSteps:\n1. Fixed-size pages.\n2. Swap RAM to disk.\n3. Illusion of more RAM.", "topic": "operating_systems"}
{"answer": "FIFO evicts the oldest loaded page first.", "choices": {"A": "Oldest", "B": "Newest", "C": "Random", "D": "Largest"}, "id": "cs_0126", "kind": "multiple_choice", "lang": "en", "question": "Which page does FIFO evict?", "steps": ["First in first out.", "Oldest leaves.", "Select option A."], "subject": "computer_science", "text": "Answer: Oldest.\nSteps:\n1. First in first out.\n2. Oldest leaves.\n3. Select option A.\nAnswer: (A)", "topic": "operating_systems"}
{"answer": "Three fresh references with 3 frames cause 3 page faults.", "choices": null, "id": "cs_0127", "kind": "worked_example", "lang": "en", "question": "3 frames empty, references 1, 2, 3. How many faults?", "steps": ["1 misses: fault.", "2 misses: fault.", "3 misses: fault; total 3."], "subject": "computer_science", "text": "Answer: 3.\nSteps:\n1. 1 misses: fault.\n2. 2 misses: fault.\n3. 3 misses: fault; total 3.", "topic": "operating_systems"}
{"answer": "2 GB RAM plus 1 GB swap dá 3 GB virtuální paměti.", "choices": null, "id": "cs_0128", "kind": "worked_example", "lang": "cs", "question": "2 GB RAM a 1 GB swap. Kolik virtuální paměti?", "steps": ["Sečti RAM a swap.", "2 + 1.", "Celkem 3 GB."], "subject": "computer_science", "text": "Answer: 3 GB.\nSteps:\n1. Sečti RAM a swap.\n2. 2 + 1.\n3. Celkem 3 GB.", "topic": "operating_systems"}
{"answer": "Deadlock needs all four Coffman conditions at once.", "choices": {"A": "2", "B": "3", "C": "4", "D": "1"}, "id": "cs_0129", "kind": "multiple_choice", "lang": "en", "question": "How many conditions does deadlock need?", "steps": ["Mutual exclusion etc.", "Four total.", "Select option C."], "subject": "computer_science", "text": "Answer: 4.\nSteps:\n1. Mutual exclusion etc.\n2. Four total.\n3. Select option C.\nAnswer: (C)", "topic": "operating_systems"}
{"answer": "Round-robin cycles processes with fixed time quanta.", "choices": null, "id": "cs_0130", "kind": "concept", "lang": "en", "question": "How does round-robin scheduling work?", "steps": ["Queue processes.", "Run each one quantum.", "Cycle repeats."], "subject": "computer_science", "text": "Answer: Cycling time quanta.\nSteps:\n1. Queue processes.\n2. Run each one quantum.\n3. Cycle repeats.", "topic": "operating_systems"}
{"answer": "One cycle over 3 processes at 10 ms takes 30 ms.", "choices": null, "id": "cs_0131", "kind": "worked_example", "lang": "en", "question": "Quantum 10 ms, 3 processes. How long is one cycle?", "steps": ["Each runs 10 ms.", "Three in cycle.", "Total = 30 ms."], "subject": "computer_science", "text": "Answer: 30 ms.\nSteps:\n1. Each runs 10 ms.\n2. Three in cycle.\n3. Total = 30 ms.", "topic": "operating_systems"}
{"answer": "Kernel mode runs privileged instructions; user mode cannot.", "choices": {"A": "Slower", "B": "Privileged", "C": "Optional", "D": "Removed"}, "id": "cs_0132", "kind": "multiple_choice", "lang": "en", "question": "How is kernel mode best described?", "steps": ["Full hardware access.", "Privileged level.", "Select option B."], "subject": "computer_science", "text": "Answer: Privileged.\nSteps:\n1. Full hardware access.\n2. Privileged level.\n3. Select option B.\nAnswer: (B)", "topic": "operating_systems"}
{"answer": "Vlákno je lehká jednotka běhu sdílející paměť procesu.", "choices": null, "id": "cs_0133", "kind": "concept", "lang": "cs", "question": "Co je vlákno (thread)?", "steps": ["Běží uvnitř procesu.", "Sdílí paměť.", "Vlastní zásobník."], "subject": "computer_science", "text": "Answer: Lehká jednotka běhu.\nSteps:\n1. Běží uvnitř procesu.\n2. Sdílí paměť.\n3. Vlastní zásobník.", "topic": "operating_systems"}
{"answer": "Inodes store file metadata and block pointers.", "choices": null, "id": "cs_0134", "kind": "concept", "lang": "en", "question": "What is an inode?", "steps": ["Metadata per file.", "Points to blocks.", "Name lives in directory."], "subject": "computer_science", "text": "Answer: File metadata node.\nSteps:\n1. Metadata per file.\n2. Points to blocks.\n3. Name lives in directory.", "topic": "operating_systems"}
{"answer": "A mutex grants one holder at a time, ensuring mutual exclusion.", "choices": {"A": "Mutual exclusion", "B": "Parallel access", "C": "No locking", "D": "Deadlock"}, "id": "cs_0135", "kind": "multiple_choice", "lang": "en", "question": "What does a mutex ensure?", "steps": ["One holder only.", "Others wait.", "Select option A."], "subject": "computer_science", "text": "Answer: Mutual exclusion.\nSteps:\n1. One holder only.\n2. Others wait.\n3. Select option A.\nAnswer: (A)", "topic": "operating_systems"}
{"answer": "A class is a blueprint; objects are its instances.", "choices": null, "id": "cs_0136", "kind": "concept", "lang": "en", "question": "How do classes and objects differ?", "steps": ["Class defines shape.", "Object holds data.", "Many objects per class."], "subject": "computer_science", "text": "Answer: Blueprint versus instance.\nSteps:\n1. Class defines shape.\n2. Object holds data.\n3. Many objects per class.", "topic": "oop"}
{"answer": "The class is the blueprint; objects instantiate it.", "choices": {"A": "Object", "B": "Class", "C": "Method", "D": "Field"}, "id": "cs_0137", "kind": "multiple_choice", "lang": "en", "question": "What is the blueprint?", "steps": ["Blueprint defines.", "That is class.", "Select option B."], "subject": "computer_science", "text": "Answer: Class.\nSteps:\n1. Blueprint defines.\n2. That is class.\n3. Select option B.\nAnswer: (B)", "topic": "oop"}
{"answer": "Two increments raise count from 0 to 2.", "choices": null, "id": "cs_0138", "kind": "worked_example", "lang": "en", "question": "Counter starts at 0, inc() twice. What is count?", "steps": ["Start 0.", "First inc: 1.", "Second inc: 2."], "subject": "computer_science", "text": "Answer: 2.\nSteps:\n1. Start 0.\n2. First inc: 1.\n3. Second inc: 2.", "topic": "oop"}
{"answer": "Třída je předpis, objekt jeho konkrétní instance.", "choices": null, "id": "cs_0139", "kind": "concept", "lang": "cs", "question": "Co je třída a objekt?", "steps": ["Třída definuje tvar.", "Objekt drží data.", "Mnoho objektů z třídy."], "subject": "computer_science", "text": "Answer: Předpis versus instance.\nSteps:\n1. Třída definuje tvar.\n2. Objekt drží data.\n3. Mnoho objektů z třídy.", "topic": "oop"}
{"answer": "Encapsulation bundles data with methods and hides internals.", "choices": null, "id": "cs_0140", "kind": "concept", "lang": "en", "question": "What is encapsulation?", "steps": ["Bundle data, methods.", "Hide internals.", "Expose interface."], "subject": "computer_science", "text": "Answer: Bundled hidden data.\nSteps:\n1. Bundle data, methods.\n2. Hide internals.\n3. Expose interface.", "topic": "oop"}
{"answer": "Encapsulation hides internal details behind an interface.", "choices": {"A": "Encapsulation", "B": "Inheritance", "C": "Polymorphism", "D": "Abstraction"}, "id": "cs_0141", "kind": "multiple_choice", "lang": "en", "question": "What hides internal details?", "steps": ["Need hiding.", "That is encapsulation.", "Select option A."], "subject": "computer_science", "text": "Answer: Encapsulation.\nSteps:\n1. Need hiding.\n2. That is encapsulation.\n3. Select option A.\nAnswer: (A)", "topic": "oop"}
{"answer": "Dog inherits speak and returns 'woof'.", "choices": null, "id": "cs_0142", "kind": "worked_example", "lang": "en", "question": "Dog(Animal) defines speak() as 'woof'. What does Dog().speak() give?", "steps": ["Dog inherits Animal.", "speak returns 'woof'.", "Result 'woof'."], "subject": "computer_science", "text": "Answer: 'woof'.\nSteps:\n1. Dog inherits Animal.\n2. speak returns 'woof'.\n3. Result 'woof'.", "topic": "oop"}
{"answer": "Dědičnost přebírá vlastnosti rodičovské třídy.", "choices": null, "id": "cs_0143", "kind": "concept", "lang": "cs", "question": "Co je dědičnost?", "steps": ["Potomek dědí.", "Rozšiřuje rodiče.", "Opakuje méně kódu."], "subject": "computer_science", "text": "Answer: Přebírání od rodiče.\nSteps:\n1. Potomek dědí.\n2. Rozšiřuje rodiče.\n3. Opakuje méně kódu.", "topic": "oop"}
{"answer": "Polymorphism lets one interface behave differently per type.", "choices": {"A": "Encapsulation", "B": "Inheritance", "C": "Polymorphism", "D": "Coupling"}, "id": "cs_0144", "kind": "multiple_choice", "lang": "en", "question": "What gives one interface many behaviors?", "steps": ["Same call, varied act.", "That is polymorphism.", "Select option C."], "subject": "computer_science", "text": "Answer: Polymorphism.\nSteps:\n1. Same call, varied act.\n2. That is polymorphism.\n3. Select option C.\nAnswer: (C)", "topic": "oop"}
{"answer": "len() calls __len__, returning 3.", "choices": null, "id": "cs_0145", "kind": "worked_example", "lang": "en", "question": "A class defines __len__ returning 3. What is len(obj)?", "steps": ["len calls __len__.", "Method returns 3.", "Result 3."], "subject": "computer_science", "text": "Answer: 3.\nSteps:\n1. len calls __len__.\n2. Method returns 3.\n3. Result 3.", "topic": "oop"}
{"answer": "__init__ initializes new instances with starting state.", "choices": null, "id": "cs_0146", "kind": "concept", "lang": "en", "question": "What is a constructor in Python?", "steps": ["Called at creation.", "Method __init__.", "Sets attributes."], "subject": "computer_science", "text": "Answer: __init__ initializer.\nSteps:\n1. Called at creation.\n2. Method __init__.\n3. Sets attributes.", "topic": "oop"}
{"answer": "Rectangle(3, 4).area() = 3 x 4 = 12.", "choices": null, "id": "cs_0147", "kind": "worked_example", "lang": "en", "question": "Rectangle(3, 4).area() with area = w*h. What value?", "steps": ["Width 3, height 4.", "Multiply: 12.", "Result 12."], "subject": "computer_science", "text": "Answer: 12.\nSteps:\n1. Width 3, height 4.\n2. Multiply: 12.\n3. Result 12.", "topic": "oop"}
{"answer": "self refers to the current instance inside methods.", "choices": {"A": "Class", "B": "Module", "C": "Parent", "D": "Instance"}, "id": "cs_0148", "kind": "multiple_choice", "lang": "en", "question": "What does self refer to?", "steps": ["Method context.", "Current object.", "Select option D."], "subject": "computer_science", "text": "Answer: Instance.\nSteps:\n1. Method context.\n2. Current object.\n3. Select option D.\nAnswer: (D)", "topic": "oop"}
{"answer": "Polymorfismus umožňuje stejné rozhraní s různým chováním.", "choices": null, "id": "cs_0149", "kind": "concept", "lang": "cs", "question": "Co je polymorfismus?", "steps": ["Stejné volání.", "Různé chování.", "Podle typu objektu."], "subject": "computer_science", "text": "Answer: Jedno rozhraní, více chování.\nSteps:\n1. Stejné volání.\n2. Různé chování.\n3. Podle typu objektu.", "topic": "oop"}
{"answer": "Child overrides greet, so it returns 'hi child'.", "choices": null, "id": "cs_0150", "kind": "worked_example", "lang": "en", "question": "Child overrides greet() with 'hi child'. What does Child().greet() give?", "steps": ["Child defines greet.", "Override wins.", "Result 'hi child'."], "subject": "computer_science", "text": "Answer: 'hi child'.\nSteps:\n1. Child defines greet.\n2. Override wins.\n3. Result 'hi child'.", "topic": "oop"}
{"answer": "Selection sort repeatedly picks the minimum and swaps it forward.", "choices": null, "id": "cs_0151", "kind": "concept", "lang": "en", "question": "How does selection sort work?", "steps": ["Find minimum unsorted.", "Swap to front.", "Repeat for rest."], "subject": "computer_science", "text": "Answer: Pick min, swap forward.\nSteps:\n1. Find minimum unsorted.\n2. Swap to front.\n3. Repeat for rest.", "topic": "algorithms"}
{"answer": "Selection sort always scans quadratically: O(n^2).", "choices": {"A": "O(n^2)", "B": "O(n log n)", "C": "O(n)", "D": "O(log n)"}, "id": "cs_0152", "kind": "multiple_choice", "lang": "en", "question": "What is selection sort's complexity?", "steps": ["n passes over n.", "Quadratic total.", "Select option A."], "subject": "computer_science", "text": "Answer: O(n^2).\nSteps:\n1. n passes over n.\n2. Quadratic total.\n3. Select option A.\nAnswer: (A)", "topic": "algorithms"}
{"answer": "Selection sort gives [10,14,29] after two swaps.", "choices": null, "id": "cs_0153", "kind": "worked_example", "lang": "en", "question": "Selection-sort [29,10,14]. What are the steps?", "steps": ["Min is 10: swap to [10,29,14].", "Min of rest is 14: swap to [10,14,29].", "Sorted in 2 swaps."], "subject": "computer_science", "text": "Answer: [10,14,29].\nSteps:\n1. Min is 10: swap to [10,29,14].\n2. Min of rest is 14: swap to [10,14,29].\n3. Sorted in 2 swaps.", "topic": "algorithms"}
{"answer": "Třídění výběrem hledá minimum a přesouvá ho dopředu.", "choices": null, "id": "cs_0154", "kind": "concept", "lang": "cs", "question": "Co je třídění výběrem?", "steps": ["Najdi minimum.", "Prohoď dopředu.", "Opakuj pro zbytek."], "subject": "computer_science", "text": "Answer: Výběr minima dopředu.\nSteps:\n1. Najdi minimum.\n2. Prohoď dopředu.\n3. Opakuj pro zbytek.", "topic": "algorithms"}
{"answer": "Linear search worst case scans everything: O(n).", "choices": {"A": "O(1)", "B": "O(n)", "C": "O(log n)", "D": "O(n^2)"}, "id": "cs_0155", "kind": "multiple_choice", "lang": "en", "question": "What is linear search's worst case?", "steps": ["Target last or absent.", "Scan all n.", "Select option B."], "subject": "computer_science", "text": "Answer: O(n).\nSteps:\n1. Target last or absent.\n2. Scan all n.\n3. Select option B.\nAnswer: (B)", "topic": "algorithms"}
{"answer": "Searching 9 in [1..8] takes 8 comparisons and fails.", "choices": null, "id": "cs_0156", "kind": "worked_example", "lang": "en", "question": "Linear search for 9 in [1,2,3,4,5,6,7,8]. How many comparisons?", "steps": ["Check each of 8.", "None matches.", "8 comparisons, not found."], "subject": "computer_science", "text": "Answer: 8, not found.\nSteps:\n1. Check each of 8.\n2. None matches.\n3. 8 comparisons, not found.", "topic": "algorithms"}
{"answer": "Greedy algorithms take the locally best step hoping for global optimum.", "choices": null, "id": "cs_0157", "kind": "concept", "lang": "en", "question": "What is a greedy algorithm?", "steps": ["Choose best now.", "Never backtrack.", "Example: coin change."], "subject": "computer_science", "text": "Answer: Locally best steps.\nSteps:\n1. Choose best now.\n2. Never backtrack.\n3. Example: coin change.", "topic": "algorithms"}
{"answer": "Faktoriál 4 je 24, tedy 4 x 3 x 2 x 1.", "choices": null, "id": "cs_0158", "kind": "worked_example", "lang": "cs", "question": "Vypočítej faktoriál(4).", "steps": ["4 x faktoriál(3).", "Rozviň: 4x3x2x1.", "Výsledek = 24."], "subject": "computer_science", "text": "Answer: 24.\nSteps:\n1. 4 x faktoriál(3).\n2. Rozviň: 4x3x2x1.\n3. Výsledek = 24.", "topic": "algorithms"}
{"answer": "BFS uses a queue to expand level by level.", "choices": {"A": "Stack", "B": "Heap", "C": "Queue", "D": "Tree"}, "id": "cs_0159", "kind": "multiple_choice", "lang": "en", "question": "Which structure does BFS use?", "steps": ["Level order needed.", "Queue gives FIFO.", "Select option C."], "subject": "computer_science", "text": "Answer: Queue.\nSteps:\n1. Level order needed.\n2. Queue gives FIFO.\n3. Select option C.\nAnswer: (C)", "topic": "algorithms"}
{"answer": "Divide and conquer splits problems, solves parts, and combines answers.", "choices": null, "id": "cs_0160", "kind": "concept", "lang": "en", "question": "What is divide and conquer?", "steps": ["Divide input.", "Conquer parts.", "Combine results."], "subject": "computer_science", "text": "Answer: Split, solve, combine.\nSteps:\n1. Divide input.\n2. Conquer parts.\n3. Combine results.", "topic": "algorithms"}
{"answer": "Merging [1,4] and [2,3] gives [1,2,3,4] in 3 comparisons.", "choices": null, "id": "cs_0161", "kind": "worked_example", "lang": "en", "question": "Merge [1,4] and [2,3]. What are the steps?", "steps": ["1 vs 2: take 1.", "4 vs 2: take 2; 4 vs 3: take 3.", "Take 4: [1,2,3,4]."], "subject": "computer_science", "text": "Answer: [1,2,3,4].\nSteps:\n1. 1 vs 2: take 1.\n2. 4 vs 2: take 2; 4 vs 3: take 3.\n3. Take 4: [1,2,3,4].", "topic": "algorithms"}
{"answer": "Dijkstra computes shortest paths in weighted graphs.", "choices": {"A": "MST", "B": "Max flow", "C": "Sorting", "D": "Shortest path"}, "id": "cs_0162", "kind": "multiple_choice", "lang": "en", "question": "What does Dijkstra's algorithm find?", "steps": ["Weighted edges.", "Shortest distances.", "Select option D."], "subject": "computer_science", "text": "Answer: Shortest path.\nSteps:\n1. Weighted edges.\n2. Shortest distances.\n3. Select option D.\nAnswer: (D)", "topic": "algorithms"}
{"answer": "Hladový algoritmus volí lokálně nejlepší krok.", "choices": null, "id": "cs_0163", "kind": "concept", "lang": "cs", "question": "Co je hladový algoritmus?", "steps": ["Nejlepší krok teď.", "Bez návratu.", "Příklad: mince."], "subject": "computer_science", "text": "Answer: Lokálně nejlepší kroky.\nSteps:\n1. Nejlepší krok teď.\n2. Bez návratu.\n3. Příklad: mince.", "topic": "algorithms"}
{"answer": "Merge sort averages O(n log n).", "choices": {"A": "Bubble sort", "B": "Merge sort", "C": "Selection sort", "D": "Insertion sort"}, "id": "cs_0164", "kind": "multiple_choice", "lang": "en", "question": "Which averages O(n log n)?", "steps": ["Others are quadratic.", "Merge divides evenly.", "Select option B."], "subject": "computer_science", "text": "Answer: Merge sort.\nSteps:\n1. Others are quadratic.\n2. Merge divides evenly.\n3. Select option B.\nAnswer: (B)", "topic": "algorithms"}
{"answer": "3-disk Hanoi needs 7 moves (2^3 - 1).", "choices": null, "id": "cs_0165", "kind": "worked_example", "lang": "en", "question": "How many moves for 3-disk Tower of Hanoi?", "steps": ["Formula: 2^n - 1.", "Substitute: 8 - 1.", "Moves = 7."], "subject": "computer_science", "text": "Answer: 7.\nSteps:\n1. Formula: 2^n - 1.\n2. Substitute: 8 - 1.\n3. Moves = 7.", "topic": "algorithms"}
{"answer": "Big-Omega gives a lower growth bound.", "choices": null, "id": "cs_0166", "kind": "concept", "lang": "en", "question": "What is Big-Omega notation?", "steps": ["At least this fast.", "Lower bound.", "Example: Omega(n)."], "subject": "computer_science", "text": "Answer: Lower bound.\nSteps:\n1. At least this fast.\n2. Lower bound.\n3. Example: Omega(n).", "topic": "complexity"}
{"answer": "Omega bounds growth from below.", "choices": {"A": "Lower bound", "B": "Upper bound", "C": "Exact bound", "D": "No bound"}, "id": "cs_0167", "kind": "multiple_choice", "lang": "en", "question": "What does Omega describe?", "steps": ["Minimum growth.", "Lower bound.", "Select option A."], "subject": "computer_science", "text": "Answer: Lower bound.\nSteps:\n1. Minimum growth.\n2. Lower bound.\n3. Select option A.\nAnswer: (A)", "topic": "complexity"}
{"answer": "A triple loop with n = 10 runs 1,000 iterations.", "choices": null, "id": "cs_0168", "kind": "worked_example", "lang": "en", "question": "How many iterations for triple nested loops with n = 10?", "steps": ["Each level runs 10.", "Total = 10^3.", "Iterations = 1,000."], "subject": "computer_science", "text": "Answer: 1,000.\nSteps:\n1. Each level runs 10.\n2. Total = 10^3.\n3. Iterations = 1,000.", "topic": "complexity"}
{"answer": "Nejlepší případ je nejrychlejší možný vstup.", "choices": null, "id": "cs_0169", "kind": "concept", "lang": "cs", "question": "Co je nejlepší případ?", "steps": ["Nejrychlejší vstup.", "Dolní odhad.", "Příklad: prvek první."], "subject": "computer_science", "text": "Answer: Nejrychlejší vstup.\nSteps:\n1. Nejrychlejší vstup.\n2. Dolní odhad.\n3. Příklad: prvek první.", "topic": "complexity"}
{"answer": "O(n log n) grows slower than O(n^2).", "choices": {"A": "O(n)", "B": "O(log n)", "C": "O(n^2)", "D": "O(1)"}, "id": "cs_0170", "kind": "multiple_choice", "lang": "en", "question": "Which is slower than O(n log n)?", "steps": ["Compare growth.", "Quadratic exceeds.", "Select option C."], "subject": "computer_science", "text": "Answer: O(n^2).\nSteps:\n1. Compare growth.\n2. Quadratic exceeds.\n3. Select option C.\nAnswer: (C)", "topic": "complexity"}
{"answer": "Big-Theta bounds growth tightly from both sides.", "choices": null, "id": "cs_0171", "kind": "concept", "lang": "en", "question": "What is Big-Theta notation?", "steps": ["Upper and lower.", "Tight bound.", "Example: Theta(n log n)."], "subject": "computer_science", "text": "Answer: Tight bound.\nSteps:\n1. Upper and lower.\n2. Tight bound.\n3. Example: Theta(n log n).", "topic": "complexity"}
{"answer": "log2(1,000,000) is about 20, since 2^20 = 1,048,576.", "choices": null, "id": "cs_0172", "kind": "worked_example", "lang": "en", "question": "About how many binary search steps for n = 1,000,000?", "steps": ["Steps = log2(n).", "2^20 ≈ 1,000,000.", "About 20 steps."], "subject": "computer_science", "text": "Answer: 20.\nSteps:\n1. Steps = log2(n).\n2. 2^20 ≈ 1,000,000.\n3. About 20 steps.", "topic": "complexity"}
{"answer": "Smyčka O(n) s n = 1000 udělá 1000 kroků.", "choices": null, "id": "cs_0173", "kind": "worked_example", "lang": "cs", "question": "Kolik kroků má smyčka O(n) pro n = 1000?", "steps": ["Jeden průchod na prvek.", "n = 1000.", "Celkem 1000 kroků."], "subject": "computer_science", "text": "Answer: 1000.\nSteps:\n1. Jeden průchod na prvek.\n2. n = 1000.\n3. Celkem 1000 kroků.", "topic": "complexity"}
{"answer": "Big-O drops constant factors and keeps growth shape.", "choices": {"A": "Counted exactly", "B": "Ignored", "C": "Doubled", "D": "Logged"}, "id": "cs_0174", "kind": "multiple_choice", "lang": "en", "question": "What happens to constants in Big-O?", "steps": ["Only growth matters.", "Constants dropped.", "Select option B."], "subject": "computer_science", "text": "Answer: Ignored.\nSteps:\n1. Only growth matters.\n2. Constants dropped.\n3. Select option B.\nAnswer: (B)", "topic": "complexity"}
{"answer": "O(2^n) doubles work per added input, exploding fast.", "choices": null, "id": "cs_0175", "kind": "concept", "lang": "en", "question": "What is exponential complexity?", "steps": ["Doubles per input.", "Example: subsets.", "Infeasible past n ~ 30."], "subject": "computer_science", "text": "Answer: Doubling per input.\nSteps:\n1. Doubles per input.\n2. Example: subsets.\n3. Infeasible past n ~ 30.", "topic": "complexity"}
{"answer": "10 items have 2^10 = 1024 subsets.", "choices": null, "id": "cs_0176", "kind": "worked_example", "lang": "en", "question": "How many subsets does a 10-item set have?", "steps": ["Each item in or out.", "Total = 2^10.", "Subsets = 1024."], "subject": "computer_science", "text": "Answer: 1024.\nSteps:\n1. Each item in or out.\n2. Total = 2^10.\n3. Subsets = 1024.", "topic": "complexity"}
{"answer": "O(2^n) outgrows all polynomial bounds.", "choices": {"A": "O(n^2)", "B": "O(n^3)", "C": "O(n log n)", "D": "O(2^n)"}, "id": "cs_0177", "kind": "multiple_choice", "lang": "en", "question": "Which grows fastest?", "steps": ["Exponential beats polynomial.", "2^n wins.", "Select option D."], "subject": "computer_science", "text": "Answer: O(2^n).\nSteps:\n1. Exponential beats polynomial.\n2. 2^n wins.\n3. Select option D.\nAnswer: (D)", "topic": "complexity"}
{"answer": "Exponenciální složitost zdvojnásobuje práci s každým vstupem.", "choices": null, "id": "cs_0178", "kind": "concept", "lang": "cs", "question": "Co je exponenciální složitost?", "steps": ["Dvojnásobek na vstup.", "Příklad: podmnožiny.", "Nezvládnutelná pro velká n."], "subject": "computer_science", "text": "Answer: Dvojnásobení na vstup.\nSteps:\n1. Dvojnásobek na vstup.\n2. Příklad: podmnožiny.\n3. Nezvládnutelná pro velká n.", "topic": "complexity"}
{"answer": "O(n) needs 1e6 steps while O(n^2) needs 1e12 for n = 1e6.", "choices": null, "id": "cs_0179", "kind": "worked_example", "lang": "en", "question": "Compare O(n) vs O(n^2) steps for n = 1,000,000.", "steps": ["O(n): 1,000,000.", "O(n^2): 10^12.", "Quadratic is a trillion."], "subject": "computer_science", "text": "Answer: 1e6 vs 1e12.\nSteps:\n1. O(n): 1,000,000.\n2. O(n^2): 10^12.\n3. Quadratic is a trillion.", "topic": "complexity"}
{"answer": "NP-complete problems are the hardest in NP.", "choices": {"A": "Hardest in NP", "B": "Easy", "C": "Unsolvable", "D": "Linear"}, "id": "cs_0180", "kind": "multiple_choice", "lang": "en", "question": "What does NP-complete mean?", "steps": ["In NP class.", "All NP reduces to it.", "Select option A."], "subject": "computer_science", "text": "Answer: Hardest in NP.\nSteps:\n1. In NP class.\n2. All NP reduces to it.\n3. Select option A.\nAnswer: (A)", "topic": "complexity"}
{"answer": "Doubly linked lists add backward pointers for two-way traversal.", "choices": null, "id": "cs_0181", "kind": "concept", "lang": "en", "question": "What is a doubly linked list?", "steps": ["Each node two links.", "Forward and back.", "Costs extra memory."], "subject": "computer_science", "text": "Answer: Two-way linked nodes.\nSteps:\n1. Each node two links.\n2. Forward and back.\n3. Costs extra memory.", "topic": "data_structures"}
{"answer": "Backward links allow traversal both ways.", "choices": {"A": "Forward only", "B": "Both directions", "C": "Random only", "D": "No traversal"}, "id": "cs_0182", "kind": "multiple_choice", "lang": "en", "question": "How can doubly lists traverse?", "steps": ["Two pointers exist.", "Both ways work.", "Select option B."], "subject": "computer_science", "text": "Answer: Both directions.\nSteps:\n1. Two pointers exist.\n2. Both ways work.\n3. Select option B.\nAnswer: (B)", "topic": "data_structures"}
{"answer": "Popping after pushing 1, 2 gives 2 then 1.", "choices": null, "id": "cs_0183", "kind": "worked_example", "lang": "en", "question": "Push 1, 2 onto a stack, pop twice. What order?", "steps": ["Top is 2: pop 2.", "Top is 1: pop 1.", "Order 2, 1."], "subject": "computer_science", "text": "Answer: 2, 1.\nSteps:\n1. Top is 2: pop 2.\n2. Top is 1: pop 1.\n3. Order 2, 1.", "topic": "data_structures"}
{"answer": "Spojový seznam spojuje uzly ukazateli.", "choices": null, "id": "cs_0184", "kind": "concept", "lang": "cs", "question": "Co je spojový seznam?", "steps": ["Uzly s daty.", "Ukazatele na další.", "Rychlé vkládání."], "subject": "computer_science", "text": "Answer: Uzly s ukazateli.\nSteps:\n1. Uzly s daty.\n2. Ukazatele na další.\n3. Rychlé vkládání.", "topic": "data_structures"}
{"answer": "Hash tables average O(1) lookup via direct indexing.", "choices": {"A": "O(1)", "B": "O(n)", "C": "O(log n)", "D": "O(n^2)"}, "id": "cs_0185", "kind": "multiple_choice", "lang": "en", "question": "What is average hash lookup time?", "steps": ["Hash to slot.", "Direct access.", "Select option A."], "subject": "computer_science", "text": "Answer: O(1).\nSteps:\n1. Hash to slot.\n2. Direct access.\n3. Select option A.\nAnswer: (A)", "topic": "data_structures"}
{"answer": "Load factor is 6/8 = 0.75.", "choices": null, "id": "cs_0186", "kind": "worked_example", "lang": "en", "question": "6 items in 8 slots. What is the load factor?", "steps": ["Divide items by slots.", "6/8 = 0.75.", "Load = 0.75."], "subject": "computer_science", "text": "Answer: 0.75.\nSteps:\n1. Divide items by slots.\n2. 6/8 = 0.75.\n3. Load = 0.75.", "topic": "data_structures"}
{"answer": "A BST orders keys left-smaller, right-larger; plain trees do not.", "choices": null, "id": "cs_0187", "kind": "concept", "lang": "en", "question": "How do binary trees and BSTs differ?", "steps": ["Binary: two children.", "BST adds ordering.", "Ordering enables search."], "subject": "computer_science", "text": "Answer: Ordering rule added.\nSteps:\n1. Binary: two children.\n2. BST adds ordering.\n3. Ordering enables search.", "topic": "data_structures"}
{"answer": "Vyvážený strom se 7 uzly má hloubku 3.", "choices": null, "id": "cs_0188", "kind": "worked_example", "lang": "cs", "question": "Jaká je hloubka vyváženého stromu se 7 uzly?", "steps": ["Úrovně: 1, 2, 4.", "Celkem 7 uzlů.", "Hloubka = 3."], "subject": "computer_science", "text": "Answer: 3.\nSteps:\n1. Úrovně: 1, 2, 4.\n2. Celkem 7 uzlů.\n3. Hloubka = 3.", "topic": "data_structures"}
{"answer": "Children of node i sit at 2i+1 and 2i+2 in array heaps.", "choices": {"A": "i+1, i+2", "B": "2i, 2i+1", "C": "2i+1, 2i+2", "D": "i/2"}, "id": "cs_0189", "kind": "multiple_choice", "lang": "en", "question": "Where are children in an array heap?", "steps": ["Zero-based array.", "Left 2i+1, right 2i+2.", "Select option C."], "subject": "computer_science", "text": "Answer: 2i+1, 2i+2.\nSteps:\n1. Zero-based array.\n2. Left 2i+1, right 2i+2.\n3. Select option C.\nAnswer: (C)", "topic": "data_structures"}
{"answer": "Adjacency lists store neighbors per node; matrices store a full V x V grid.", "choices": null, "id": "cs_0190", "kind": "concept", "lang": "en", "question": "How do adjacency lists and matrices differ?", "steps": ["Lists: per-node neighbors.", "Matrix: full grid.", "Lists save sparse space."], "subject": "computer_science", "text": "Answer: Neighbors versus grid.\nSteps:\n1. Lists: per-node neighbors.\n2. Matrix: full grid.\n3. Lists save sparse space.", "topic": "data_structures"}
{"answer": "K5 has 5 x 4 / 2 = 10 edges.", "choices": null, "id": "cs_0191", "kind": "worked_example", "lang": "en", "question": "How many edges in complete graph K5?", "steps": ["Formula: n(n-1)/2.", "Substitute: 5x4/2.", "Edges = 10."], "subject": "computer_science", "text": "Answer: 10.\nSteps:\n1. Formula: n(n-1)/2.\n2. Substitute: 5x4/2.\n3. Edges = 10.", "topic": "data_structures"}
{"answer": "A V x V matrix uses O(V^2) space.", "choices": {"A": "O(V)", "B": "O(E)", "C": "O(V+E)", "D": "O(V^2)"}, "id": "cs_0192", "kind": "multiple_choice", "lang": "en", "question": "What space does an adjacency matrix use?", "steps": ["V rows, V cols.", "V squared cells.", "Select option D."], "subject": "computer_science", "text": "Answer: O(V^2).\nSteps:\n1. V rows, V cols.\n2. V squared cells.\n3. Select option D.\nAnswer: (D)", "topic": "data_structures"}
{"answer": "Halda je strom, kde rodič je menší (či větší) než děti.", "choices": null, "id": "cs_0193", "kind": "concept", "lang": "cs", "question": "Co je halda (heap)?", "steps": ["Stromová struktura.", "Rodič extrémní.", "Kořen minimum či maximum."], "subject": "computer_science", "text": "Answer: Strom s extrémem.\nSteps:\n1. Stromová struktura.\n2. Rodič extrémní.\n3. Kořen minimum či maximum.", "topic": "data_structures"}
{"answer": "Heaps give O(log n) priority queue operations.", "choices": {"A": "Stack", "B": "Heap", "C": "Queue", "D": "Array"}, "id": "cs_0194", "kind": "multiple_choice", "lang": "en", "question": "What implements a priority queue?", "steps": ["Need min/max fast.", "Heap provides it.", "Select option B."], "subject": "computer_science", "text": "Answer: Heap.\nSteps:\n1. Need min/max fast.\n2. Heap provides it.\n3. Select option B.\nAnswer: (B)", "topic": "data_structures"}
{"answer": "Inserting 5, 3, 4 into a min-heap leaves root 3.", "choices": null, "id": "cs_0195", "kind": "worked_example", "lang": "en", "question": "Insert 5, 3, 4 into a min-heap. What is the root?", "steps": ["Insert 5: root 5.", "Insert 3: bubbles to root.", "Insert 4: root stays 3."], "subject": "computer_science", "text": "Answer: 3.\nSteps:\n1. Insert 5: root 5.\n2. Insert 3: bubbles to root.\n3. Insert 4: root stays 3.", "topic": "data_structures"}
{"answer": "String methods like upper() and split() transform text.", "choices": null, "id": "cs_0196", "kind": "concept", "lang": "en", "question": "What do Python string methods do?", "steps": ["upper() capitalizes.", "split() divides.", "strip() trims."], "subject": "computer_science", "text": "Answer: Transform text.\nSteps:\n1. upper() capitalizes.\n2. split() divides.\n3. strip() trims.", "topic": "python"}
{"answer": "'a,b'.split(',') gives ['a', 'b'].", "choices": {"A": "['a','b']", "B": "'ab'", "C": "['a,b']", "D": "Error"}, "id": "cs_0197", "kind": "multiple_choice", "lang": "en", "question": "What does 'a,b'.split(',') return?", "steps": ["Split on comma.", "Two parts.", "Select option A."], "subject": "computer_science", "text": "Answer: ['a','b'].\nSteps:\n1. Split on comma.\n2. Two parts.\n3. Select option A.\nAnswer: (A)", "topic": "python"}
{"answer": "'hello'.upper() returns 'HELLO'.", "choices": null, "id": "cs_0198", "kind": "worked_example", "lang": "en", "question": "What does 'hello'.upper() return?", "steps": ["Capitalize each letter.", "Result HELLO.", "Returns 'HELLO'."], "subject": "computer_science", "text": "Answer: 'HELLO'.\nSteps:\n1. Capitalize each letter.\n2. Result HELLO.\n3. Returns 'HELLO'.", "topic": "python"}
{"answer": "Řetězec je neměnná posloupnost znaků.", "choices": null, "id": "cs_0199", "kind": "concept", "lang": "cs", "question": "Co je řetězec (str)?", "steps": ["Posloupnost znaků.", "Neměnný typ.", "Metody upper, split."], "subject": "computer_science", "text": "Answer: Neměnné znaky.\nSteps:\n1. Posloupnost znaků.\n2. Neměnný typ.\n3. Metody upper, split.", "topic": "python"}
{"answer": "list.append mutates in place and returns None.", "choices": {"A": "New list", "B": "Length", "C": "None", "D": "True"}, "id": "cs_0200", "kind": "multiple_choice", "lang": "en", "question": "What does append() return?", "steps": ["Mutates in place.", "No value built.", "Select option C."], "subject": "computer_science", "text": "Answer: None.\nSteps:\n1. Mutates in place.\n2. No value built.\n3. Select option C.\nAnswer: (C)", "topic": "python"}
{"answer": "append() adds one item while extend() adds each item from an iterable.", "choices": null, "id": "cs_0201", "kind": "concept", "lang": "en", "question": "How do append() and extend() differ?", "steps": ["append takes one object.", "extend iterates input.", "Use extend to merge lists."], "subject": "computer_science", "text": "Answer: One item versus many.\nSteps:\n1. append takes one object.\n2. extend iterates input.\n3. Use extend to merge lists.", "topic": "python"}
{"answer": "[1,2,3].length is 3.", "choices": {"A": "2", "B": "3", "C": "4", "D": "undefined"}, "id": "cs_0202", "kind": "multiple_choice", "lang": "en", "question": "What does [1,2,3].length return?", "steps": ["Count elements.", "Three items.", "Select option B."], "subject": "computer_science", "text": "Answer: 3.\nSteps:\n1. Count elements.\n2. Three items.\n3. Select option B.\nAnswer: (B)", "topic": "javascript"}
{"answer": "SELECT 7 * 6 returns 42.", "choices": null, "id": "cs_0203", "kind": "worked_example", "lang": "en", "question": "What does SELECT 7 * 6 return?", "steps": ["Multiply 7 by 6.", "7 x 6 = 42.", "Result is 42."], "subject": "computer_science", "text": "Answer: 42.\nSteps:\n1. Multiply 7 by 6.\n2. 7 x 6 = 42.\n3. Result is 42.", "topic": "sql"}
{"answer": "A /26 network has 62 usable hosts.", "choices": null, "id": "cs_0204", "kind": "worked_example", "lang": "en", "question": "How many usable hosts in a /26 network?", "steps": ["Host bits = 32 - 26 = 6.", "Addresses = 2^6 = 64.", "Usable = 64 - 2 = 62."], "subject": "computer_science", "text": "Answer: 62.\nSteps:\n1. Host bits = 32 - 26 = 6.\n2. Addresses = 2^6 = 64.\n3. Usable = 64 - 2 = 62.", "topic": "networking"}
{"answer": "C v ACID znamená konzistence.", "choices": {"A": "Atomicita", "B": "Konzistence", "C": "Izolace", "D": "Trvanlivost"}, "id": "cs_0205", "kind": "multiple_choice", "lang": "cs", "question": "Co znamená C v ACID?", "steps": ["ACID vlastnosti.", "C je konzistence.", "Vyber možnost B."], "subject": "computer_science", "text": "Answer: Konzistence.\nSteps:\n1. ACID vlastnosti.\n2. C je konzistence.\n3. Vyber možnost B.\nAnswer: (B)", "topic": "databases"}
{"answer": "A context switch saves one process state and restores another.", "choices": null, "id": "cs_0206", "kind": "concept", "lang": "en", "question": "What is a context switch?", "steps": ["Save registers and state.", "Load next process.", "Resume execution."], "subject": "computer_science", "text": "Answer: Swap running process.\nSteps:\n1. Save registers and state.\n2. Load next process.\n3. Resume execution.", "topic": "operating_systems"}
{"answer": "Balance starts at 100, deposit 50 gives 150.", "choices": null, "id": "cs_0207", "kind": "worked_example", "lang": "en", "question": "Account balance 100, deposit(50). What is the balance?", "steps": ["Start at 100.", "Add 50.", "Balance = 150."], "subject": "computer_science", "text": "Answer: 150.\nSteps:\n1. Start at 100.\n2. Add 50.\n3. Balance = 150.", "topic": "oop"}
{"answer": "BFS finds shortest paths in unweighted graphs.", "choices": {"A": "Dijkstra", "B": "BFS", "C": "DFS", "D": "Merge sort"}, "id": "cs_0208", "kind": "multiple_choice", "lang": "en", "question": "Which finds shortest path in unweighted graphs?", "steps": ["Unweighted edges.", "BFS level order.", "Select option B."], "subject": "computer_science", "text": "Answer: BFS.\nSteps:\n1. Unweighted edges.\n2. BFS level order.\n3. Select option B.\nAnswer: (B)", "topic": "algorithms"}
{"answer": "Worst-case analysis bounds runtime over all inputs of size n.", "choices": null, "id": "cs_0209", "kind": "concept", "lang": "en", "question": "What is worst-case analysis?", "steps": ["Consider all inputs.", "Take maximum cost.", "Guarantees an upper bound."], "subject": "computer_science", "text": "Answer: Maximum over inputs.\nSteps:\n1. Consider all inputs.\n2. Take maximum cost.\n3. Guarantees an upper bound.", "topic": "complexity"}
{"answer": "Pop vrátí 6, protože zásobník je LIFO.", "choices": null, "id": "cs_0210", "kind": "worked_example", "lang": "cs", "question": "Zásobník obsahuje 5, 6. Co vrátí pop()?", "steps": ["Nahoře je 6.", "Pop odebere 6.", "Výsledek je 6."], "subject": "computer_science", "text": "Answer: 6.\nSteps:\n1. Nahoře je 6.\n2. Pop odebere 6.\n3. Výsledek je 6.", "topic": "data_structures"}
{"answer": "Tuples are immutable ordered sequences for fixed records.", "choices": null, "id": "cs_0211", "kind": "concept", "lang": "en", "question": "What are Python tuples for?", "steps": ["Ordered items.", "Cannot change.", "Good for records."], "subject": "computer_science", "text": "Answer: Immutable records.\nSteps:\n1. Ordered items.\n2. Cannot change.\n3. Good for records.", "topic": "python"}
{"answer": "typeof 'hi' is 'string'.", "choices": {"A": "string", "B": "number", "C": "object", "D": "undefined"}, "id": "cs_0212", "kind": "multiple_choice", "lang": "en", "question": "What is typeof 'hi'?", "steps": ["'hi' is text.", "Type is string.", "Select option A."], "subject": "computer_science", "text": "Answer: string.\nSteps:\n1. 'hi' is text.\n2. Type is string.\n3. Select option A.\nAnswer: (A)", "topic": "javascript"}
{"answer": "COUNT returns 4 when 4 of 10 rows match.", "choices": null, "id": "cs_0213", "kind": "worked_example", "lang": "en", "question": "Table has 10 rows, WHERE matches 4. What does COUNT(*) return?", "steps": ["Filter to 4 rows.", "Count them.", "Result = 4."], "subject": "computer_science", "text": "Answer: 4.\nSteps:\n1. Filter to 4 rows.\n2. Count them.\n3. Result = 4.", "topic": "sql"}
{"answer": "10.0.0.0/8 has 2^24 = 16777216 addresses.", "choices": null, "id": "cs_0214", "kind": "worked_example", "lang": "en", "question": "How many addresses in 10.0.0.0/8?", "steps": ["Host bits = 24.", "Total = 2^24.", "Addresses = 16777216."], "subject": "computer_science", "text": "Answer: 16777216.\nSteps:\n1. Host bits = 24.\n2. Total = 2^24.\n3. Addresses = 16777216.", "topic": "networking"}
{"answer": "Řádky přidává příkaz INSERT.", "choices": {"A": "SELECT", "B": "INSERT", "C": "DELETE", "D": "UPDATE"}, "id": "cs_0215", "kind": "multiple_choice", "lang": "cs", "question": "Která operace přidává řádky?", "steps": ["SELECT čte.", "INSERT přidává.", "Vyber možnost B."], "subject": "computer_science", "text": "Answer: INSERT.\nSteps:\n1. SELECT čte.\n2. INSERT přidává.\n3. Vyber možnost B.\nAnswer: (B)", "topic": "databases"}
{"answer": "A system call is the interface for user programs to request kernel services.", "choices": null, "id": "cs_0216", "kind": "concept", "lang": "en", "question": "What is a system call?", "steps": ["User needs kernel help.", "Trap to kernel.", "Return result."], "subject": "computer_science", "text": "Answer: Kernel service request.\nSteps:\n1. User needs kernel help.\n2. Trap to kernel.\n3. Return result.", "topic": "operating_systems"}
{"answer": "Square(5).area() returns 25.", "choices": null, "id": "cs_0217", "kind": "worked_example", "lang": "en", "question": "Square side 5, area = s*s. What does Square(5).area() give?", "steps": ["Side = 5.", "Area = 5 x 5.", "Result = 25."], "subject": "computer_science", "text": "Answer: 25.\nSteps:\n1. Side = 5.\n2. Area = 5 x 5.\n3. Result = 25.", "topic": "oop"}
{"answer": "With early exit, sorted input needs one pass: O(n).", "choices": {"A": "O(n)", "B": "O(n^2)", "C": "O(log n)", "D": "O(1)"}, "id": "cs_0218", "kind": "multiple_choice", "lang": "en", "question": "What is bubble sort best case with early exit?", "steps": ["Sorted input detected.", "One pass.", "Select option A."], "subject": "computer_science", "text": "Answer: O(n).\nSteps:\n1. Sorted input detected.\n2. One pass.\n3. Select option A.\nAnswer: (A)", "topic": "algorithms"}
{"answer": "Amortized analysis averages cost over a sequence of operations.", "choices": null, "id": "cs_0219", "kind": "concept", "lang": "en", "question": "What is amortized analysis?", "steps": ["Many operations.", "Average the cost.", "Example: dynamic array."], "subject": "computer_science", "text": "Answer: Average over sequence.\nSteps:\n1. Many operations.\n2. Average the cost.\n3. Example: dynamic array.", "topic": "complexity"}
{"answer": "Dequeue vrátí 1, protože fronta je FIFO.", "choices": null, "id": "cs_0220", "kind": "worked_example", "lang": "cs", "question": "Fronta obsahuje 1, 2. Co vrátí dequeue?", "steps": ["Vpředu je 1.", "Dequeue odebere 1.", "Výsledek je 1."], "subject": "computer_science", "text": "Answer: 1.\nSteps:\n1. Vpředu je 1.\n2. Dequeue odebere 1.\n3. Výsledek je 1.", "topic": "data_structures"}
{"answer": "Dict comprehensions build dicts as {k: v for ...} in one line.", "choices": null, "id": "cs_0221", "kind": "concept", "lang": "en", "question": "What is a dict comprehension?", "steps": ["Loop inside braces.", "Build key-value pairs.", "Example: {x: x*x}."], "subject": "computer_science", "text": "Answer: One-line dict builder.\nSteps:\n1. Loop inside braces.\n2. Build key-value pairs.\n3. Example: {x: x*x}.", "topic": "python"}
{"answer": "'5' - 2 is 3 because minus coerces to number.", "choices": {"A": "'52'", "B": "3", "C": "'3'", "D": "NaN"}, "id": "cs_0222", "kind": "multiple_choice", "lang": "en", "question": "What does '5' - 2 give in JavaScript?", "steps": ["Minus coerces.", "'5' becomes 5.", "Select option B."], "subject": "computer_science", "text": "Answer: 3.\nSteps:\n1. Minus coerces.\n2. '5' becomes 5.\n3. Select option B.\nAnswer: (B)", "topic": "javascript"}
{"answer": "SUM of (10, 20) is 30.", "choices": null, "id": "cs_0223", "kind": "worked_example", "lang": "en", "question": "What does SELECT SUM(x) give for x in (10,20)?", "steps": ["Add values.", "10 + 20 = 30.", "Result = 30."], "subject": "computer_science", "text": "Answer: 30.\nSteps:\n1. Add values.\n2. 10 + 20 = 30.\n3. Result = 30.", "topic": "sql"}
{"answer": "A /30 has 2 usable hosts.", "choices": null, "id": "cs_0224", "kind": "worked_example", "lang": "en", "question": "How many usable hosts in a /30 network?", "steps": ["Host bits = 2.", "Addresses = 4.", "Usable = 4 - 2 = 2."], "subject": "computer_science", "text": "Answer: 2.\nSteps:\n1. Host bits = 2.\n2. Addresses = 4.\n3. Usable = 4 - 2 = 2.", "topic": "networking"}
{"answer": "DELETE maže řádky z tabulky.", "choices": {"A": "Maže řádky", "B": "Přidává řádky", "C": "Třídí řádky", "D": "Spojuje tabulky"}, "id": "cs_0225", "kind": "multiple_choice", "lang": "cs", "question": "Co dělá příkaz DELETE?", "steps": ["DELETE odstraňuje.", "Maže vybrané řádky.", "Vyber možnost A."], "subject": "computer_science", "text": "Answer: Maže řádky.\nSteps:\n1. DELETE odstraňuje.\n2. Maže vybrané řádky.\n3. Vyber možnost A.\nAnswer: (A)", "topic": "databases"}
{"answer": "Virtual memory extends RAM using disk space with address translation.", "choices": null, "id": "cs_0226", "kind": "concept", "lang": "en", "question": "What is virtual memory?", "steps": ["Programs see large space.", "OS maps to RAM or disk.", "Enables bigger programs."], "subject": "computer_science", "text": "Answer: RAM extended by disk.\nSteps:\n1. Programs see large space.\n2. OS maps to RAM or disk.\n3. Enables bigger programs.", "topic": "operating_systems"}
{"answer": "Person('Ann', 30).age is 30.", "choices": null, "id": "cs_0227", "kind": "worked_example", "lang": "en", "question": "Person stores name and age. What is Person('Ann', 30).age?", "steps": ["Name is Ann.", "Age is 30.", "Attribute age = 30."], "subject": "computer_science", "text": "Answer: 30.\nSteps:\n1. Name is Ann.\n2. Age is 30.\n3. Attribute age = 30.", "topic": "oop"}
{"answer": "Merge sort guarantees O(n log n) worst case.", "choices": {"A": "Quicksort", "B": "Merge sort", "C": "Bubble sort", "D": "Insertion sort"}, "id": "cs_0228", "kind": "multiple_choice", "lang": "en", "question": "Which sort has O(n log n) worst case?", "steps": ["Quicksort degrades.", "Merge divides evenly.", "Select option B."], "subject": "computer_science", "text": "Answer: Merge sort.\nSteps:\n1. Quicksort degrades.\n2. Merge divides evenly.\n3. Select option B.\nAnswer: (B)", "topic": "algorithms"}
{"answer": "P contains problems solvable in polynomial time.", "choices": null, "id": "cs_0229", "kind": "concept", "lang": "en", "question": "What is complexity class P?", "steps": ["Polynomial time.", "Efficiently solvable.", "Example: sorting."], "subject": "computer_science", "text": "Answer: Polynomial-time problems.\nSteps:\n1. Polynomial time.\n2. Efficiently solvable.\n3. Example: sorting.", "topic": "complexity"}
{"answer": "Prvek na indexu 1 je číslo 20.", "choices": null, "id": "cs_0230", "kind": "worked_example", "lang": "cs", "question": "Pole je [10,20,30]. Co je prvek na indexu 1?", "steps": ["Index 0 je 10.", "Index 1 je 20.", "Výsledek je 20."], "subject": "computer_science", "text": "Answer: 20.\nSteps:\n1. Index 0 je 10.\n2. Index 1 je 20.\n3. Výsledek je 20.", "topic": "data_structures"}
{"answer": "F-strings embed expressions as f'{x}' evaluated at runtime.", "choices": null, "id": "cs_0231", "kind": "concept", "lang": "en", "question": "What are Python f-strings?", "steps": ["Prefix f.", "Braces hold code.", "Rendered as text."], "subject": "computer_science", "text": "Answer: Embedded expressions.\nSteps:\n1. Prefix f.\n2. Braces hold code.\n3. Rendered as text.", "topic": "python"}
{"answer": "'abc'.toUpperCase() returns 'ABC'.", "choices": {"A": "'ABC'", "B": "'abc'", "C": "'Abc'", "D": "Error"}, "id": "cs_0232", "kind": "multiple_choice", "lang": "en", "question": "What does 'abc'.toUpperCase() return?", "steps": ["Capitalize all.", "Result ABC.", "Select option A."], "subject": "computer_science", "text": "Answer: 'ABC'.\nSteps:\n1. Capitalize all.\n2. Result ABC.\n3. Select option A.\nAnswer: (A)", "topic": "javascript"}
{"answer": "SELECT 100 - 37 returns 63.", "choices": null, "id": "cs_0233", "kind": "worked_example", "lang": "en", "question": "What does SELECT 100 - 37 return?", "steps": ["Subtract 37.", "100 - 37 = 63.", "Result is 63."], "subject": "computer_science", "text": "Answer: 63.\nSteps:\n1. Subtract 37.\n2. 100 - 37 = 63.\n3. Result is 63.", "topic": "sql"}
{"answer": "A /25 network has 126 usable hosts.", "choices": null, "id": "cs_0234", "kind": "worked_example", "lang": "en", "question": "How many usable hosts in a /25 network?", "steps": ["Host bits = 7.", "Addresses = 128.", "Usable = 128 - 2 = 126."], "subject": "computer_science", "text": "Answer: 126.\nSteps:\n1. Host bits = 7.\n2. Addresses = 128.\n3. Usable = 128 - 2 = 126.", "topic": "networking"}
{"answer": "SELECT DISTINCT odstraní duplicitní řádky.", "choices": {"A": "Odstraní duplicity", "B": "Seřadí řádky", "C": "Spojí tabulky", "D": "Smaže tabulku"}, "id": "cs_0235", "kind": "multiple_choice", "lang": "cs", "question": "Co dělá SELECT DISTINCT?", "steps": ["DISTINCT filtruje.", "Duplicity pryč.", "Vyber možnost A."], "subject": "computer_science", "text": "Answer: Odstraní duplicity.\nSteps:\n1. DISTINCT filtruje.\n2. Duplicity pryč.\n3. Vyber možnost A.\nAnswer: (A)", "topic": "databases"}
{"answer": "Deadlock is circular waiting where each process holds a needed resource.", "choices": null, "id": "cs_0236", "kind": "concept", "lang": "en", "question": "What is a deadlock?", "steps": ["Each waits.", "Cycle of holders.", "Nothing proceeds."], "subject": "computer_science", "text": "Answer: Circular wait.\nSteps:\n1. Each waits.\n2. Cycle of holders.\n3. Nothing proceeds.", "topic": "operating_systems"}
{"answer": "B inherits x = 5 from A.", "choices": null, "id": "cs_0237", "kind": "worked_example", "lang": "en", "question": "Class A defines x = 5, B(A) inherits. What is B().x?", "steps": ["A sets x.", "B inherits A.", "B().x = 5."], "subject": "computer_science", "text": "Answer: 5.\nSteps:\n1. A sets x.\n2. B inherits A.\n3. B().x = 5.", "topic": "oop"}
{"answer": "Binary search on 8 items needs at most 3 comparisons.", "choices": {"A": "2", "B": "3", "C": "4", "D": "8"}, "id": "cs_0238", "kind": "multiple_choice", "lang": "en", "question": "What is worst-case binary search comparisons for n = 8?", "steps": ["log2(8) = 3.", "Halve thrice.", "Select option B."], "subject": "computer_science", "text": "Answer: 3.\nSteps:\n1. log2(8) = 3.\n2. Halve thrice.\n3. Select option B.\nAnswer: (B)", "topic": "algorithms"}
{"answer": "Space-time tradeoff exchanges memory for speed or vice versa.", "choices": null, "id": "cs_0239", "kind": "concept", "lang": "en", "question": "What is a space-time tradeoff?", "steps": ["More memory, less time.", "Or less memory, more time.", "Example: caching."], "subject": "computer_science", "text": "Answer: Memory versus speed.\nSteps:\n1. More memory, less time.\n2. Or less memory, more time.\n3. Example: caching.", "topic": "complexity"}
{"answer": "Minimum je v kořenu, tedy 3.", "choices": null, "id": "cs_0240", "kind": "worked_example", "lang": "cs", "question": "Min-halda je [3,5,4]. Kde je minimum?", "steps": ["Kořen je 3.", "Děti větší.", "Minimum je 3."], "subject": "computer_science", "text": "Answer: 3.\nSteps:\n1. Kořen je 3.\n2. Děti větší.\n3. Minimum je 3.", "topic": "data_structures"}
{"answer": "Generators yield items lazily one at a time with yield.", "choices": null, "id": "cs_0241", "kind": "concept", "lang": "en", "question": "What is a Python generator?", "steps": ["Uses yield.", "Lazy iteration.", "Saves memory."], "subject": "computer_science", "text": "Answer: Lazy iterator.\nSteps:\n1. Uses yield.\n2. Lazy iteration.\n3. Saves memory.", "topic": "python"}
{"answer": "[] + [] is '' (empty string).", "choices": {"A": "''", "B": "0", "C": "[]", "D": "NaN"}, "id": "cs_0242", "kind": "multiple_choice", "lang": "en", "question": "What does [] + [] give in JavaScript?", "steps": ["Arrays to strings.", "'' + ''.", "Select option A."], "subject": "computer_science", "text": "Answer: ''.\nSteps:\n1. Arrays to strings.\n2. '' + ''.\n3. Select option A.\nAnswer: (A)", "topic": "javascript"}
{"answer": "LENGTH('hello') is 5.", "choices": null, "id": "cs_0243", "kind": "worked_example", "lang": "en", "question": "What does SELECT LENGTH('hello') return?", "steps": ["Count letters.", "h-e-l-l-o = 5.", "Result = 5."], "subject": "computer_science", "text": "Answer: 5.\nSteps:\n1. Count letters.\n2. h-e-l-l-o = 5.\n3. Result = 5.", "topic": "sql"}
{"answer": "Payload is 1500 - 20 = 1480 bytes.", "choices": null, "id": "cs_0244", "kind": "worked_example", "lang": "en", "question": "Packet 1500 bytes, header 20. What is the payload size?", "steps": ["Total 1500.", "Minus header 20.", "Payload = 1480."], "subject": "computer_science", "text": "Answer: 1480.\nSteps:\n1. Total 1500.\n2. Minus header 20.\n3. Payload = 1480.", "topic": "networking"}
{"answer": "Data mění příkaz UPDATE.", "choices": {"A": "SELECT", "B": "UPDATE", "C": "JOIN", "D": "GROUP BY"}, "id": "cs_0245", "kind": "multiple_choice", "lang": "cs", "question": "Který příkaz mění existující data?", "steps": ["SELECT čte.", "UPDATE mění.", "Vyber možnost B."], "subject": "computer_science", "text": "Answer: UPDATE.\nSteps:\n1. SELECT čte.\n2. UPDATE mění.\n3. Vyber možnost B.\nAnswer: (B)", "topic": "databases"}
{"answer": "Paging splits memory into fixed-size pages and frames.", "choices": null, "id": "cs_0246", "kind": "concept", "lang": "en", "question": "What is paging?", "steps": ["Fixed blocks.", "Pages map to frames.", "Avoids fragmentation."], "subject": "computer_science", "text": "Answer: Fixed-size blocks.\nSteps:\n1. Fixed blocks.\n2. Pages map to frames.\n3. Avoids fragmentation.", "topic": "operating_systems"}
{"answer": "Area = 3.14 x 1 x 1 = 3.14.", "choices": null, "id": "cs_0247", "kind": "worked_example", "lang": "en", "question": "Circle radius 1, area = 3.14*r*r. What is the area?", "steps": ["r = 1.", "3.14 x 1 x 1.", "Area = 3.14."], "subject": "computer_science", "text": "Answer: 3.14.\nSteps:\n1. r = 1.\n2. 3.14 x 1 x 1.\n3. Area = 3.14.", "topic": "oop"}
{"answer": "Merge sort splits, sorts, and merges: divide and conquer.", "choices": {"A": "Merge sort", "B": "Bubble sort", "C": "Linear search", "D": "BFS"}, "id": "cs_0248", "kind": "multiple_choice", "lang": "en", "question": "Which is a divide-and-conquer algorithm?", "steps": ["Split problem.", "Merge solves.", "Select option A."], "subject": "computer_science", "text": "Answer: Merge sort.\nSteps:\n1. Split problem.\n2. Merge solves.\n3. Select option A.\nAnswer: (A)", "topic": "algorithms"}
{"answer": "Nested n x m loops cost O(n*m).", "choices": null, "id": "cs_0249", "kind": "concept", "lang": "en", "question": "What is the complexity of n x m nested loops?", "steps": ["Outer n.", "Inner m.", "Product n*m."], "subject": "computer_science", "text": "Answer: O(n*m).\nSteps:\n1. Outer n.\n2. Inner m.\n3. Product n*m.", "topic": "complexity"}
{"answer": "Seznam má 3 uzly.", "choices": null, "id": "cs_0250", "kind": "worked_example", "lang": "cs", "question": "Seznam je 1 -> 2 -> 3 -> None. Kolik má uzlů?", "steps": ["Počítej 1, 2, 3.", "Konec None.", "Celkem 3 uzly."], "subject": "computer_science", "text": "Answer: 3.\nSteps:\n1. Počítej 1, 2, 3.\n2. Konec None.\n3. Celkem 3 uzly.", "topic": "data_structures"}
{"answer": "Exception handling catches errors with try/except/finally blocks.", "choices": null, "id": "cs_0251", "kind": "concept", "lang": "en", "question": "What is exception handling in Python?", "steps": ["Try risky code.", "Catch exceptions.", "Finally cleans up."], "subject": "computer_science", "text": "Answer: Catch errors safely.\nSteps:\n1. Try risky code.\n2. Catch exceptions.\n3. Finally cleans up.", "topic": "python"}
{"answer": "Default sort is lexicographic, so [10,2,1] sorts to 1,10,2.", "choices": {"A": "1,2,10", "B": "1,10,2", "C": "10,1,2", "D": "10,2,1"}, "id": "cs_0252", "kind": "multiple_choice", "lang": "en", "question": "What does [10,2,1].sort().join(',') give?", "steps": ["Default string sort.", "1 < 10 < 2.", "Select option B."], "subject": "computer_science", "text": "Answer: 1,10,2.\nSteps:\n1. Default string sort.\n2. 1 < 10 < 2.\n3. Select option B.\nAnswer: (B)", "topic": "javascript"}
{"answer": "SELECT 20 / 4 returns 5.", "choices": null, "id": "cs_0253", "kind": "worked_example", "lang": "en", "question": "What does SELECT 20 / 4 return?", "steps": ["Divide 20 by 4.", "20 / 4 = 5.", "Result is 5."], "subject": "computer_science", "text": "Answer: 5.\nSteps:\n1. Divide 20 by 4.\n2. 20 / 4 = 5.\n3. Result is 5.", "topic": "sql"}
{"answer": "A /27 network has 30 usable hosts.", "choices": null, "id": "cs_0254", "kind": "worked_example", "lang": "en", "question": "How many usable hosts in a /27 network?", "steps": ["Host bits = 5.", "Addresses = 32.", "Usable = 32 - 2 = 30."], "subject": "computer_science", "text": "Answer: 30.\nSteps:\n1. Host bits = 5.\n2. Addresses = 32.\n3. Usable = 32 - 2 = 30.", "topic": "networking"}
{"answer": "Index zrychluje vyhledávání v tabulce.", "choices": {"A": "Zrychluje hledání", "B": "Maže data", "C": "Mění schéma", "D": "Vypíná databázi"}, "id": "cs_0255", "kind": "multiple_choice", "lang": "cs", "question": "Co je databázový index?", "steps": ["Index pomáhá.", "Hledání rychlejší.", "Vyber možnost A."], "subject": "computer_science", "text": "Answer: Zrychluje hledání.\nSteps:\n1. Index pomáhá.\n2. Hledání rychlejší.\n3. Vyber možnost A.\nAnswer: (A)", "topic": "databases"}
{"answer": "A thread pool reuses a fixed set of threads for many tasks.", "choices": null, "id": "cs_0256", "kind": "concept", "lang": "en", "question": "What is a thread pool?", "steps": ["Create threads once.", "Queue tasks.", "Reuse workers."], "subject": "computer_science", "text": "Answer: Reused workers.\nSteps:\n1. Create threads once.\n2. Queue tasks.\n3. Reuse workers.", "topic": "operating_systems"}
{"answer": "Rectangle(6, 7).area() is 42.", "choices": null, "id": "cs_0257", "kind": "worked_example", "lang": "en", "question": "Rectangle 6 by 7, area = w*h. What is the area?", "steps": ["w = 6, h = 7.", "6 x 7 = 42.", "Area = 42."], "subject": "computer_science", "text": "Answer: 42.\nSteps:\n1. w = 6, h = 7.\n2. 6 x 7 = 42.\n3. Area = 42.", "topic": "oop"}
{"answer": "Kruskal builds a minimum spanning tree by adding cheapest edges.", "choices": {"A": "Kruskal", "B": "Bubble sort", "C": "Binary search", "D": "BFS"}, "id": "cs_0258", "kind": "multiple_choice", "lang": "en", "question": "Which finds a minimum spanning tree?", "steps": ["Need MST.", "Kruskal sorts edges.", "Select option A."], "subject": "computer_science", "text": "Answer: Kruskal.\nSteps:\n1. Need MST.\n2. Kruskal sorts edges.\n3. Select option A.\nAnswer: (A)", "topic": "algorithms"}
{"answer": "Logarithmic complexity halves work each step, like O(log n).", "choices": null, "id": "cs_0259", "kind": "concept", "lang": "en", "question": "What is logarithmic complexity?", "steps": ["Halve each step.", "Few steps for big n.", "Example: binary search."], "subject": "computer_science", "text": "Answer: Halving each step.\nSteps:\n1. Halve each step.\n2. Few steps for big n.\n3. Example: binary search.", "topic": "complexity"}
{"answer": "K4 má 4x3/2 = 6 hran.", "choices": null, "id": "cs_0260", "kind": "worked_example", "lang": "cs", "question": "Kolik hran má úplný graf K4?", "steps": ["Vzorec n(n-1)/2.", "4x3/2 = 6.", "Hran je 6."], "subject": "computer_science", "text": "Answer: 6.\nSteps:\n1. Vzorec n(n-1)/2.\n2. 4x3/2 = 6.\n3. Hran je 6.", "topic": "data_structures"}
{"answer": "Lambdas are anonymous one-line functions written as lambda x: expr.", "choices": null, "id": "cs_0261", "kind": "concept", "lang": "en", "question": "What are Python lambda functions?", "steps": ["No def needed.", "Single expression.", "Good for callbacks."], "subject": "computer_science", "text": "Answer: Anonymous functions.\nSteps:\n1. No def needed.\n2. Single expression.\n3. Good for callbacks.", "topic": "python"}
{"answer": "typeof null is 'object' due to a legacy quirk.", "choices": {"A": "object", "B": "null", "C": "undefined", "D": "number"}, "id": "cs_0262", "kind": "multiple_choice", "lang": "en", "question": "What is typeof null in JavaScript?", "steps": ["Legacy quirk.", "Returns object.", "Select option A."], "subject": "computer_science", "text": "Answer: object.\nSteps:\n1. Legacy quirk.\n2. Returns object.\n3. Select option A.\nAnswer: (A)", "topic": "javascript"}
{"answer": "MAX of (3, 9, 5) is 9.", "choices": null, "id": "cs_0263", "kind": "worked_example", "lang": "en", "question": "What does SELECT MAX(x) give for x in (3,9,5)?", "steps": ["Compare values.", "Largest is 9.", "Result = 9."], "subject": "computer_science", "text": "Answer: 9.\nSteps:\n1. Compare values.\n2. Largest is 9.\n3. Result = 9.", "topic": "sql"}
{"answer": "25 MB over 100 Mbps takes 2 seconds.", "choices": null, "id": "cs_0264", "kind": "worked_example", "lang": "en", "question": "Link 100 Mbps, file 25 MB. How many seconds to transfer?", "steps": ["25 MB = 200 Mb.", "200 / 100 = 2.", "Time = 2 s."], "subject": "computer_science", "text": "Answer: 2 s.\nSteps:\n1. 25 MB = 200 Mb.\n2. 200 / 100 = 2.\n3. Time = 2 s.", "topic": "networking"}
{"answer": "A v ACID znamená atomicita.", "choices": {"A": "Atomicita", "B": "Konzistence", "C": "Izolace", "D": "Trvanlivost"}, "id": "cs_0265", "kind": "multiple_choice", "lang": "cs", "question": "Co znamená A v ACID?", "steps": ["ACID vlastnosti.", "A je atomicita.", "Vyber možnost A."], "subject": "computer_science", "text": "Answer: Atomicita.\nSteps:\n1. ACID vlastnosti.\n2. A je atomicita.\n3. Vyber možnost A.\nAnswer: (A)", "topic": "databases"}
{"answer": "A semaphore is a counter controlling access to shared resources.", "choices": null, "id": "cs_0266", "kind": "concept", "lang": "en", "question": "What is a semaphore?", "steps": ["Counter starts at N.", "Wait decrements.", "Signal increments."], "subject": "computer_science", "text": "Answer: Access counter.\nSteps:\n1. Counter starts at N.\n2. Wait decrements.\n3. Signal increments.", "topic": "operating_systems"}
{"answer": "Counter at 10 after dec() is 9.", "choices": null, "id": "cs_0267", "kind": "worked_example", "lang": "en", "question": "Counter value 10, dec() subtracts 1. What is the value?", "steps": ["Start 10.", "Minus 1.", "Value = 9."], "subject": "computer_science", "text": "Answer: 9.\nSteps:\n1. Start 10.\n2. Minus 1.\n3. Value = 9.", "topic": "oop"}
{"answer": "Quicksort picks a pivot and partitions around it.", "choices": {"A": "Pivot", "B": "Root", "C": "Hash", "D": "Queue"}, "id": "cs_0268", "kind": "multiple_choice", "lang": "en", "question": "What does quicksort pick to partition?", "steps": ["Choose pivot.", "Partition around.", "Select option A."], "subject": "computer_science", "text": "Answer: Pivot.\nSteps:\n1. Choose pivot.\n2. Partition around.\n3. Select option A.\nAnswer: (A)", "topic": "algorithms"}
{"answer": "Best-case analysis measures minimum cost over inputs of size n.", "choices": null, "id": "cs_0269", "kind": "concept", "lang": "en", "question": "What is best-case analysis?", "steps": ["Easiest input.", "Minimum cost.", "Rarely relied on."], "subject": "computer_science", "text": "Answer: Minimum cost.\nSteps:\n1. Easiest input.\n2. Minimum cost.\n3. Rarely relied on.", "topic": "complexity"}
{"answer": "Load factor je 9/12 = 0.75.", "choices": null, "id": "cs_0270", "kind": "worked_example", "lang": "cs", "question": "9 prvků ve 12 slotech. Jaký je load factor?", "steps": ["9 / 12.", "Výpočet 0.75.", "Load factor = 0.75."], "subject": "computer_science", "text": "Answer: 0.75.\nSteps:\n1. 9 / 12.\n2. Výpočet 0.75.\n3. Load factor = 0.75.", "topic": "data_structures"}
{"answer": "The GIL allows only one thread to run Python bytecode at once.", "choices": null, "id": "cs_0271", "kind": "concept", "lang": "en", "question": "What is the Python GIL?", "steps": ["Global lock.", "One bytecode thread.", "Limits CPU parallelism."], "subject": "computer_science", "text": "Answer: Global interpreter lock.\nSteps:\n1. Global lock.\n2. One bytecode thread.\n3. Limits CPU parallelism.", "topic": "python"}
{"answer": "'hi'.length is 2.", "choices": {"A": "1", "B": "2", "C": "3", "D": "0"}, "id": "cs_0272", "kind": "multiple_choice", "lang": "en", "question": "What does 'hi'.length give?", "steps": ["Two letters.", "Length 2.", "Select option B."], "subject": "computer_science", "text": "Answer: 2.\nSteps:\n1. Two letters.\n2. Length 2.\n3. Select option B.\nAnswer: (B)", "topic": "javascript"}
{"answer": "MIN of (8, 3, 6) is 3.", "choices": null, "id": "cs_0273", "kind": "worked_example", "lang": "en", "question": "What does SELECT MIN(x) give for x in (8,3,6)?", "steps": ["Compare values.", "Smallest is 3.", "Result = 3."], "subject": "computer_science", "text": "Answer: 3.\nSteps:\n1. Compare values.\n2. Smallest is 3.\n3. Result = 3.", "topic": "sql"}
{"answer": "A /28 network has 14 usable hosts.", "choices": null, "id": "cs_0274", "kind": "worked_example", "lang": "en", "question": "How many usable hosts in a /28 network?", "steps": ["Host bits = 4.", "Addresses = 16.", "Usable = 16 - 2 = 14."], "subject": "computer_science", "text": "Answer: 14.\nSteps:\n1. Host bits = 4.\n2. Addresses = 16.\n3. Usable = 16 - 2 = 14.", "topic": "networking"}
{"answer": "ORDER BY třídí výsledné řádky.", "choices": {"A": "Třídí řádky", "B": "Filtruje řádky", "C": "Spojuje tabulky", "D": "Maže řádky"}, "id": "cs_0275", "kind": "multiple_choice", "lang": "cs", "question": "Co dělá ORDER BY?", "steps": ["ORDER BY řadí.", "Podle sloupců.", "Vyber možnost A."], "subject": "computer_science", "text": "Answer: Třídí řádky.\nSteps:\n1. ORDER BY řadí.\n2. Podle sloupců.\n3. Vyber možnost A.\nAnswer: (A)", "topic": "databases"}
{"answer": "A zombie process has terminated but its parent has not reaped it yet.", "choices": null, "id": "cs_0276", "kind": "concept", "lang": "en", "question": "What is a zombie process?", "steps": ["Child exits.", "Parent delays wait.", "Entry lingers."], "subject": "computer_science", "text": "Answer: Exited but unreaped.\nSteps:\n1. Child exits.\n2. Parent delays wait.\n3. Entry lingers.", "topic": "operating_systems"}
{"answer": "Balance 200 minus 70 leaves 130.", "choices": null, "id": "cs_0277", "kind": "worked_example", "lang": "en", "question": "Account balance 200, withdraw(70). What is the balance?", "steps": ["Start 200.", "Subtract 70.", "Balance = 130."], "subject": "computer_science", "text": "Answer: 130.\nSteps:\n1. Start 200.\n2. Subtract 70.\n3. Balance = 130.", "topic": "oop"}
{"answer": "Huffman coding greedily merges the two least frequent symbols.", "choices": {"A": "Huffman coding", "B": "Bubble sort", "C": "Binary search", "D": "DFS"}, "id": "cs_0278", "kind": "multiple_choice", "lang": "en", "question": "Which is a greedy algorithm?", "steps": ["Greedy picks best now.", "Huffman merges least.", "Select option A."], "subject": "computer_science", "text": "Answer: Huffman coding.\nSteps:\n1. Greedy picks best now.\n2. Huffman merges least.\n3. Select option A.\nAnswer: (A)", "topic": "algorithms"}
{"answer": "NP contains problems verifiable in polynomial time.", "choices": null, "id": "cs_0279", "kind": "concept", "lang": "en", "question": "What is complexity class NP?", "steps": ["Check solutions fast.", "Finding may be hard.", "Example: SAT."], "subject": "computer_science", "text": "Answer: Fast to verify.\nSteps:\n1. Check solutions fast.\n2. Finding may be hard.\n3. Example: SAT.", "topic": "complexity"}
{"answer": "Po dvou operacích dequeue zbude jen 9.", "choices": null, "id": "cs_0280", "kind": "worked_example", "lang": "cs", "question": "Fronta je 7, 8, 9. Co zbude po dvou dequeue?", "steps": ["Odeber 7.", "Odeber 8.", "Zbude 9."], "subject": "computer_science", "text": "Answer: 9.\nSteps:\n1. Odeber 7.\n2. Odeber 8.\n3. Zbude 9.", "topic": "data_structures"}
{"answer": "Sets store unordered unique items with fast membership tests.", "choices": null, "id": "cs_0281", "kind": "concept", "lang": "en", "question": "What are Python sets?", "steps": ["No duplicates.", "Unordered.", "Fast in-checks."], "subject": "computer_science", "text": "Answer: Unique unordered items.\nSteps:\n1. No duplicates.\n2. Unordered.\n3. Fast in-checks.", "topic": "python"}
{"answer": "Boolean(0) is false.", "choices": {"A": "true", "B": "false", "C": "0", "D": "undefined"}, "id": "cs_0282", "kind": "multiple_choice", "lang": "en", "question": "What does Boolean(0) give?", "steps": ["0 is falsy.", "Coerces to false.", "Select option B."], "subject": "computer_science", "text": "Answer: false.\nSteps:\n1. 0 is falsy.\n2. Coerces to false.\n3. Select option B.\nAnswer: (B)", "topic": "javascript"}
{"answer": "3 + 4 * 2 equals 11 by precedence.", "choices": null, "id": "cs_0283", "kind": "worked_example", "lang": "en", "question": "What does SELECT 3 + 4 * 2 return?", "steps": ["Multiply first: 8.", "Add 3.", "Result = 11."], "subject": "computer_science", "text": "Answer: 11.\nSteps:\n1. Multiply first: 8.\n2. Add 3.\n3. Result = 11.", "topic": "sql"}
{"answer": "A /29 network has 6 usable hosts.", "choices": null, "id": "cs_0284", "kind": "worked_example", "lang": "en", "question": "How many usable hosts in a /29 network?", "steps": ["Host bits = 3.", "Addresses = 8.", "Usable = 8 - 2 = 6."], "subject": "computer_science", "text": "Answer: 6.\nSteps:\n1. Host bits = 3.\n2. Addresses = 8.\n3. Usable = 8 - 2 = 6.", "topic": "networking"}
{"answer": "GROUP BY seskupuje řádky se stejnou hodnotou.", "choices": {"A": "Seskupuje řádky", "B": "Třídí řádky", "C": "Maže řádky", "D": "Vytváří tabulku"}, "id": "cs_0285", "kind": "multiple_choice", "lang": "cs", "question": "Co dělá GROUP BY?", "steps": ["Stejné hodnoty.", "Skupiny pro agregaci.", "Vyber možnost A."], "subject": "computer_science", "text": "Answer: Seskupuje řádky.\nSteps:\n1. Stejné hodnoty.\n2. Skupiny pro agregaci.\n3. Vyber možnost A.\nAnswer: (A)", "topic": "databases"}
{"answer": "Swapping moves processes between RAM and disk to free memory.", "choices": null, "id": "cs_0286", "kind": "concept", "lang": "en", "question": "What is swapping?", "steps": ["RAM is full.", "Move process to disk.", "Bring back later."], "subject": "computer_science", "text": "Answer: RAM-disk exchange.\nSteps:\n1. RAM is full.\n2. Move process to disk.\n3. Bring back later.", "topic": "operating_systems"}
{"answer": "Point(3, 4).sum() is 7.", "choices": null, "id": "cs_0287", "kind": "worked_example", "lang": "en", "question": "Point stores x, y with sum = x+y. What is Point(3,4).sum()?", "steps": ["x = 3, y = 4.", "3 + 4 = 7.", "Sum = 7."], "subject": "computer_science", "text": "Answer: 7.\nSteps:\n1. x = 3, y = 4.\n2. 3 + 4 = 7.\n3. Sum = 7.", "topic": "oop"}
{"answer": "Inorder traversal of a BST visits keys in sorted order.", "choices": {"A": "Sorted", "B": "Reverse", "C": "Random", "D": "Level"}, "id": "cs_0288", "kind": "multiple_choice", "lang": "en", "question": "What order does BST inorder give?", "steps": ["Left, root, right.", "Ascending keys.", "Select option A."], "subject": "computer_science", "text": "Answer: Sorted.\nSteps:\n1. Left, root, right.\n2. Ascending keys.\n3. Select option A.\nAnswer: (A)", "topic": "algorithms"}
{"answer": "Constant time O(1) costs the same regardless of input size.", "choices": null, "id": "cs_0289", "kind": "concept", "lang": "en", "question": "What is constant time complexity?", "steps": ["Fixed steps.", "No growth.", "Example: array index."], "subject": "computer_science", "text": "Answer: Fixed cost.\nSteps:\n1. Fixed steps.\n2. No growth.\n3. Example: array index.", "topic": "complexity"}
{"answer": "Po dvou pop zbude jen 1.", "choices": null, "id": "cs_0290", "kind": "worked_example", "lang": "cs", "question": "Zásobník je 1, 2, 3. Co zbude po dvou pop?", "steps": ["Odeber 3.", "Odeber 2.", "Zbude 1."], "subject": "computer_science", "text": "Answer: 1.\nSteps:\n1. Odeber 3.\n2. Odeber 2.\n3. Zbude 1.", "topic": "data_structures"}
{"answer": "Decorators wrap functions using @name above a definition.", "choices": null, "id": "cs_0291", "kind": "concept", "lang": "en", "question": "What is a Python decorator?", "steps": ["@ above def.", "Wraps function.", "Adds behavior."], "subject": "computer_science", "text": "Answer: Function wrapper.\nSteps:\n1. @ above def.\n2. Wraps function.\n3. Adds behavior.", "topic": "python"}
{"answer": "'5' + 2 is '52' because plus concatenates strings.", "choices": {"A": "'52'", "B": "7", "C": "5", "D": "NaN"}, "id": "cs_0292", "kind": "multiple_choice", "lang": "en", "question": "What does '5' + 2 give in JavaScript?", "steps": ["Plus prefers string.", "Concat 5 and 2.", "Select option A."], "subject": "computer_science", "text": "Answer: '52'.\nSteps:\n1. Plus prefers string.\n2. Concat 5 and 2.\n3. Select option A.\nAnswer: (A)", "topic": "javascript"}
{"answer": "UPPER('hi') returns 'HI'.", "choices": null, "id": "cs_0293", "kind": "worked_example", "lang": "en", "question": "What does SELECT UPPER('hi') return?", "steps": ["Capitalize letters.", "hi becomes HI.", "Result = 'HI'."], "subject": "computer_science", "text": "Answer: 'HI'.\nSteps:\n1. Capitalize letters.\n2. hi becomes HI.\n3. Result = 'HI'.", "topic": "sql"}
{"answer": "The /16 mask is 255.255.0.0.", "choices": null, "id": "cs_0294", "kind": "worked_example", "lang": "en", "question": "What is the subnet mask for /16?", "steps": ["16 ones.", "Two octets full.", "Mask = 255.255.0.0."], "subject": "computer_science", "text": "Answer: 255.255.0.0.\nSteps:\n1. 16 ones.\n2. Two octets full.\n3. Mask = 255.255.0.0.", "topic": "networking"}
{"answer": "HAVING filtruje skupiny po agregaci.", "choices": {"A": "Filtruje skupiny", "B": "Třídí řádky", "C": "Maže řádky", "D": "Spojuje tabulky"}, "id": "cs_0295", "kind": "multiple_choice", "lang": "cs", "question": "Co dělá HAVING?", "steps": ["Po GROUP BY.", "Filtr agregací.", "Vyber možnost A."], "subject": "computer_science", "text": "Answer: Filtruje skupiny.\nSteps:\n1. Po GROUP BY.\n2. Filtr agregací.\n3. Vyber možnost A.\nAnswer: (A)", "topic": "databases"}
{"answer": "CPU scheduling decides which ready process runs next.", "choices": null, "id": "cs_0296", "kind": "concept", "lang": "en", "question": "What is CPU scheduling?", "steps": ["Many ready tasks.", "Pick one.", "Switch on events."], "subject": "computer_science", "text": "Answer: Pick next process.\nSteps:\n1. Many ready tasks.\n2. Pick one.\n3. Switch on events.", "topic": "operating_systems"}
{"answer": "120 pages minus 30 read leaves 90.", "choices": null, "id": "cs_0297", "kind": "worked_example", "lang": "en", "question": "Book has 120 pages, read 30. How many remain?", "steps": ["Total 120.", "Minus 30.", "Remain = 90."], "subject": "computer_science", "text": "Answer: 90.\nSteps:\n1. Total 120.\n2. Minus 30.\n3. Remain = 90.", "topic": "oop"}
{"answer": "Binary search requires sorted input to halve correctly.", "choices": {"A": "Linear", "B": "Binary", "C": "BFS", "D": "DFS"}, "id": "cs_0298", "kind": "multiple_choice", "lang": "en", "question": "Which search needs sorted input?", "steps": ["Halving assumes order.", "Binary needs sorted.", "Select option B."], "subject": "computer_science", "text": "Answer: Binary.\nSteps:\n1. Halving assumes order.\n2. Binary needs sorted.\n3. Select option B.\nAnswer: (B)", "topic": "algorithms"}
{"answer": "Quadratic O(n^2) grows with the square, typical of nested loops.", "choices": null, "id": "cs_0299", "kind": "concept", "lang": "en", "question": "What is quadratic complexity?", "steps": ["n by n work.", "Grows fast.", "Example: bubble sort."], "subject": "computer_science", "text": "Answer: Square growth.\nSteps:\n1. n by n work.\n2. Grows fast.\n3. Example: bubble sort.", "topic": "complexity"}
{"answer": "Inorder dá 5, 10, 15.", "choices": null, "id": "cs_0300", "kind": "worked_example", "lang": "cs", "question": "Kořen 10, levý 5, pravý 15. Co dá inorder?", "steps": ["Levý 5.", "Kořen 10.", "Pravý 15."], "subject": "computer_science", "text": "Answer: 5, 10, 15.\nSteps:\n1. Levý 5.\n2. Kořen 10.\n3. Pravý 15.", "topic": "data_structures"}
{"answer": "Keyword arguments are named parameters with defaults passed as name=value.", "choices": null, "id": "cs_0301", "kind": "concept", "lang": "en", "question": "What are keyword arguments in Python?", "steps": ["Define def f(a=1).", "Call f(a=2).", "Order flexible."], "subject": "computer_science", "text": "Answer: Named parameters.\nSteps:\n1. Define def f(a=1).\n2. Call f(a=2).\n3. Order flexible.", "topic": "python"}
{"answer": "[1,2,3].includes(2) is true.", "choices": {"A": "true", "B": "false", "C": "2", "D": "undefined"}, "id": "cs_0302", "kind": "multiple_choice", "lang": "en", "question": "What does [1,2,3].includes(2) give?", "steps": ["Search for 2.", "Found.", "Select option A."], "subject": "computer_science", "text": "Answer: true.\nSteps:\n1. Search for 2.\n2. Found.\n3. Select option A.\nAnswer: (A)", "topic": "javascript"}
{"answer": "SELECT 9 * 9 returns 81.", "choices": null, "id": "cs_0303", "kind": "worked_example", "lang": "en", "question": "What does SELECT 9 * 9 return?", "steps": ["Multiply 9 by 9.", "9 x 9 = 81.", "Result is 81."], "subject": "computer_science", "text": "Answer: 81.\nSteps:\n1. Multiply 9 by 9.\n2. 9 x 9 = 81.\n3. Result is 81.", "topic": "sql"}
{"answer": "A /23 network has 510 usable hosts.", "choices": null, "id": "cs_0304", "kind": "worked_example", "lang": "en", "question": "How many usable hosts in a /23 network?", "steps": ["Host bits = 9.", "Addresses = 512.", "Usable = 512 - 2 = 510."], "subject": "computer_science", "text": "Answer: 510.\nSteps:\n1. Host bits = 9.\n2. Addresses = 512.\n3. Usable = 512 - 2 = 510.", "topic": "networking"}
{"answer": "Řádky filtruje klauzule WHERE.", "choices": {"A": "WHERE", "B": "ORDER BY", "C": "GROUP BY", "D": "JOIN"}, "id": "cs_0305", "kind": "multiple_choice", "lang": "cs", "question": "Která klauzule filtruje řádky?", "steps": ["WHERE omezuje.", "Před agregací.", "Vyber možnost A."], "subject": "computer_science", "text": "Answer: WHERE.\nSteps:\n1. WHERE omezuje.\n2. Před agregací.\n3. Vyber možnost A.\nAnswer: (A)", "topic": "databases"}
{"answer": "Multitasking runs multiple processes concurrently by rapid switching.", "choices": null, "id": "cs_0306", "kind": "concept", "lang": "en", "question": "What is multitasking?", "steps": ["Many processes.", "CPU switches fast.", "Appears parallel."], "subject": "computer_science", "text": "Answer: Concurrent processes.\nSteps:\n1. Many processes.\n2. CPU switches fast.\n3. Appears parallel.", "topic": "operating_systems"}
{"answer": "5000 salary plus 500 bonus is 5500.", "choices": null, "id": "cs_0307", "kind": "worked_example", "lang": "en", "question": "Employee salary 5000, bonus 500. What is total pay?", "steps": ["Base 5000.", "Add 500.", "Total = 5500."], "subject": "computer_science", "text": "Answer: 5500.\nSteps:\n1. Base 5000.\n2. Add 500.\n3. Total = 5500.", "topic": "oop"}
{"answer": "Bellman-Ford handles negative edges for single-source shortest paths.", "choices": {"A": "Dijkstra", "B": "Bellman-Ford", "C": "Bubble sort", "D": "DFS"}, "id": "cs_0308", "kind": "multiple_choice", "lang": "en", "question": "Which handles negative edges for shortest paths?", "steps": ["Dijkstra needs non-negative.", "Bellman-Ford relaxes.", "Select option B."], "subject": "computer_science", "text": "Answer: Bellman-Ford.\nSteps:\n1. Dijkstra needs non-negative.\n2. Bellman-Ford relaxes.\n3. Select option B.\nAnswer: (B)", "topic": "algorithms"}
{"answer": "Linear O(n) cost grows proportionally with input size.", "choices": null, "id": "cs_0309", "kind": "concept", "lang": "en", "question": "What is linear complexity?", "steps": ["One pass.", "Double input, double time.", "Example: linear search."], "subject": "computer_science", "text": "Answer: Proportional growth.\nSteps:\n1. One pass.\n2. Double input, double time.\n3. Example: linear search.", "topic": "complexity"}
{"answer": "Délka pole je 4.", "choices": null, "id": "cs_0310", "kind": "worked_example", "lang": "cs", "question": "Pole je [5,6,7,8]. Jaká je délka?", "steps": ["Počítej prvky.", "5, 6, 7, 8.", "Délka = 4."], "subject": "computer_science", "text": "Answer: 4.\nSteps:\n1. Počítej prvky.\n2. 5, 6, 7, 8.\n3. Délka = 4.", "topic": "data_structures"}
{"answer": "== compares values while is compares object identity.", "choices": null, "id": "cs_0311", "kind": "concept", "lang": "en", "question": "How do == and is differ in Python?", "steps": ["== checks equality.", "is checks identity.", "Small ints may share."], "subject": "computer_science", "text": "Answer: Value versus identity.\nSteps:\n1. == checks equality.\n2. is checks identity.\n3. Small ints may share.", "topic": "python"}
{"answer": "0 == false is true under loose equality.", "choices": {"A": "true", "B": "false", "C": "0", "D": "TypeError"}, "id": "cs_0312", "kind": "multiple_choice", "lang": "en", "question": "What does 0 == false give in JavaScript?", "steps": ["Loose coercion.", "0 equals false.", "Select option A."], "subject": "computer_science", "text": "Answer: true.\nSteps:\n1. Loose coercion.\n2. 0 equals false.\n3. Select option A.\nAnswer: (A)", "topic": "javascript"}
{"answer": "10 % 3 returns 1.", "choices": null, "id": "cs_0313", "kind": "worked_example", "lang": "en", "question": "What does SELECT 10 % 3 return?", "steps": ["Divide 10 by 3.", "Remainder 1.", "Result = 1."], "subject": "computer_science", "text": "Answer: 1.\nSteps:\n1. Divide 10 by 3.\n2. Remainder 1.\n3. Result = 1.", "topic": "sql"}
{"answer": "40 ms round-trip allows 25 serial requests per second.", "choices": null, "id": "cs_0314", "kind": "worked_example", "lang": "en", "question": "Round-trip 40 ms. How many serial requests per second?", "steps": ["1000 ms per second.", "1000 / 40 = 25.", "Rate = 25."], "subject": "computer_science", "text": "Answer: 25.\nSteps:\n1. 1000 ms per second.\n2. 1000 / 40 = 25.\n3. Rate = 25.", "topic": "networking"}
{"answer": "JOIN spojuje řádky ze dvou tabulek.", "choices": {"A": "Spojuje tabulky", "B": "Maže řádky", "C": "Třídí řádky", "D": "Filtruje řádky"}, "id": "cs_0315", "kind": "multiple_choice", "lang": "cs", "question": "Co dělá JOIN?", "steps": ["Dvě tabulky.", "Spojení podle klíče.", "Vyber možnost A."], "subject": "computer_science", "text": "Answer: Spojuje tabulky.\nSteps:\n1. Dvě tabulky.\n2. Spojení podle klíče.\n3. Vyber možnost A.\nAnswer: (A)", "topic": "databases"}
{"answer": "A file descriptor is an integer handle for an open file.", "choices": null, "id": "cs_0316", "kind": "concept", "lang": "en", "question": "What is a file descriptor?", "steps": ["Open returns number.", "Read/write use it.", "Close frees it."], "subject": "computer_science", "text": "Answer: Open-file handle.\nSteps:\n1. Open returns number.\n2. Read/write use it.\n3. Close frees it.", "topic": "operating_systems"}
{"answer": "60 plus 20 gives speed 80.", "choices": null, "id": "cs_0317", "kind": "worked_example", "lang": "en", "question": "Car speed 60, accelerate(20). What is the speed?", "steps": ["Start 60.", "Add 20.", "Speed = 80."], "subject": "computer_science", "text": "Answer: 80.\nSteps:\n1. Start 60.\n2. Add 20.\n3. Speed = 80.", "topic": "oop"}
{"answer": "Memoization caches function results to avoid recomputation.", "choices": {"A": "Caches results", "B": "Sorts data", "C": "Encrypts data", "D": "Compresses data"}, "id": "cs_0318", "kind": "multiple_choice", "lang": "en", "question": "What does memoization do?", "steps": ["Store outputs.", "Reuse on repeat.", "Select option A."], "subject": "computer_science", "text": "Answer: Caches results.\nSteps:\n1. Store outputs.\n2. Reuse on repeat.\n3. Select option A.\nAnswer: (A)", "topic": "algorithms"}
{"answer": "Factorial O(n!) grows with permutations, exploding beyond n = 12.", "choices": null, "id": "cs_0319", "kind": "concept", "lang": "en", "question": "What is factorial complexity?", "steps": ["n! orderings.", "Huge growth.", "Example: TSP brute force."], "subject": "computer_science", "text": "Answer: Permutation growth.\nSteps:\n1. n! orderings.\n2. Huge growth.\n3. Example: TSP brute force.", "topic": "complexity"}
{"answer": "Do K4 chybí 3 hrany.", "choices": null, "id": "cs_0320", "kind": "worked_example", "lang": "cs", "question": "Graf má 4 vrcholy a 3 hrany. Kolik chybí do K4?", "steps": ["K4 má 6 hran.", "Máme 3.", "Chybí 6 - 3 = 3."], "subject": "computer_science", "text": "Answer: 3.\nSteps:\n1. K4 má 6 hran.\n2. Máme 3.\n3. Chybí 6 - 3 = 3.", "topic": "data_structures"}
{"answer": "*args collects extra positional arguments into a tuple.", "choices": null, "id": "cs_0321", "kind": "concept", "lang": "en", "question": "What does *args do in Python?", "steps": ["Variable inputs.", "Tuple inside.", "Loop over them."], "subject": "computer_science", "text": "Answer: Variable arguments.\nSteps:\n1. Variable inputs.\n2. Tuple inside.\n3. Loop over them.", "topic": "python"}
{"answer": "typeof 42 is 'number'.", "choices": {"A": "number", "B": "string", "C": "object", "D": "undefined"}, "id": "cs_0322", "kind": "multiple_choice", "lang": "en", "question": "What is typeof 42?", "steps": ["42 is numeric.", "Type number.", "Select option A."], "subject": "computer_science", "text": "Answer: number.\nSteps:\n1. 42 is numeric.\n2. Type number.\n3. Select option A.\nAnswer: (A)", "topic": "javascript"}
{"answer": "LOWER('ABC') returns 'abc'.", "choices": null, "id": "cs_0323", "kind": "worked_example", "lang": "en", "question": "What does SELECT LOWER('ABC') return?", "steps": ["Lowercase each.", "ABC to abc.", "Result = 'abc'."], "subject": "computer_science", "text": "Answer: 'abc'.\nSteps:\n1. Lowercase each.\n2. ABC to abc.\n3. Result = 'abc'.", "topic": "sql"}
{"answer": "A /20 network has 4094 usable hosts.", "choices": null, "id": "cs_0324", "kind": "worked_example", "lang": "en", "question": "How many usable hosts in a /20 network?", "steps": ["Host bits = 12.", "Addresses = 4096.", "Usable = 4096 - 2 = 4094."], "subject": "computer_science", "text": "Answer: 4094.\nSteps:\n1. Host bits = 12.\n2. Addresses = 4096.\n3. Usable = 4096 - 2 = 4094.", "topic": "networking"}
{"answer": "Schéma je struktura tabulek a vztahů.", "choices": {"A": "Struktura databáze", "B": "Konkrétní data", "C": "Index", "D": "Dotaz"}, "id": "cs_0325", "kind": "multiple_choice", "lang": "cs", "question": "Co je databázové schéma?", "steps": ["Popis struktury.", "Tabulky a typy.", "Vyber možnost A."], "subject": "computer_science", "text": "Answer: Struktura databáze.\nSteps:\n1. Popis struktury.\n2. Tabulky a typy.\n3. Vyber možnost A.\nAnswer: (A)", "topic": "databases"}
{"answer": "A shell is a command interpreter between user and kernel.", "choices": null, "id": "cs_0326", "kind": "concept", "lang": "en", "question": "What is a shell?", "steps": ["Reads commands.", "Runs programs.", "Shows output."], "subject": "computer_science", "text": "Answer: Command interpreter.\nSteps:\n1. Reads commands.\n2. Runs programs.\n3. Shows output.", "topic": "operating_systems"}
{"answer": "Off toggled becomes on.", "choices": null, "id": "cs_0327", "kind": "worked_example", "lang": "en", "question": "Light is off, toggle() flips state. What is the state?", "steps": ["Start off.", "Flip.", "State = on."], "subject": "computer_science", "text": "Answer: on.\nSteps:\n1. Start off.\n2. Flip.\n3. State = on.", "topic": "oop"}
{"answer": "BFS visits level by level.", "choices": {"A": "DFS", "B": "BFS", "C": "Inorder", "D": "Postorder"}, "id": "cs_0328", "kind": "multiple_choice", "lang": "en", "question": "Which traversal is level order?", "steps": ["Level by level.", "Queue-based BFS.", "Select option B."], "subject": "computer_science", "text": "Answer: BFS.\nSteps:\n1. Level by level.\n2. Queue-based BFS.\n3. Select option B.\nAnswer: (B)", "topic": "algorithms"}
{"answer": "Average-case analysis measures expected cost over an input distribution.", "choices": null, "id": "cs_0329", "kind": "concept", "lang": "en", "question": "What is average-case analysis?", "steps": ["Assume distribution.", "Average costs.", "Example: quicksort."], "subject": "computer_science", "text": "Answer: Expected cost.\nSteps:\n1. Assume distribution.\n2. Average costs.\n3. Example: quicksort.", "topic": "complexity"}
{"answer": "Klíč 23 patří na slot 3.", "choices": null, "id": "cs_0330", "kind": "worked_example", "lang": "cs", "question": "Hash tabulka má 10 slotů. Kam patří klíč 23?", "steps": ["23 % 10 = 3.", "Slot 3.", "Výsledek je 3."], "subject": "computer_science", "text": "Answer: 3.\nSteps:\n1. 23 % 10 = 3.\n2. Slot 3.\n3. Výsledek je 3.", "topic": "data_structures"}
{"answer": "**kwargs collects extra keyword arguments into a dict.", "choices": null, "id": "cs_0331", "kind": "concept", "lang": "en", "question": "What does **kwargs do in Python?", "steps": ["Named extras.", "Dict inside.", "Access by key."], "subject": "computer_science", "text": "Answer: Named extras dict.\nSteps:\n1. Named extras.\n2. Dict inside.\n3. Access by key.", "topic": "python"}
{"answer": "'a,b,c'.split(',') has length 3.", "choices": {"A": "1", "B": "2", "C": "3", "D": "0"}, "id": "cs_0332", "kind": "multiple_choice", "lang": "en", "question": "What does 'a,b,c'.split(',').length give?", "steps": ["Split into 3.", "Length counts.", "Select option C."], "subject": "computer_science", "text": "Answer: 3.\nSteps:\n1. Split into 3.\n2. Length counts.\n3. Select option C.\nAnswer: (C)", "topic": "javascript"}
{"answer": "SELECT 5 + 5 + 5 returns 15.", "choices": null, "id": "cs_0333", "kind": "worked_example", "lang": "en", "question": "What does SELECT 5 + 5 + 5 return?", "steps": ["Add first two: 10.", "Add 5.", "Result = 15."], "subject": "computer_science", "text": "Answer: 15.\nSteps:\n1. Add first two: 10.\n2. Add 5.\n3. Result = 15.", "topic": "sql"}
{"answer": "A /22 network has 1022 usable hosts.", "choices": null, "id": "cs_0334", "kind": "worked_example", "lang": "en", "question": "How many usable hosts in a /22 network?", "steps": ["Host bits = 10.", "Addresses = 1024.", "Usable = 1024 - 2 = 1022."], "subject": "computer_science", "text": "Answer: 1022.\nSteps:\n1. Host bits = 10.\n2. Addresses = 1024.\n3. Usable = 1024 - 2 = 1022.", "topic": "networking"}
{"answer": "VIEW je uložený dotaz vystupující jako tabulka.", "choices": {"A": "Uložený dotaz", "B": "Fyzická tabulka", "C": "Index", "D": "Klíč"}, "id": "cs_0335", "kind": "multiple_choice", "lang": "cs", "question": "Co je pohled (VIEW)?", "steps": ["Dotaz uložen.", "Chová se jako tabulka.", "Vyber možnost A."], "subject": "computer_science", "text": "Answer: Uložený dotaz.\nSteps:\n1. Dotaz uložen.\n2. Chová se jako tabulka.\n3. Vyber možnost A.\nAnswer: (A)", "topic": "databases"}
{"answer": "A device driver is software that controls a hardware device.", "choices": null, "id": "cs_0336", "kind": "concept", "lang": "en", "question": "What is a device driver?", "steps": ["Talks to hardware.", "Exposes interface.", "Kernel loads it."], "subject": "computer_science", "text": "Answer: Hardware control software.\nSteps:\n1. Talks to hardware.\n2. Exposes interface.\n3. Kernel loads it.", "topic": "operating_systems"}
{"answer": "100 plus 25 is 125.", "choices": null, "id": "cs_0337", "kind": "worked_example", "lang": "en", "question": "Player score 100, add(25). What is the score?", "steps": ["Start 100.", "Add 25.", "Score = 125."], "subject": "computer_science", "text": "Answer: 125.\nSteps:\n1. Start 100.\n2. Add 25.\n3. Score = 125.", "topic": "oop"}
{"answer": "Topological sort needs a directed acyclic graph.", "choices": {"A": "DAG", "B": "Cyclic graph", "C": "Unsorted list", "D": "Stack"}, "id": "cs_0338", "kind": "multiple_choice", "lang": "en", "question": "Which graph allows topological sort?", "steps": ["No cycles allowed.", "DAG works.", "Select option A."], "subject": "computer_science", "text": "Answer: DAG.\nSteps:\n1. No cycles allowed.\n2. DAG works.\n3. Select option A.\nAnswer: (A)", "topic": "algorithms"}
{"answer": "Linearithmic O(n log n) is typical of efficient sorts.", "choices": null, "id": "cs_0339", "kind": "concept", "lang": "en", "question": "What is linearithmic complexity?", "steps": ["n times log n.", "Efficient sorting.", "Example: merge sort."], "subject": "computer_science", "text": "Answer: n log n growth.\nSteps:\n1. n times log n.\n2. Efficient sorting.\n3. Example: merge sort.", "topic": "complexity"}
{"answer": "Maximum je 4 kroky.", "choices": null, "id": "cs_0340", "kind": "worked_example", "lang": "cs", "question": "Binární vyhledávání v 16 prvcích. Kolik kroků maximálně?", "steps": ["log2(16) = 4.", "Půlení čtyřikrát.", "Maximum 4 kroky."], "subject": "computer_science", "text": "Answer: 4.\nSteps:\n1. log2(16) = 4.\n2. Půlení čtyřikrát.\n3. Maximum 4 kroky.", "topic": "data_structures"}
{"answer": "Modules are .py files with reusable definitions imported elsewhere.", "choices": null, "id": "cs_0341", "kind": "concept", "lang": "en", "question": "What are Python modules?", "steps": ["File with code.", "Import it.", "Reuse functions."], "subject": "computer_science", "text": "Answer: Reusable files.\nSteps:\n1. File with code.\n2. Import it.\n3. Reuse functions.", "topic": "python"}
{"answer": "Math.floor(3.9) is 3.", "choices": {"A": "3", "B": "4", "C": "3.9", "D": "NaN"}, "id": "cs_0342", "kind": "multiple_choice", "lang": "en", "question": "What does Math.floor(3.9) give?", "steps": ["Round down.", "3.9 to 3.", "Select option A."], "subject": "computer_science", "text": "Answer: 3.\nSteps:\n1. Round down.\n2. 3.9 to 3.\n3. Select option A.\nAnswer: (A)", "topic": "javascript"}
{"answer": "ABS(-7) returns 7.", "choices": null, "id": "cs_0343", "kind": "worked_example", "lang": "en", "question": "What does SELECT ABS(-7) return?", "steps": ["Absolute value.", "Remove sign.", "Result = 7."], "subject": "computer_science", "text": "Answer: 7.\nSteps:\n1. Absolute value.\n2. Remove sign.\n3. Result = 7.", "topic": "sql"}
{"answer": "Broadcast for 192.168.1.0/24 is 192.168.1.255.", "choices": null, "id": "cs_0344", "kind": "worked_example", "lang": "en", "question": "What is the broadcast for 192.168.1.0/24?", "steps": ["Last octet host.", "All ones = 255.", "Broadcast .255."], "subject": "computer_science", "text": "Answer: 192.168.1.255.\nSteps:\n1. Last octet host.\n2. All ones = 255.\n3. Broadcast .255.", "topic": "networking"}
{"answer": "COUNT(*) počítá řádky.", "choices": {"A": "Počítá řádky", "B": "Maže řádky", "C": "Třídí řádky", "D": "Spojuje tabulky"}, "id": "cs_0345", "kind": "multiple_choice", "lang": "cs", "question": "Co dělá COUNT(*)?", "steps": ["Agregace počtu.", "Všechny řádky.", "Vyber možnost A."], "subject": "computer_science", "text": "Answer: Počítá řádky.\nSteps:\n1. Agregace počtu.\n2. Všechny řádky.\n3. Vyber možnost A.\nAnswer: (A)", "topic": "databases"}
{"answer": "IPC lets processes exchange data via pipes, sockets, or shared memory.", "choices": null, "id": "cs_0346", "kind": "concept", "lang": "en", "question": "What is interprocess communication?", "steps": ["Processes isolated.", "Need channels.", "Pipes or sockets."], "subject": "computer_science", "text": "Answer: Data exchange channels.\nSteps:\n1. Processes isolated.\n2. Need channels.\n3. Pipes or sockets.", "topic": "operating_systems"}
{"answer": "2 items plus 3 gives 5.", "choices": null, "id": "cs_0347", "kind": "worked_example", "lang": "en", "question": "Cart has 2 items, add 3. How many items?", "steps": ["Start 2.", "Add 3.", "Total = 5."], "subject": "computer_science", "text": "Answer: 5.\nSteps:\n1. Start 2.\n2. Add 3.\n3. Total = 5.", "topic": "oop"}
{"answer": "Hash lookup averages O(1).", "choices": {"A": "Hash lookup", "B": "Binary search", "C": "Bubble sort", "D": "Merge sort"}, "id": "cs_0348", "kind": "multiple_choice", "lang": "en", "question": "Which averages O(1)?", "steps": ["Direct hashing.", "Constant average.", "Select option A."], "subject": "computer_science", "text": "Answer: Hash lookup.\nSteps:\n1. Direct hashing.\n2. Constant average.\n3. Select option A.\nAnswer: (A)", "topic": "algorithms"}
{"answer": "A reduction transforms one problem into another to compare hardness.", "choices": null, "id": "cs_0349", "kind": "concept", "lang": "en", "question": "What is a reduction?", "steps": ["Map instances.", "Preserve answers.", "Prove hardness."], "subject": "computer_science", "text": "Answer: Problem transformation.\nSteps:\n1. Map instances.\n2. Preserve answers.\n3. Prove hardness.", "topic": "complexity"}
{"answer": "Maximum je v kořenu, tedy 10.", "choices": null, "id": "cs_0350", "kind": "worked_example", "lang": "cs", "question": "Max-halda je [10,8,9]. Kde je maximum?", "steps": ["Kořen je 10.", "Děti menší.", "Maximum je 10."], "subject": "computer_science", "text": "Answer: 10.\nSteps:\n1. Kořen je 10.\n2. Děti menší.\n3. Maximum je 10.", "topic": "data_structures"}
{"answer": "A virtual environment isolates project packages from system Python.", "choices": null, "id": "cs_0351", "kind": "concept", "lang": "en", "question": "What is a Python virtual environment?", "steps": ["Separate folder.", "Own packages.", "Avoid conflicts."], "subject": "computer_science", "text": "Answer: Isolated packages.\nSteps:\n1. Separate folder.\n2. Own packages.\n3. Avoid conflicts.", "topic": "python"}
{"answer": "[5,6].indexOf(6) is 1.", "choices": {"A": "0", "B": "1", "C": "2", "D": "-1"}, "id": "cs_0352", "kind": "multiple_choice", "lang": "en", "question": "What does [5,6].indexOf(6) give?", "steps": ["Index from 0.", "6 at position 1.", "Select option B."], "subject": "computer_science", "text": "Answer: 1.\nSteps:\n1. Index from 0.\n2. 6 at position 1.\n3. Select option B.\nAnswer: (B)", "topic": "javascript"}
{"answer": "SELECT 12 + 30 returns 42.", "choices": null, "id": "cs_0353", "kind": "worked_example", "lang": "en", "question": "What does SELECT 12 + 30 return?", "steps": ["Add numbers.", "12 + 30 = 42.", "Result is 42."], "subject": "computer_science", "text": "Answer: 42.\nSteps:\n1. Add numbers.\n2. 12 + 30 = 42.\n3. Result is 42.", "topic": "sql"}
{"answer": "A /21 network has 2046 usable hosts.", "choices": null, "id": "cs_0354", "kind": "worked_example", "lang": "en", "question": "How many usable hosts in a /21 network?", "steps": ["Host bits = 11.", "Addresses = 2048.", "Usable = 2048 - 2 = 2046."], "subject": "computer_science", "text": "Answer: 2046.\nSteps:\n1. Host bits = 11.\n2. Addresses = 2048.\n3. Usable = 2048 - 2 = 2046.", "topic": "networking"}
{"answer": "Normalizace odstraňuje redundanci rozdělením tabulek.", "choices": {"A": "Odstraňuje redundanci", "B": "Maže tabulky", "C": "Třídí řádky", "D": "Spojuje databáze"}, "id": "cs_0355", "kind": "multiple_choice", "lang": "cs", "question": "Co je normalizace databáze?", "steps": ["Méně duplicit.", "Více tabulek.", "Vyber možnost A."], "subject": "computer_science", "text": "Answer: Odstraňuje redundanci.\nSteps:\n1. Méně duplicit.\n2. Více tabulek.\n3. Vyber možnost A.\nAnswer: (A)", "topic": "databases"}
{"answer": "The kernel is the core managing CPU, memory, and devices.", "choices": null, "id": "cs_0356", "kind": "concept", "lang": "en", "question": "What is an OS kernel?", "steps": ["Core software.", "Manages resources.", "Runs privileged."], "subject": "computer_science", "text": "Answer: Resource core.\nSteps:\n1. Core software.\n2. Manages resources.\n3. Runs privileged.", "topic": "operating_systems"}
{"answer": "20 plus 5 gives 25.", "choices": null, "id": "cs_0357", "kind": "worked_example", "lang": "en", "question": "Thermostat 20 degrees, increase(5). What is the setting?", "steps": ["Start 20.", "Add 5.", "Setting = 25."], "subject": "computer_science", "text": "Answer: 25.\nSteps:\n1. Start 20.\n2. Add 5.\n3. Setting = 25.", "topic": "oop"}
{"answer": "Floyd-Warshall computes all-pairs shortest paths.", "choices": {"A": "Dijkstra", "B": "Floyd-Warshall", "C": "Bubble sort", "D": "DFS"}, "id": "cs_0358", "kind": "multiple_choice", "lang": "en", "question": "Which computes all-pairs shortest paths?", "steps": ["All pairs needed.", "Floyd-Warshall does.", "Select option B."], "subject": "computer_science", "text": "Answer: Floyd-Warshall.\nSteps:\n1. All pairs needed.\n2. Floyd-Warshall does.\n3. Select option B.\nAnswer: (B)", "topic": "algorithms"}
{"answer": "Insertion sort worst case is O(n^2) with reverse-sorted input.", "choices": null, "id": "cs_0359", "kind": "concept", "lang": "en", "question": "What is insertion sort worst-case complexity?", "steps": ["Shift many items.", "Nested work.", "O(n^2)."], "subject": "computer_science", "text": "Answer: O(n^2).\nSteps:\n1. Shift many items.\n2. Nested work.\n3. O(n^2).", "topic": "complexity"}
{"answer": "Prostřední prvek je 3.", "choices": null, "id": "cs_0360", "kind": "worked_example", "lang": "cs", "question": "Seznam je [1,2,3,4,5]. Co je prostřední prvek?", "steps": ["Délka 5.", "Index 2.", "Prvek je 3."], "subject": "computer_science", "text": "Answer: 3.\nSteps:\n1. Délka 5.\n2. Index 2.\n3. Prvek je 3.", "topic": "data_structures"}
{"answer": "Docstrings are triple-quoted strings documenting modules and functions.", "choices": null, "id": "cs_0361", "kind": "concept", "lang": "en", "question": "What are Python docstrings?", "steps": ["Triple quotes.", "Describe purpose.", "Shown by help()."], "subject": "computer_science", "text": "Answer: Inline documentation.\nSteps:\n1. Triple quotes.\n2. Describe purpose.\n3. Shown by help().", "topic": "python"}
{"answer": "'hello'.slice(1,3) is 'el'.", "choices": {"A": "'el'", "B": "'hel'", "C": "'llo'", "D": "'h'"}, "id": "cs_0362", "kind": "multiple_choice", "lang": "en", "question": "What does 'hello'.slice(1,3) give?", "steps": ["Index 1 to 3.", "Letters e, l.", "Select option A."], "subject": "computer_science", "text": "Answer: 'el'.\nSteps:\n1. Index 1 to 3.\n2. Letters e, l.\n3. Select option A.\nAnswer: (A)", "topic": "javascript"}
{"answer": "SELECT 2 * 3 * 4 returns 24.", "choices": null, "id": "cs_0363", "kind": "worked_example", "lang": "en", "question": "What does SELECT 2 * 3 * 4 return?", "steps": ["2 x 3 = 6.", "6 x 4 = 24.", "Result is 24."], "subject": "computer_science", "text": "Answer: 24.\nSteps:\n1. 2 x 3 = 6.\n2. 6 x 4 = 24.\n3. Result is 24.", "topic": "sql"}
{"answer": "100 MB at 10 MB/s takes 10 seconds.", "choices": null, "id": "cs_0364", "kind": "worked_example", "lang": "en", "question": "Download 100 MB at 10 MB/s. How many seconds?", "steps": ["Size 100.", "Rate 10.", "100 / 10 = 10."], "subject": "computer_science", "text": "Answer: 10.\nSteps:\n1. Size 100.\n2. Rate 10.\n3. 100 / 10 = 10.", "topic": "networking"}
{"answer": "LIMIT omezuje počet vrácených řádků.", "choices": {"A": "Omezuje počet", "B": "Třídí řádky", "C": "Spojuje tabulky", "D": "Maže řádky"}, "id": "cs_0365", "kind": "multiple_choice", "lang": "cs", "question": "Co dělá LIMIT?", "steps": ["Ber prvních N.", "Méně řádků.", "Vyber možnost A."], "subject": "computer_science", "text": "Answer: Omezuje počet.\nSteps:\n1. Ber prvních N.\n2. Méně řádků.\n3. Vyber možnost A.\nAnswer: (A)", "topic": "databases"}
{"answer": "A daemon is a background service process without direct user control.", "choices": null, "id": "cs_0366", "kind": "concept", "lang": "en", "question": "What is a system daemon?", "steps": ["Runs background.", "No terminal.", "Serves requests."], "subject": "computer_science", "text": "Answer: Background service.\nSteps:\n1. Runs background.\n2. No terminal.\n3. Serves requests.", "topic": "operating_systems"}
{"answer": "150 minus 150 leaves 0.", "choices": null, "id": "cs_0367", "kind": "worked_example", "lang": "en", "question": "Balance 150, withdraw(150). What is the balance?", "steps": ["Start 150.", "Minus 150.", "Balance = 0."], "subject": "computer_science", "text": "Answer: 0.\nSteps:\n1. Start 150.\n2. Minus 150.\n3. Balance = 0.", "topic": "oop"}
{"answer": "N-queens is solved with backtracking search.", "choices": {"A": "N-queens", "B": "Bubble sort", "C": "Linear search", "D": "BFS"}, "id": "cs_0368", "kind": "multiple_choice", "lang": "en", "question": "Which uses backtracking?", "steps": ["Try and undo.", "N-queens fits.", "Select option A."], "subject": "computer_science", "text": "Answer: N-queens.\nSteps:\n1. Try and undo.\n2. N-queens fits.\n3. Select option A.\nAnswer: (A)", "topic": "algorithms"}
{"answer": "Exponential growth eventually outgrows any polynomial bound.", "choices": null, "id": "cs_0369", "kind": "concept", "lang": "en", "question": "How do exponential and polynomial compare?", "steps": ["Polynomial bounded power.", "Exponential multiplies.", "Exponential wins."], "subject": "computer_science", "text": "Answer: Exponential outgrows.\nSteps:\n1. Polynomial bounded power.\n2. Exponential multiplies.\n3. Exponential wins.", "topic": "complexity"}
{"answer": "Plný strom hloubky 2 má 7 uzlů.", "choices": null, "id": "cs_0370", "kind": "worked_example", "lang": "cs", "question": "Kolik uzlů má plný binární strom hloubky 2?", "steps": ["Úroveň 0: 1.", "Úroveň 1: 2, úroveň 2: 4.", "Celkem 1+2+4 = 7."], "subject": "computer_science", "text": "Answer: 7.\nSteps:\n1. Úroveň 0: 1.\n2. Úroveň 1: 2, úroveň 2: 4.\n3. Celkem 1+2+4 = 7.", "topic": "data_structures"}
{"answer": "len() on a dict returns the number of keys.", "choices": null, "id": "cs_0371", "kind": "concept", "lang": "en", "question": "What does len() give for dicts?", "steps": ["Count keys.", "Each once.", "Example: 3 keys = 3."], "subject": "computer_science", "text": "Answer: Number of keys.\nSteps:\n1. Count keys.\n2. Each once.\n3. Example: 3 keys = 3.", "topic": "python"}
{"answer": "Array.isArray([]) is true.", "choices": {"A": "true", "B": "false", "C": "[]", "D": "TypeError"}, "id": "cs_0372", "kind": "multiple_choice", "lang": "en", "question": "What does Array.isArray([]) give?", "steps": ["[] is array.", "Check true.", "Select option A."], "subject": "computer_science", "text": "Answer: true.\nSteps:\n1. [] is array.\n2. Check true.\n3. Select option A.\nAnswer: (A)", "topic": "javascript"}
{"answer": "SELECT 100 / 10 returns 10.", "choices": null, "id": "cs_0373", "kind": "worked_example", "lang": "en", "question": "What does SELECT 100 / 10 return?", "steps": ["Divide 100 by 10.", "100 / 10 = 10.", "Result is 10."], "subject": "computer_science", "text": "Answer: 10.\nSteps:\n1. Divide 100 by 10.\n2. 100 / 10 = 10.\n3. Result is 10.", "topic": "sql"}
{"answer": "Splitting /24 into /26 gives 4 subnets.", "choices": null, "id": "cs_0374", "kind": "worked_example", "lang": "en", "question": "Split /24 into /26. How many subnets?", "steps": ["Bits added = 2.", "2^2 = 4.", "Subnets = 4."], "subject": "computer_science", "text": "Answer: 4.\nSteps:\n1. Bits added = 2.\n2. 2^2 = 4.\n3. Subnets = 4.", "topic": "networking"}
{"answer": "Tabulku maže příkaz DROP.", "choices": {"A": "DROP", "B": "DELETE", "C": "REMOVE", "D": "CLEAR"}, "id": "cs_0375", "kind": "multiple_choice", "lang": "cs", "question": "Která operace maže celou tabulku?", "steps": ["DELETE maže řádky.", "DROP maže tabulku.", "Vyber možnost A."], "subject": "computer_science", "text": "Answer: DROP.\nSteps:\n1. DELETE maže řádky.\n2. DROP maže tabulku.\n3. Vyber možnost A.\nAnswer: (A)", "topic": "databases"}
{"answer": "Kontextový manažer řídí zdroje blokem with.", "choices": null, "id": "cs_0376", "kind": "concept", "lang": "cs", "question": "Co je kontextový manažer?", "steps": ["Blok with.", "Enter a exit.", "Příklad: open()."], "subject": "computer_science", "text": "Answer: Správa zdrojů.\nSteps:\n1. Blok with.\n2. Enter a exit.\n3. Příklad: open().", "topic": "python"}
{"answer": "Hoisting moves declarations to the top before execution.", "choices": null, "id": "cs_0377", "kind": "concept", "lang": "en", "question": "What is hoisting?", "steps": ["var hoisted.", "let in TDZ.", "Functions hoisted."], "subject": "computer_science", "text": "Answer: Top declarations.\nSteps:\n1. var hoisted.\n2. let in TDZ.\n3. Functions hoisted.", "topic": "javascript"}
{"answer": "SELECT returns 15.", "choices": {"A": "14", "B": "15", "C": "16", "D": "17"}, "id": "cs_0378", "kind": "multiple_choice", "lang": "en", "question": "Which value does SELECT 21 - 6 return?", "steps": ["Subtract.", "21-6=15.", "Select option B."], "subject": "computer_science", "text": "Answer: 15.\nSteps:\n1. Subtract.\n2. 21-6=15.\n3. Select option B.\nAnswer: (B)", "topic": "sql"}
{"answer": "TCP opens with SYN, SYN-ACK, and ACK before data.", "choices": null, "id": "cs_0379", "kind": "concept", "lang": "en", "question": "What is a TCP handshake?", "steps": ["SYN sent.", "SYN-ACK back.", "ACK confirms."], "subject": "computer_science", "text": "Answer: Three-way open.\nSteps:\n1. SYN sent.\n2. SYN-ACK back.\n3. ACK confirms.", "topic": "networking"}
{"answer": "Denormalization adds redundancy to speed up reads.", "choices": null, "id": "cs_0380", "kind": "concept", "lang": "en", "question": "What is denormalization?", "steps": ["Join less.", "Store twice.", "Faster reads."], "subject": "computer_science", "text": "Answer: Redundant speed.\nSteps:\n1. Join less.\n2. Store twice.\n3. Faster reads.", "topic": "databases"}
{"answer": "A microkernel keeps minimal core with services in user space.", "choices": null, "id": "cs_0381", "kind": "concept", "lang": "en", "question": "What is a microkernel?", "steps": ["IPC services.", "More stable.", "More switches."], "subject": "computer_science", "text": "Answer: Tiny core.\nSteps:\n1. IPC services.\n2. More stable.\n3. More switches.", "topic": "operating_systems"}
{"answer": "Composition holds parts while inheritance extends a parent type.", "choices": null, "id": "cs_0382", "kind": "concept", "lang": "en", "question": "What is composition versus inheritance?", "steps": ["Compose objects.", "Inherit behavior.", "Prefer compose."], "subject": "computer_science", "text": "Answer: Has versus is.\nSteps:\n1. Compose objects.\n2. Inherit behavior.\n3. Prefer compose.", "topic": "oop"}
{"answer": "Sorted = [2, 3, 4].", "choices": null, "id": "cs_0383", "kind": "worked_example", "lang": "en", "question": "Selection-sort [4, 2, 3] (case 1). Result?", "steps": ["Min 2.", "Swap.", "[2, 3, 4]."], "subject": "computer_science", "text": "Answer: [2, 3, 4].\nSteps:\n1. Min 2.\n2. Swap.\n3. [2, 3, 4].", "topic": "algorithms"}
{"answer": "Count = 4096.", "choices": null, "id": "cs_0384", "kind": "worked_example", "lang": "en", "question": "Subsets of 12 items (case 1). Count?", "steps": ["2^12.", "=4096.", "4096."], "subject": "computer_science", "text": "Answer: 4096.\nSteps:\n1. 2^12.\n2. =4096.\n3. 4096.", "topic": "complexity"}
{"answer": "A circular queue wraps indices to reuse freed slots.", "choices": null, "id": "cs_0385", "kind": "concept", "lang": "en", "question": "What is a circular queue?", "steps": ["Head tail.", "Modulo move.", "Fixed size."], "subject": "computer_science", "text": "Answer: Wrapped buffer.\nSteps:\n1. Head tail.\n2. Modulo move.\n3. Fixed size.", "topic": "data_structures"}
{"answer": "Context managers handle setup and cleanup with with blocks.", "choices": null, "id": "cs_0386", "kind": "concept", "lang": "en", "question": "What is a context manager?", "steps": ["Uses with.", "Calls enter/exit.", "Example: open()."], "subject": "computer_science", "text": "Answer: Setup and cleanup.\nSteps:\n1. Uses with.\n2. Calls enter/exit.\n3. Example: open().", "topic": "python"}
{"answer": "'x' + 4 is 'x4'.", "choices": {"A": "'4x'", "B": "'x4'", "C": "'5'", "D": "4"}, "id": "cs_0387", "kind": "multiple_choice", "lang": "en", "question": "What does 'x' + 4 give?", "steps": ["String concat.", "Result 'x4'.", "Select option B."], "subject": "computer_science", "text": "Answer: 'x4'.\nSteps:\n1. String concat.\n2. Result 'x4'.\n3. Select option B.\nAnswer: (B)", "topic": "javascript"}
{"answer": "SELECT returns 25.", "choices": {"A": "24", "B": "26", "C": "25", "D": "10"}, "id": "cs_0388", "kind": "multiple_choice", "lang": "cs", "question": "Kterou hodnotu vrátí SELECT 5 * 5?", "steps": ["Multiply.", "5x5=25.", "Select option C."], "subject": "computer_science", "text": "Answer: 25.\nSteps:\n1. Multiply.\n2. 5x5=25.\n3. Select option C.\nAnswer: (C)", "topic": "sql"}
{"answer": "Subnets = 4.", "choices": null, "id": "cs_0389", "kind": "worked_example", "lang": "en", "question": "Split /20 into /22 (case 1). How many subnets?", "steps": ["Bits 2.", "2^2=4.", "4."], "subject": "computer_science", "text": "Answer: 4.\nSteps:\n1. Bits 2.\n2. 2^2=4.\n3. 4.", "topic": "networking"}
{"answer": "INSERT adds rows.", "choices": {"A": "SELECT", "B": "INSERT", "C": "DELETE", "D": "UPDATE"}, "id": "cs_0390", "kind": "multiple_choice", "lang": "en", "question": "Which adds rows (case 1)?", "steps": ["Write op.", "INSERT fits.", "Select option B."], "subject": "computer_science", "text": "Answer: INSERT.\nSteps:\n1. Write op.\n2. INSERT fits.\n3. Select option B.\nAnswer: (B)", "topic": "databases"}
{"answer": "Round-robin používá časová kvanta.", "choices": {"A": "FIFO", "B": "Round-robin", "C": "LIFO", "D": "Stack"}, "id": "cs_0391", "kind": "multiple_choice", "lang": "cs", "question": "Co používá kvanta (případ 1)?", "steps": ["Rotate tasks.", "Fixed quantum.", "Select option B."], "subject": "computer_science", "text": "Answer: Round-robin.\nSteps:\n1. Střídej úlohy.\n2. Pevné kvantum.\n3. Select option B.\nAnswer: (B)", "topic": "operating_systems"}
{"answer": "__init__ constructs.", "choices": {"A": "__len__", "B": "__init__", "C": "__add__", "D": "__str__"}, "id": "cs_0392", "kind": "multiple_choice", "lang": "cs", "question": "Co je konstruktor (případ 1)?", "steps": ["Init runs.", "Sets fields.", "Select option B."], "subject": "computer_science", "text": "Answer: __init__.\nSteps:\n1. Init runs.\n2. Sets fields.\n3. Select option B.\nAnswer: (B)", "topic": "oop"}
{"answer": "factorial(6) is 720.", "choices": {"A": "120", "B": "720", "C": "820", "D": "60"}, "id": "cs_0393", "kind": "multiple_choice", "lang": "en", "question": "What is factorial(6)?", "steps": ["Multiply down.", "Result 720.", "Select option B."], "subject": "computer_science", "text": "Answer: 720.\nSteps:\n1. Multiply down.\n2. Result 720.\n3. Select option B.\nAnswer: (B)", "topic": "algorithms"}
{"answer": "About 11.", "choices": null, "id": "cs_0394", "kind": "worked_example", "lang": "en", "question": "Binary steps n=2000 (case 2). About?", "steps": ["log2.", "~11.", "11."], "subject": "computer_science", "text": "Answer: 11.\nSteps:\n1. log2.\n2. ~11.\n3. 11.", "topic": "complexity"}
{"answer": "Load = 0.83.", "choices": null, "id": "cs_0395", "kind": "worked_example", "lang": "en", "question": "10 items in 12 slots (case 1). Load?", "steps": ["10/12.", "=0.83.", "0.83."], "subject": "computer_science", "text": "Answer: 0.83.\nSteps:\n1. 10/12.\n2. =0.83.\n3. 0.83.", "topic": "data_structures"}
{"answer": "11//4 is 2.", "choices": {"A": "3", "B": "2", "C": "1", "D": "4"}, "id": "cs_0396", "kind": "multiple_choice", "lang": "en", "question": "What does 11 // 4 give in Python?", "steps": ["Floor divide.", "11//4=2.", "Select option B."], "subject": "computer_science", "text": "Answer: 2.\nSteps:\n1. Floor divide.\n2. 11//4=2.\n3. Select option B.\nAnswer: (B)", "topic": "python"}
{"answer": "Result is 'hi1'.", "choices": null, "id": "cs_0397", "kind": "worked_example", "lang": "en", "question": "What does 'Hi1'.toLowerCase() give?", "steps": ["Lowercase.", "'hi1'.", "Result."], "subject": "computer_science", "text": "Answer: 'hi1'.\nSteps:\n1. Lowercase.\n2. 'hi1'.\n3. Result.", "topic": "javascript"}
{"answer": "SELECT returns 11.", "choices": null, "id": "cs_0398", "kind": "worked_example", "lang": "en", "question": "What does SELECT 22 / 2 return?", "steps": ["Divide.", "22/2=11.", "11."], "subject": "computer_science", "text": "Answer: 11.\nSteps:\n1. Divide.\n2. 22/2=11.\n3. 11.", "topic": "sql"}
{"answer": "192.168.1.1 is private.", "choices": {"A": "8.8.1.1", "B": "192.168.1.1", "C": "1.1.1.1", "D": "203.0.1.1"}, "id": "cs_0399", "kind": "multiple_choice", "lang": "en", "question": "Which IP is private (set 1)?", "steps": ["Private ranges.", "192.168.1.1 fits.", "Select option B."], "subject": "computer_science", "text": "Answer: 192.168.1.1.\nSteps:\n1. Private ranges.\n2. 192.168.1.1 fits.\n3. Select option B.\nAnswer: (B)", "topic": "networking"}
{"answer": "Sharding splits data across servers by key ranges.", "choices": null, "id": "cs_0400", "kind": "concept", "lang": "en", "question": "What is sharding?", "steps": ["Hash key.", "Route shard.", "Scale out."], "subject": "computer_science", "text": "Answer: Split by key.\nSteps:\n1. Hash key.\n2. Route shard.\n3. Scale out.", "topic": "databases"}
{"answer": "Mutex ensures one.", "choices": {"A": "Queue", "B": "Array", "C": "Mutex", "D": "File"}, "id": "cs_0401", "kind": "multiple_choice", "lang": "en", "question": "What ensures one access (case 2)?", "steps": ["Lock it.", "One holder.", "Select option C."], "subject": "computer_science", "text": "Answer: Mutex.\nSteps:\n1. Lock it.\n2. One holder.\n3. Select option C.\nAnswer: (C)", "topic": "operating_systems"}
{"answer": "Encapsulation bundles.", "choices": {"A": "Loop", "B": "Sort", "C": "Encapsulation", "D": "Search"}, "id": "cs_0402", "kind": "multiple_choice", "lang": "en", "question": "Which bundles data and methods (case 2)?", "steps": ["Hide inside.", "One unit.", "Select option C."], "subject": "computer_science", "text": "Answer: Encapsulation.\nSteps:\n1. Hide inside.\n2. One unit.\n3. Select option C.\nAnswer: (C)", "topic": "oop"}
{"answer": "Steps = 7.", "choices": {"A": "6", "B": "8", "C": "7", "D": "128"}, "id": "cs_0403", "kind": "multiple_choice", "lang": "cs", "question": "Kolik kroků binárně pro n = 128?", "steps": ["log2(128)=7.", "Halve 7x.", "Select option C."], "subject": "computer_science", "text": "Answer: 7.\nSteps:\n1. log2(128)=7.\n2. Halve 7x.\n3. Select option C.\nAnswer: (C)", "topic": "algorithms"}
{"answer": "Iterations = 27.", "choices": {"A": "9", "B": "27", "C": "18", "D": "12"}, "id": "cs_0404", "kind": "multiple_choice", "lang": "en", "question": "Triple loops n = 3. How many iterations?", "steps": ["3^3.", "=27.", "Select option B."], "subject": "computer_science", "text": "Answer: 27.\nSteps:\n1. 3^3.\n2. =27.\n3. Select option B.\nAnswer: (B)", "topic": "complexity"}
{"answer": "K7 has 21 edges.", "choices": {"A": "20", "B": "21", "C": "22", "D": "49"}, "id": "cs_0405", "kind": "multiple_choice", "lang": "en", "question": "How many edges in K7?", "steps": ["n(n-1)/2.", "=21.", "Select option B."], "subject": "computer_science", "text": "Answer: 21.\nSteps:\n1. n(n-1)/2.\n2. =21.\n3. Select option B.\nAnswer: (B)", "topic": "data_structures"}
{"answer": "Asyncio runs concurrent I/O with async and await.", "choices": null, "id": "cs_0406", "kind": "concept", "lang": "en", "question": "What is asyncio used for?", "steps": ["Async def.", "Await pauses.", "Event loop runs."], "subject": "computer_science", "text": "Answer: Concurrent I/O.\nSteps:\n1. Async def.\n2. Await pauses.\n3. Event loop runs.", "topic": "python"}
{"answer": "Repeat gives 'abababab'.", "choices": null, "id": "cs_0407", "kind": "worked_example", "lang": "en", "question": "What does 'ab'.repeat(4) give?", "steps": ["Repeat.", "4x.", "'abababab'."], "subject": "computer_science", "text": "Answer: 'abababab'.\nSteps:\n1. Repeat.\n2. 4x.\n3. 'abababab'.", "topic": "javascript"}
{"answer": "MAX is 8.", "choices": {"A": "6", "B": "7", "C": "9", "D": "8"}, "id": "cs_0408", "kind": "multiple_choice", "lang": "en", "question": "Which value does SELECT MAX of (6,8,7) give?", "steps": ["Compare.", "Largest 8.", "Select option D."], "subject": "computer_science", "text": "Answer: 8.\nSteps:\n1. Compare.\n2. Largest 8.\n3. Select option D.\nAnswer: (D)", "topic": "sql"}
{"answer": "UDP suits low-latency loss-tolerant traffic like calls.", "choices": null, "id": "cs_0409", "kind": "concept", "lang": "en", "question": "What is UDP used for?", "steps": ["No handshake.", "No retry.", "Low overhead."], "subject": "computer_science", "text": "Answer: Fast datagrams.\nSteps:\n1. No handshake.\n2. No retry.\n3. Low overhead.", "topic": "networking"}
{"answer": "Max = 12.", "choices": null, "id": "cs_0410", "kind": "worked_example", "lang": "en", "question": "Cross-join 3 and 4 rows (case 1). Max?", "steps": ["3x4.", "=12.", "12."], "subject": "computer_science", "text": "Answer: 12.\nSteps:\n1. 3x4.\n2. =12.\n3. 12.", "topic": "databases"}
{"answer": "Kernel manages.", "choices": {"A": "Shell", "B": "App", "C": "Driver", "D": "Kernel"}, "id": "cs_0411", "kind": "multiple_choice", "lang": "cs", "question": "Co řídí zdroje (případ 3)?", "steps": ["Core role.", "CPU mem.", "Select option D."], "subject": "computer_science", "text": "Answer: Kernel.\nSteps:\n1. Core role.\n2. CPU mem.\n3. Select option D.\nAnswer: (D)", "topic": "operating_systems"}
{"answer": "Area = 20.", "choices": null, "id": "cs_0412", "kind": "worked_example", "lang": "en", "question": "Rectangle 4 by 5 (case 1). Area?", "steps": ["4x5.", "=20.", "20."], "subject": "computer_science", "text": "Answer: 20.\nSteps:\n1. 4x5.\n2. =20.\n3. 20.", "topic": "oop"}
{"answer": "Backtracking tries options and undoes failing paths.", "choices": null, "id": "cs_0413", "kind": "concept", "lang": "en", "question": "What is backtracking?", "steps": ["Choose step.", "Recurse on.", "Undo if fail."], "subject": "computer_science", "text": "Answer: Try and undo.\nSteps:\n1. Choose step.\n2. Recurse on.\n3. Undo if fail.", "topic": "algorithms"}
{"answer": "Pseudo-polynomial depends on numeric values, not just input length.", "choices": null, "id": "cs_0414", "kind": "concept", "lang": "en", "question": "What is pseudo-polynomial time?", "steps": ["Knapsack case.", "Big numbers slow.", "Not true poly."], "subject": "computer_science", "text": "Answer: Value dependent.\nSteps:\n1. Knapsack case.\n2. Big numbers slow.\n3. Not true poly.", "topic": "complexity"}
{"answer": "Edges = 45.", "choices": null, "id": "cs_0415", "kind": "worked_example", "lang": "en", "question": "Edges in K10 (case 2). Count?", "steps": ["n(n-1)/2.", "=45.", "45."], "subject": "computer_science", "text": "Answer: 45.\nSteps:\n1. n(n-1)/2.\n2. =45.\n3. 45.", "topic": "data_structures"}
{"answer": "max is 4.", "choices": null, "id": "cs_0416", "kind": "worked_example", "lang": "en", "question": "What does max([1,4,2]) return?", "steps": ["Compare three.", "Largest 4.", "Result 4."], "subject": "computer_science", "text": "Answer: 4.\nSteps:\n1. Compare three.\n2. Largest 4.\n3. Result 4.", "topic": "python"}
{"answer": "The event loop runs queued callbacks when the stack is empty.", "choices": null, "id": "cs_0417", "kind": "concept", "lang": "en", "question": "What is the event loop?", "steps": ["Stack first.", "Queue next.", "Async appears."], "subject": "computer_science", "text": "Answer: Queued callbacks.\nSteps:\n1. Stack first.\n2. Queue next.\n3. Async appears.", "topic": "javascript"}
{"answer": "Result is 0.", "choices": null, "id": "cs_0418", "kind": "worked_example", "lang": "en", "question": "Compute SELECT 12 % 3.", "steps": ["Modulo.", "12%3=0.", "0."], "subject": "computer_science", "text": "Answer: 0.\nSteps:\n1. Modulo.\n2. 12%3=0.\n3. 0.", "topic": "sql"}
{"answer": "UDP is connectionless.", "choices": {"A": "TCP", "B": "HTTP", "C": "UDP", "D": "IP"}, "id": "cs_0419", "kind": "multiple_choice", "lang": "en", "question": "What is connectionless (case 2)?", "steps": ["No handshake.", "UDP fits.", "Select option C."], "subject": "computer_science", "text": "Answer: UDP.\nSteps:\n1. No handshake.\n2. UDP fits.\n3. Select option C.\nAnswer: (C)", "topic": "networking"}
{"answer": "Count = 7.", "choices": null, "id": "cs_0420", "kind": "worked_example", "lang": "en", "question": "INSERT 7 rows into empty (case 2). Count?", "steps": ["Start 0.", "Add 7.", "7."], "subject": "computer_science", "text": "Answer: 7.\nSteps:\n1. Start 0.\n2. Add 7.\n3. 7.", "topic": "databases"}
{"answer": "FIFO evicts oldest.", "choices": {"A": "FIFO", "B": "LIFO", "C": "LRU", "D": "Random"}, "id": "cs_0421", "kind": "multiple_choice", "lang": "en", "question": "Which evicts oldest page (case 4)?", "steps": ["Queue order.", "Oldest first.", "Select option A."], "subject": "computer_science", "text": "Answer: FIFO.\nSteps:\n1. Queue order.\n2. Oldest first.\n3. Select option A.\nAnswer: (A)", "topic": "operating_systems"}
{"answer": "Inheritance reuses.", "choices": {"A": "Loop", "B": "Recursion", "C": "Sorting", "D": "Inheritance"}, "id": "cs_0422", "kind": "multiple_choice", "lang": "en", "question": "Which reuses parent behavior (case 3)?", "steps": ["Child extends.", "Gets methods.", "Select option D."], "subject": "computer_science", "text": "Answer: Inheritance.\nSteps:\n1. Child extends.\n2. Gets methods.\n3. Select option D.\nAnswer: (D)", "topic": "oop"}
{"answer": "factorial(8) = 40320.", "choices": null, "id": "cs_0423", "kind": "worked_example", "lang": "en", "question": "Compute factorial(8) (case 2).", "steps": ["Expand.", "Product.", "40320."], "subject": "computer_science", "text": "Answer: 40320.\nSteps:\n1. Expand.\n2. Product.\n3. 40320.", "topic": "algorithms"}
{"answer": "Master theorem solves divide-and-conquer recurrences quickly.", "choices": null, "id": "cs_0424", "kind": "concept", "lang": "en", "question": "What is the master theorem?", "steps": ["Compare parts.", "Pick case.", "Gives Big-O."], "subject": "computer_science", "text": "Answer: Recurrence solver.\nSteps:\n1. Compare parts.\n2. Pick case.\n3. Gives Big-O.", "topic": "complexity"}
{"answer": "A deque allows push and pop on both ends.", "choices": null, "id": "cs_0425", "kind": "concept", "lang": "en", "question": "What is a deque?", "steps": ["Left right.", "O(1) ends.", "Flexible."], "subject": "computer_science", "text": "Answer: Both ends.\nSteps:\n1. Left right.\n2. O(1) ends.\n3. Flexible.", "topic": "data_structures"}
{"answer": "x becomes [1, 2, 12].", "choices": null, "id": "cs_0426", "kind": "worked_example", "lang": "en", "question": "x=[1,2]; x.append(12). What is x?", "steps": ["Start [1,2].", "Append 12.", "x=[1, 2, 12]."], "subject": "computer_science", "text": "Answer: [1, 2, 12].\nSteps:\n1. Start [1,2].\n2. Append 12.\n3. x=[1, 2, 12].", "topic": "python"}
{"answer": "12%4 is 0.", "choices": {"A": "1", "B": "2", "C": "0", "D": "4"}, "id": "cs_0427", "kind": "multiple_choice", "lang": "en", "question": "What does 12 % 4 give in JavaScript?", "steps": ["Remainder.", "12%4=0.", "Select option C."], "subject": "computer_science", "text": "Answer: 0.\nSteps:\n1. Remainder.\n2. 12%4=0.\n3. Select option C.\nAnswer: (C)", "topic": "javascript"}
{"answer": "LENGTH is 6.", "choices": null, "id": "cs_0428", "kind": "worked_example", "lang": "en", "question": "Compute SELECT LENGTH('hello3').", "steps": ["Count chars.", "'hello3'.", "6."], "subject": "computer_science", "text": "Answer: 6.\nSteps:\n1. Count chars.\n2. 'hello3'.\n3. 6.", "topic": "sql"}
{"answer": "ARP maps IP to MAC.", "choices": {"A": "IP to port", "B": "MAC to IP", "C": "Port to MAC", "D": "IP to MAC"}, "id": "cs_0429", "kind": "multiple_choice", "lang": "en", "question": "What does ARP map (case 3)?", "steps": ["LAN lookup.", "IP to MAC.", "Select option D."], "subject": "computer_science", "text": "Answer: IP to MAC.\nSteps:\n1. LAN lookup.\n2. IP to MAC.\n3. Select option D.\nAnswer: (D)", "topic": "networking"}
{"answer": "Returned = 5.", "choices": null, "id": "cs_0430", "kind": "worked_example", "lang": "en", "question": "13 rows, WHERE matches 5 (case 3). Returned?", "steps": ["Total 13.", "Match 5.", "5."], "subject": "computer_science", "text": "Answer: 5.\nSteps:\n1. Total 13.\n2. Match 5.\n3. 5.", "topic": "databases"}
{"answer": "Copy-on-write shares pages until a write forces a copy.", "choices": null, "id": "cs_0431", "kind": "concept", "lang": "en", "question": "What is copy-on-write?", "steps": ["Fork shares.", "Write copies.", "Saves memory."], "subject": "computer_science", "text": "Answer: Share until write.\nSteps:\n1. Fork shares.\n2. Write copies.\n3. Saves memory.", "topic": "operating_systems"}
{"answer": "An abstract class cannot instantiate and defines required methods.", "choices": null, "id": "cs_0432", "kind": "concept", "lang": "en", "question": "What is an abstract class?", "steps": ["No direct make.", "Subclass fills.", "Enforces API."], "subject": "computer_science", "text": "Answer: Unfinished blueprint.\nSteps:\n1. No direct make.\n2. Subclass fills.\n3. Enforces API.", "topic": "oop"}
{"answer": "DP solves overlapping subproblems once and reuses answers.", "choices": null, "id": "cs_0433", "kind": "concept", "lang": "en", "question": "What is dynamic programming?", "steps": ["Memo table.", "Bottom up.", "Optimal parts."], "subject": "computer_science", "text": "Answer: Reuse subanswers.\nSteps:\n1. Memo table.\n2. Bottom up.\n3. Optimal parts.", "topic": "algorithms"}
{"answer": "200 vs 40000.", "choices": null, "id": "cs_0434", "kind": "worked_example", "lang": "en", "question": "O(n) vs O(n^2) n=200 (case 3). Steps?", "steps": ["O(n)=200.", "O(n^2)=40000.", "Done."], "subject": "computer_science", "text": "Answer: 200 vs 40000.\nSteps:\n1. O(n)=200.\n2. O(n^2)=40000.\n3. Done.", "topic": "complexity"}
{"answer": "A trie stores strings by shared prefixes for fast lookup.", "choices": null, "id": "cs_0435", "kind": "concept", "lang": "en", "question": "What is a trie?", "steps": ["Char nodes.", "Share start.", "Word end."], "subject": "computer_science", "text": "Answer: Prefix tree.\nSteps:\n1. Char nodes.\n2. Share start.\n3. Word end.", "topic": "data_structures"}
{"answer": "12%5 je 2.", "choices": {"A": "3", "B": "4", "C": "2", "D": "5"}, "id": "cs_0436", "kind": "multiple_choice", "lang": "cs", "question": "Co vrátí 12 % 5 v Pythonu?", "steps": ["Zbytek.", "12%5=2.", "Vyber možnost C."], "subject": "computer_science", "text": "Answer: 2.\nSteps:\n1. Zbytek.\n2. 12%5=2.\n3. Vyber možnost C.\nAnswer: (C)", "topic": "python"}
{"answer": "Math.floor(3.7) is 3.", "choices": null, "id": "cs_0437", "kind": "worked_example", "lang": "en", "question": "What does Math.floor(3.7) give?", "steps": ["Round down.", "3.7 to 3.", "3."], "subject": "computer_science", "text": "Answer: 3.\nSteps:\n1. Round down.\n2. 3.7 to 3.\n3. 3.", "topic": "javascript"}
{"answer": "MIN is 9.", "choices": null, "id": "cs_0438", "kind": "worked_example", "lang": "en", "question": "Compute SELECT MIN of (9,12).", "steps": ["Compare.", "Smallest 9.", "9."], "subject": "computer_science", "text": "Answer: 9.\nSteps:\n1. Compare.\n2. Smallest 9.\n3. 9.", "topic": "sql"}
{"answer": "Time = 3.5 s.", "choices": null, "id": "cs_0439", "kind": "worked_example", "lang": "en", "question": "Download 70 MB at 20 MB/s (case 2). Seconds?", "steps": ["Size 70.", "Rate 20.", "3.5 s."], "subject": "computer_science", "text": "Answer: 3.5.\nSteps:\n1. Size 70.\n2. Rate 20.\n3. 3.5 s.", "topic": "networking"}
{"answer": "Index speeds reads.", "choices": {"A": "Deletes data", "B": "Drops table", "C": "Speeds reads", "D": "Stops DB"}, "id": "cs_0440", "kind": "multiple_choice", "lang": "cs", "question": "K čemu je index (případ 2)?", "steps": ["Lookup aid.", "Faster.", "Select option C."], "subject": "computer_science", "text": "Answer: Speeds reads.\nSteps:\n1. Lookup aid.\n2. Faster.\n3. Select option C.\nAnswer: (C)", "topic": "databases"}
{"answer": "Thrashing is excess paging that stalls useful work.", "choices": null, "id": "cs_0441", "kind": "concept", "lang": "en", "question": "What is thrashing?", "steps": ["Too few frames.", "Swap always.", "Throughput falls."], "subject": "computer_science", "text": "Answer: Paging storm.\nSteps:\n1. Too few frames.\n2. Swap always.\n3. Throughput falls.", "topic": "operating_systems"}
{"answer": "Value = 8.", "choices": null, "id": "cs_0442", "kind": "worked_example", "lang": "en", "question": "Counter 7, inc() (case 2). Value?", "steps": ["Start 7.", "Plus 1.", "8."], "subject": "computer_science", "text": "Answer: 8.\nSteps:\n1. Start 7.\n2. Plus 1.\n3. 8.", "topic": "oop"}
{"answer": "A spanning tree connects all vertices with fewest edges.", "choices": null, "id": "cs_0443", "kind": "concept", "lang": "en", "question": "What is a spanning tree?", "steps": ["V-1 edges.", "No cycles.", "Min variant."], "subject": "computer_science", "text": "Answer: Connect all.\nSteps:\n1. V-1 edges.\n2. No cycles.\n3. Min variant.", "topic": "algorithms"}
{"answer": "Průměrná konstantní cena přes mnoho operací.", "choices": null, "id": "cs_0444", "kind": "concept", "lang": "cs", "question": "Co je amortizovaná složitost O(1)?", "steps": ["Občas drahá.", "Většinou levná.", "Pole."], "subject": "computer_science", "text": "Answer: Průměrná konstanta.\nSteps:\n1. Občas drahá.\n2. Většinou levná.\n3. Pole.", "topic": "complexity"}
{"answer": "Kruhová fronta obtáčí indexy.", "choices": null, "id": "cs_0445", "kind": "concept", "lang": "cs", "question": "Co je kruhová fronta?", "steps": ["Hlava pata.", "Modulo.", "Pevná velikost."], "subject": "computer_science", "text": "Answer: Obtočený buffer.\nSteps:\n1. Hlava pata.\n2. Modulo.\n3. Pevná velikost.", "topic": "data_structures"}
{"answer": "Result is [5, 6, 7].", "choices": null, "id": "cs_0446", "kind": "worked_example", "lang": "en", "question": "What does list(range(5,8)) give?", "steps": ["From 5.", "To 7.", "[5, 6, 7]."], "subject": "computer_science", "text": "Answer: [5, 6, 7].\nSteps:\n1. From 5.\n2. To 7.\n3. [5, 6, 7].", "topic": "python"}
{"answer": "4+9 is 13.", "choices": null, "id": "cs_0447", "kind": "worked_example", "lang": "en", "question": "What does 4 + 9 give in JavaScript?", "steps": ["Add.", "=13.", "13."], "subject": "computer_science", "text": "Answer: 13.\nSteps:\n1. Add.\n2. =13.\n3. 13.", "topic": "javascript"}
{"answer": "Poddotaz je SELECT vnořený v jiném dotazu.", "choices": null, "id": "cs_0448", "kind": "concept", "lang": "cs", "question": "Co je poddotaz?", "steps": ["Vnitřní běží.", "Vnější použije.", "Ve WHERE či FROM."], "subject": "computer_science", "text": "Answer: Vnořený SELECT.\nSteps:\n1. Vnitřní běží.\n2. Vnější použije.\n3. Ve WHERE či FROM.", "topic": "sql"}
{"answer": "TCP otevírá spojením SYN, SYN-ACK a ACK.", "choices": null, "id": "cs_0449", "kind": "concept", "lang": "cs", "question": "Co je TCP handshake?", "steps": ["SYN ven.", "SYN-ACK zpět.", "ACK potvrdí."], "subject": "computer_science", "text": "Answer: Trojcestné otevření.\nSteps:\n1. SYN ven.\n2. SYN-ACK zpět.\n3. ACK potvrdí.", "topic": "networking"}
{"answer": "Remain = 9.", "choices": null, "id": "cs_0450", "kind": "worked_example", "lang": "en", "question": "Table has 14 rows, DELETE removes 5 (case 4). Remain?", "steps": ["Start 14.", "Minus 5.", "9."], "subject": "computer_science", "text": "Answer: 9.\nSteps:\n1. Start 14.\n2. Minus 5.\n3. 9.", "topic": "databases"}
{"answer": "Stránky se načítají až při prvním přístupu.", "choices": null, "id": "cs_0451", "kind": "concept", "lang": "cs", "question": "Co je stránkování na žádost?", "steps": ["Start prázdný.", "Fault načte.", "Méně I/O."], "subject": "computer_science", "text": "Answer: Líné načtení.\nSteps:\n1. Start prázdný.\n2. Fault načte.\n3. Méně I/O.", "topic": "operating_systems"}
{"answer": "An interface lists required methods without implementation.", "choices": null, "id": "cs_0452", "kind": "concept", "lang": "en", "question": "What is an interface?", "steps": ["Contract only.", "Class fulfills.", "Many can share."], "subject": "computer_science", "text": "Answer: Required methods.\nSteps:\n1. Contract only.\n2. Class fulfills.\n3. Many can share.", "topic": "oop"}
{"answer": "In-place sorts use O(1) extra space by rearranging input.", "choices": null, "id": "cs_0453", "kind": "concept", "lang": "en", "question": "What is in-place sorting?", "steps": ["Swap inside.", "Save memory.", "Example: heap."], "subject": "computer_science", "text": "Answer: No extra array.\nSteps:\n1. Swap inside.\n2. Save memory.\n3. Example: heap.", "topic": "algorithms"}
{"answer": "Iterations = 400.", "choices": null, "id": "cs_0454", "kind": "worked_example", "lang": "en", "question": "Nested loops n=20 (case 4). Iterations?", "steps": ["20x20.", "=400.", "400."], "subject": "computer_science", "text": "Answer: 400.\nSteps:\n1. 20x20.\n2. =400.\n3. 400.", "topic": "complexity"}
{"answer": "Returns 8.", "choices": null, "id": "cs_0455", "kind": "worked_example", "lang": "en", "question": "Enqueue 8,9 then dequeue (case 3). Returns?", "steps": ["Front 8.", "FIFO.", "8."], "subject": "computer_science", "text": "Answer: 8.\nSteps:\n1. Front 8.\n2. FIFO.\n3. 8.", "topic": "data_structures"}
{"answer": "2**6 je 64.", "choices": {"A": "32", "B": "128", "C": "12", "D": "64"}, "id": "cs_0456", "kind": "multiple_choice", "lang": "cs", "question": "Co vrátí 2**6?", "steps": ["Mocnina dvou.", "2**6=64.", "Vyber možnost D."], "subject": "computer_science", "text": "Answer: 64.\nSteps:\n1. Mocnina dvou.\n2. 2**6=64.\n3. Vyber možnost D.\nAnswer: (D)", "topic": "python"}
{"answer": "Join gives '5-6-7'.", "choices": null, "id": "cs_0457", "kind": "worked_example", "lang": "en", "question": "What does [5,6,7].join('-') give?", "steps": ["Join dash.", "Parts.", "'5-6-7'."], "subject": "computer_science", "text": "Answer: '5-6-7'.\nSteps:\n1. Join dash.\n2. Parts.\n3. '5-6-7'.", "topic": "javascript"}
{"answer": "Sum is 45.", "choices": null, "id": "cs_0458", "kind": "worked_example", "lang": "en", "question": "Sum 1..9 via SELECT. What value?", "steps": ["n=9.", "n(n+1)/2.", "45."], "subject": "computer_science", "text": "Answer: 45.\nSteps:\n1. n=9.\n2. n(n+1)/2.\n3. 45.", "topic": "sql"}
{"answer": "TCP opens SYN, SYN-ACK, ACK.", "choices": {"A": "SYN, SYN-ACK, ACK", "B": "SYN, ACK", "C": "ACK, FIN", "D": "SYN, FIN"}, "id": "cs_0459", "kind": "multiple_choice", "lang": "en", "question": "What is TCP open order (case 4)?", "steps": ["Three steps.", "In order.", "Select option A."], "subject": "computer_science", "text": "Answer: SYN, SYN-ACK, ACK.\nSteps:\n1. Three steps.\n2. In order.\n3. Select option A.\nAnswer: (A)", "topic": "networking"}
{"answer": "Max = 8.", "choices": null, "id": "cs_0460", "kind": "worked_example", "lang": "en", "question": "Cross-join 2 and 4 rows (case 5). Max?", "steps": ["2x4.", "=8.", "8."], "subject": "computer_science", "text": "Answer: 8.\nSteps:\n1. 2x4.\n2. =8.\n3. 8.", "topic": "databases"}
{"answer": "Round-robin uses slices.", "choices": {"A": "FIFO", "B": "Round-robin", "C": "LIFO", "D": "Stack"}, "id": "cs_0461", "kind": "multiple_choice", "lang": "en", "question": "Which uses time slices (case 5)?", "steps": ["Rotate tasks.", "Fixed quantum.", "Select option B."], "subject": "computer_science", "text": "Answer: Round-robin.\nSteps:\n1. Rotate tasks.\n2. Fixed quantum.\n3. Select option B.\nAnswer: (B)", "topic": "operating_systems"}
{"answer": "B().x = 5.", "choices": null, "id": "cs_0462", "kind": "worked_example", "lang": "en", "question": "Class A x=5, B(A) (case 3). B().x?", "steps": ["A sets.", "B inherits.", "5."], "subject": "computer_science", "text": "Answer: 5.\nSteps:\n1. A sets.\n2. B inherits.\n3. 5.", "topic": "oop"}
{"answer": "Bubble sort swaps adjacent.", "choices": {"A": "Merge sort", "B": "Binary search", "C": "BFS", "D": "Bubble sort"}, "id": "cs_0463", "kind": "multiple_choice", "lang": "en", "question": "Which swaps adjacent out-of-order (case 3)?", "steps": ["Neighbor pairs.", "Swap if wrong.", "Select option D."], "subject": "computer_science", "text": "Answer: Bubble sort.\nSteps:\n1. Neighbor pairs.\n2. Swap if wrong.\n3. Select option D.\nAnswer: (D)", "topic": "algorithms"}
{"answer": "Count = 2048.", "choices": null, "id": "cs_0464", "kind": "worked_example", "lang": "en", "question": "Subsets of 11 items (case 5). Count?", "steps": ["2^11.", "=2048.", "2048."], "subject": "computer_science", "text": "Answer: 2048.\nSteps:\n1. 2^11.\n2. =2048.\n3. 2048.", "topic": "complexity"}
{"answer": "Open addressing probes other slots on collision.", "choices": null, "id": "cs_0465", "kind": "concept", "lang": "en", "question": "What is open addressing?", "steps": ["Hash spot.", "Linear probe.", "Fill gaps."], "subject": "computer_science", "text": "Answer: Probe slots.\nSteps:\n1. Hash spot.\n2. Linear probe.\n3. Fill gaps.", "topic": "data_structures"}
{"answer": "'ab'*3 is 'ababab'.", "choices": null, "id": "cs_0466", "kind": "worked_example", "lang": "en", "question": "What does 'ab'*3 give?", "steps": ["Repeat.", "3x.", "'ababab'."], "subject": "computer_science", "text": "Answer: 'ababab'.\nSteps:\n1. Repeat.\n2. 3x.\n3. 'ababab'.", "topic": "python"}
{"answer": "Math.ceil(3.2) je 4.", "choices": {"A": "3", "B": "5", "C": "2", "D": "4"}, "id": "cs_0467", "kind": "multiple_choice", "lang": "cs", "question": "Co vrátí Math.ceil(3.2)?", "steps": ["Round up.", "3.2 to 4.", "Select option D."], "subject": "computer_science", "text": "Answer: 4.\nSteps:\n1. Zaokrouhli nahoru.\n2. 3,2 na 4.\n3. Select option D.\nAnswer: (D)", "topic": "javascript"}
{"answer": "LIKE hledá text podle vzoru s % a _.", "choices": null, "id": "cs_0468", "kind": "concept", "lang": "cs", "question": "Co je LIKE?", "steps": ["% sekvence.", "_ jeden znak.", "Pozor case."], "subject": "computer_science", "text": "Answer: Vzor textu.\nSteps:\n1. % sekvence.\n2. _ jeden znak.\n3. Pozor case.", "topic": "sql"}
{"answer": "Rate = 20.", "choices": null, "id": "cs_0469", "kind": "worked_example", "lang": "en", "question": "RTT 50 ms (case 3). Serial req/s?", "steps": ["1000 ms.", "1000/50=20.", "20."], "subject": "computer_science", "text": "Answer: 20.\nSteps:\n1. 1000 ms.\n2. 1000/50=20.\n3. 20.", "topic": "networking"}
{"answer": "Replication copies data to replicas for safety and reads.", "choices": null, "id": "cs_0470", "kind": "concept", "lang": "en", "question": "What is replication?", "steps": ["Primary writes.", "Replicas copy.", "Failover ready."], "subject": "computer_science", "text": "Answer: Copied data.\nSteps:\n1. Primary writes.\n2. Replicas copy.\n3. Failover ready.", "topic": "databases"}
{"answer": "Faults = 4.", "choices": null, "id": "cs_0471", "kind": "worked_example", "lang": "en", "question": "4 frames empty, refs 1..4 (case 1). Faults?", "steps": ["All miss.", "Count 4.", "4."], "subject": "computer_science", "text": "Answer: 4.\nSteps:\n1. All miss.\n2. Count 4.\n3. 4.", "topic": "operating_systems"}
{"answer": "super() calls parent.", "choices": {"A": "Calls parent", "B": "Creates child", "C": "Deletes obj", "D": "Copies list"}, "id": "cs_0472", "kind": "multiple_choice", "lang": "en", "question": "What does super() do (case 4)?", "steps": ["Parent link.", "Call method.", "Select option A."], "subject": "computer_science", "text": "Answer: Calls parent.\nSteps:\n1. Parent link.\n2. Call method.\n3. Select option A.\nAnswer: (A)", "topic": "oop"}
{"answer": "Moves = 31.", "choices": null, "id": "cs_0473", "kind": "worked_example", "lang": "en", "question": "Hanoi 5 disks (case 3). Moves?", "steps": ["2^5-1.", "=31.", "31."], "subject": "computer_science", "text": "Answer: 31.\nSteps:\n1. 2^5-1.\n2. =31.\n3. 31.", "topic": "algorithms"}
{"answer": "Graph search costs O(V+E) visiting nodes and edges once.", "choices": null, "id": "cs_0474", "kind": "concept", "lang": "en", "question": "What is Big-O of BFS and DFS?", "steps": ["Each node.", "Each edge.", "Linear total."], "subject": "computer_science", "text": "Answer: Nodes plus edges.\nSteps:\n1. Each node.\n2. Each edge.\n3. Linear total.", "topic": "complexity"}
{"answer": "Chaining stores colliding keys in per-slot lists.", "choices": null, "id": "cs_0475", "kind": "concept", "lang": "en", "question": "What is chaining?", "steps": ["Hash slot.", "List chain.", "Simple."], "subject": "computer_science", "text": "Answer: Bucket lists.\nSteps:\n1. Hash slot.\n2. List chain.\n3. Simple.", "topic": "data_structures"}
{"answer": "Pickling serializes objects to bytes with pickle.", "choices": null, "id": "cs_0476", "kind": "concept", "lang": "en", "question": "What is pickling?", "steps": ["Dump to bytes.", "Load back.", "Keeps structure."], "subject": "computer_science", "text": "Answer: Serialize objects.\nSteps:\n1. Dump to bytes.\n2. Load back.\n3. Keeps structure.", "topic": "python"}
{"answer": "A closure is a function remembering its outer scope variables.", "choices": null, "id": "cs_0477", "kind": "concept", "lang": "en", "question": "What is a closure?", "steps": ["Inner keeps outer.", "Even after return.", "State private."], "subject": "computer_science", "text": "Answer: Remembered scope.\nSteps:\n1. Inner keeps outer.\n2. Even after return.\n3. State private.", "topic": "javascript"}
{"answer": "SELECT returns 90.", "choices": null, "id": "cs_0478", "kind": "worked_example", "lang": "en", "question": "What does SELECT 9 * 10 return?", "steps": ["Multiply.", "9x10=90.", "90."], "subject": "computer_science", "text": "Answer: 90.\nSteps:\n1. Multiply.\n2. 9x10=90.\n3. 90.", "topic": "sql"}
{"answer": "DHCP přiděluje IP adresy automaticky.", "choices": null, "id": "cs_0479", "kind": "concept", "lang": "cs", "question": "Co je DHCP?", "steps": ["Objev.", "Nabídka.", "Obnova."], "subject": "computer_science", "text": "Answer: Auto adresy.\nSteps:\n1. Objev.\n2. Nabídka.\n3. Obnova.", "topic": "networking"}
{"answer": "Count = 11.", "choices": null, "id": "cs_0480", "kind": "worked_example", "lang": "en", "question": "INSERT 11 rows into empty (case 6). Count?", "steps": ["Start 0.", "Add 11.", "11."], "subject": "computer_science", "text": "Answer: 11.\nSteps:\n1. Start 0.\n2. Add 11.\n3. 11.", "topic": "databases"}
{"answer": "Výpadek je přístup na stránku mimo RAM.", "choices": null, "id": "cs_0481", "kind": "concept", "lang": "cs", "question": "Co je výpadek stránky?", "steps": ["Past kernelu.", "Načti.", "Pokračuj."], "subject": "computer_science", "text": "Answer: Chybějící stránka.\nSteps:\n1. Past kernelu.\n2. Načti.\n3. Pokračuj.", "topic": "operating_systems"}
{"answer": "Balance = 170.", "choices": null, "id": "cs_0482", "kind": "worked_example", "lang": "en", "question": "Balance 140, deposit(30) (case 4). Balance?", "steps": ["Start 140.", "Add 30.", "170."], "subject": "computer_science", "text": "Answer: 170.\nSteps:\n1. Start 140.\n2. Add 30.\n3. 170.", "topic": "oop"}
{"answer": "12 comparisons, not found.", "choices": null, "id": "cs_0483", "kind": "worked_example", "lang": "en", "question": "Linear search 17 in 1..12 (case 4). Comparisons?", "steps": ["Check 12.", "None match.", "12."], "subject": "computer_science", "text": "Answer: 12.\nSteps:\n1. Check 12.\n2. None match.\n3. 12.", "topic": "algorithms"}
{"answer": "Ptá se zda rychlé ověření znamená rychlé řešení.", "choices": null, "id": "cs_0484", "kind": "concept", "lang": "cs", "question": "Co je P vs NP?", "steps": ["P řeší.", "NP ověřuje.", "Otevřené."], "subject": "computer_science", "text": "Answer: Ověř vs řeš.\nSteps:\n1. P řeší.\n2. NP ověřuje.\n3. Otevřené.", "topic": "complexity"}
{"answer": "Red-black trees balance with color rules for O(log n).", "choices": null, "id": "cs_0485", "kind": "concept", "lang": "en", "question": "What is a red-black tree?", "steps": ["Red black.", "Rotate fix.", "Always log."], "subject": "computer_science", "text": "Answer: Color balanced.\nSteps:\n1. Red black.\n2. Rotate fix.\n3. Always log.", "topic": "data_structures"}
{"answer": "d['a'] is 5.", "choices": null, "id": "cs_0486", "kind": "worked_example", "lang": "en", "question": "If d={'a':5}, what is d['a']?", "steps": ["Key a.", "Value 5.", "Result 5."], "subject": "computer_science", "text": "Answer: 5.\nSteps:\n1. Key a.\n2. Value 5.\n3. Result 5.", "topic": "python"}
{"answer": "Result is 'hi6'.", "choices": null, "id": "cs_0487", "kind": "worked_example", "lang": "en", "question": "What does 'Hi6'.toLowerCase() give?", "steps": ["Lowercase.", "'hi6'.", "Result."], "subject": "computer_science", "text": "Answer: 'hi6'.\nSteps:\n1. Lowercase.\n2. 'hi6'.\n3. Result.", "topic": "javascript"}
{"answer": "SELECT returns 17.", "choices": null, "id": "cs_0488", "kind": "worked_example", "lang": "en", "question": "What does SELECT 34 / 2 return?", "steps": ["Divide.", "34/2=17.", "17."], "subject": "computer_science", "text": "Answer: 17.\nSteps:\n1. Divide.\n2. 34/2=17.\n3. 17.", "topic": "sql"}
{"answer": "DNS uses port 53.", "choices": {"A": "22", "B": "53", "C": "21", "D": "25"}, "id": "cs_0489", "kind": "multiple_choice", "lang": "en", "question": "Which port does DNS use? (set 5)", "steps": ["Standard port.", "DNS=53.", "Select option B."], "subject": "computer_science", "text": "Answer: 53.\nSteps:\n1. Standard port.\n2. DNS=53.\n3. Select option B.\nAnswer: (B)", "topic": "networking"}
{"answer": "A is Atomicity.", "choices": {"A": "Consistency", "B": "Isolation", "C": "Durability", "D": "Atomicity"}, "id": "cs_0490", "kind": "multiple_choice", "lang": "en", "question": "What is A in ACID (case 3)?", "steps": ["ACID set.", "A first.", "Select option D."], "subject": "computer_science", "text": "Answer: Atomicity.\nSteps:\n1. ACID set.\n2. A first.\n3. Select option D.\nAnswer: (D)", "topic": "databases"}
{"answer": "Roura spojuje výstup a vstup procesů.", "choices": null, "id": "cs_0491", "kind": "concept", "lang": "cs", "question": "Co je roura (pipe)?", "steps": ["Zápis.", "Čtení.", "Buffer."], "subject": "computer_science", "text": "Answer: Spojený tok.\nSteps:\n1. Zápis.\n2. Čtení.\n3. Buffer.", "topic": "operating_systems"}
{"answer": "Overriding redefines a parent method in a child class.", "choices": null, "id": "cs_0492", "kind": "concept", "lang": "en", "question": "What is method overriding?", "steps": ["Same name.", "Child wins.", "Extends or replaces."], "subject": "computer_science", "text": "Answer: Redefine method.\nSteps:\n1. Same name.\n2. Child wins.\n3. Extends or replaces.", "topic": "oop"}
{"answer": "5-disk needs 31 moves.", "choices": {"A": "31", "B": "15", "C": "63", "D": "25"}, "id": "cs_0493", "kind": "multiple_choice", "lang": "cs", "question": "Kolik tahů pro Hanoi s 5 disky?", "steps": ["2^5-1.", "32-1=31.", "Select option A."], "subject": "computer_science", "text": "Answer: 31.\nSteps:\n1. 2^5-1.\n2. 32-1=31.\n3. Select option A.\nAnswer: (A)", "topic": "algorithms"}
{"answer": "Steps = 6.", "choices": {"A": "5", "B": "7", "C": "6", "D": "64"}, "id": "cs_0494", "kind": "multiple_choice", "lang": "cs", "question": "Binární kroky pro n = 64?", "steps": ["log2=6.", "Halve.", "Select option C."], "subject": "computer_science", "text": "Answer: 6.\nSteps:\n1. log2=6.\n2. Halve.\n3. Select option C.\nAnswer: (C)", "topic": "complexity"}
{"answer": "Order 24,14.", "choices": null, "id": "cs_0495", "kind": "worked_example", "lang": "en", "question": "Push 14,24 then pop twice (case 4). Order?", "steps": ["Top 24.", "Then 14.", "24,14."], "subject": "computer_science", "text": "Answer: 24,14.\nSteps:\n1. Top 24.\n2. Then 14.\n3. 24,14.", "topic": "data_structures"}
{"answer": "sum(range(5)) is 10.", "choices": null, "id": "cs_0496", "kind": "worked_example", "lang": "en", "question": "What does sum(range(5)) return?", "steps": ["0 to 4.", "Sum=10.", "Result 10."], "subject": "computer_science", "text": "Answer: 10.\nSteps:\n1. 0 to 4.\n2. Sum=10.\n3. Result 10.", "topic": "python"}
{"answer": "Repeat gives 'ababab'.", "choices": null, "id": "cs_0497", "kind": "worked_example", "lang": "en", "question": "What does 'ab'.repeat(3) give?", "steps": ["Repeat.", "3x.", "'ababab'."], "subject": "computer_science", "text": "Answer: 'ababab'.\nSteps:\n1. Repeat.\n2. 3x.\n3. 'ababab'.", "topic": "javascript"}
{"answer": "Result is 0.", "choices": null, "id": "cs_0498", "kind": "worked_example", "lang": "en", "question": "Compute SELECT 18 % 3.", "steps": ["Modulo.", "18%3=0.", "0."], "subject": "computer_science", "text": "Answer: 0.\nSteps:\n1. Modulo.\n2. 18%3=0.\n3. 0.", "topic": "sql"}
{"answer": "NAT maps private addresses to one public address.", "choices": null, "id": "cs_0499", "kind": "concept", "lang": "en", "question": "What is NAT?", "steps": ["Many private.", "One public.", "Tracks ports."], "subject": "computer_science", "text": "Answer: Address mapping.\nSteps:\n1. Many private.\n2. One public.\n3. Tracks ports.", "topic": "networking"}
{"answer": "PRIMARY KEY ensures unique rows.", "choices": {"A": "PRIMARY KEY", "B": "FOREIGN KEY", "C": "INDEX", "D": "VIEW"}, "id": "cs_0500", "kind": "multiple_choice", "lang": "en", "question": "Which ensures unique rows (case 4)?", "steps": ["Unique id.", "One per table.", "Select option A."], "subject": "computer_science", "text": "Answer: PRIMARY KEY.\nSteps:\n1. Unique id.\n2. One per table.\n3. Select option A.\nAnswer: (A)", "topic": "databases"}
{"answer": "Cycle = 60 ms.", "choices": null, "id": "cs_0501", "kind": "worked_example", "lang": "en", "question": "Quantum 15 ms, 4 procs (case 2). Cycle?", "steps": ["15x4.", "=60.", "60 ms."], "subject": "computer_science", "text": "Answer: 60.\nSteps:\n1. 15x4.\n2. =60.\n3. 60 ms.", "topic": "operating_systems"}
{"answer": "Kompozice skládá objekt z částí.", "choices": null, "id": "cs_0502", "kind": "concept", "lang": "cs", "question": "Co je kompozice?", "steps": ["Má části.", "Volnější.", "Oproti dědění."], "subject": "computer_science", "text": "Answer: Skládání.\nSteps:\n1. Má části.\n2. Volnější.\n3. Oproti dědění.", "topic": "oop"}
{"answer": "DP řeší podproblémy jednou a znovu je používá.", "choices": null, "id": "cs_0503", "kind": "concept", "lang": "cs", "question": "Co je dynamické programování?", "steps": ["Tabulka.", "Zdola nahoru.", "Optimální části."], "subject": "computer_science", "text": "Answer: Znovu pododpovědi.\nSteps:\n1. Tabulka.\n2. Zdola nahoru.\n3. Optimální části.", "topic": "algorithms"}
{"answer": "About 11.", "choices": null, "id": "cs_0504", "kind": "worked_example", "lang": "en", "question": "Binary steps n=2000 (case 6). About?", "steps": ["log2.", "~11.", "11."], "subject": "computer_science", "text": "Answer: 11.\nSteps:\n1. log2.\n2. ~11.\n3. 11.", "topic": "complexity"}
{"answer": "Both directions.", "choices": {"A": "Forward only", "B": "Random only", "C": "Both directions", "D": "No traversal"}, "id": "cs_0505", "kind": "multiple_choice", "lang": "cs", "question": "Jak chodí obousměrný seznam (případ 2)?", "steps": ["Two links.", "Both ways.", "Select option C."], "subject": "computer_science", "text": "Answer: Both directions.\nSteps:\n1. Two links.\n2. Both ways.\n3. Select option C.\nAnswer: (C)", "topic": "data_structures"}
{"answer": "max is 10.", "choices": null, "id": "cs_0506", "kind": "worked_example", "lang": "en", "question": "What does max([7,10,8]) return?", "steps": ["Compare three.", "Largest 10.", "Result 10."], "subject": "computer_science", "text": "Answer: 10.\nSteps:\n1. Compare three.\n2. Largest 10.\n3. Result 10.", "topic": "python"}
{"answer": "Boolean([]) is true.", "choices": {"A": "true", "B": "false", "C": "0", "D": "1"}, "id": "cs_0507", "kind": "multiple_choice", "lang": "en", "question": "What does Boolean([]) give?", "steps": ["Check falsy.", "Result true.", "Select option A."], "subject": "computer_science", "text": "Answer: true.\nSteps:\n1. Check falsy.\n2. Result true.\n3. Select option A.\nAnswer: (A)", "topic": "javascript"}
{"answer": "LENGTH is 6.", "choices": null, "id": "cs_0508", "kind": "worked_example", "lang": "en", "question": "Compute SELECT LENGTH('hello9').", "steps": ["Count chars.", "'hello9'.", "6."], "subject": "computer_science", "text": "Answer: 6.\nSteps:\n1. Count chars.\n2. 'hello9'.\n3. 6.", "topic": "sql"}
{"answer": "10.6.0.1 je privátní.", "choices": {"A": "8.8.6.1", "B": "1.1.6.1", "C": "10.6.0.1", "D": "203.0.6.1"}, "id": "cs_0509", "kind": "multiple_choice", "lang": "cs", "question": "Která IP je privátní (sada 6)?", "steps": ["Private ranges.", "10.6.0.1 fits.", "Select option C."], "subject": "computer_science", "text": "Answer: 10.6.0.1.\nSteps:\n1. Privátní rozsahy.\n2. 10.6.0.1 vyhovuje.\n3. Select option C.\nAnswer: (C)", "topic": "networking"}
{"answer": "Returned = 3.", "choices": null, "id": "cs_0510", "kind": "worked_example", "lang": "en", "question": "17 rows, WHERE matches 3 (case 7). Returned?", "steps": ["Total 17.", "Match 3.", "3."], "subject": "computer_science", "text": "Answer: 3.\nSteps:\n1. Total 17.\n2. Match 3.\n3. 3.", "topic": "databases"}
{"answer": "Mutex ensures one.", "choices": {"A": "Queue", "B": "Array", "C": "Mutex", "D": "File"}, "id": "cs_0511", "kind": "multiple_choice", "lang": "en", "question": "What ensures one access (case 6)?", "steps": ["Lock it.", "One holder.", "Select option C."], "subject": "computer_science", "text": "Answer: Mutex.\nSteps:\n1. Lock it.\n2. One holder.\n3. Select option C.\nAnswer: (C)", "topic": "operating_systems"}
{"answer": "Area = 32.", "choices": null, "id": "cs_0512", "kind": "worked_example", "lang": "en", "question": "Rectangle 8 by 4 (case 5). Area?", "steps": ["8x4.", "=32.", "32."], "subject": "computer_science", "text": "Answer: 32.\nSteps:\n1. 8x4.\n2. =32.\n3. 32.", "topic": "oop"}
{"answer": "factorial(10) is 3628800.", "choices": {"A": "362880", "B": "3628800", "C": "3628900", "D": "100"}, "id": "cs_0513", "kind": "multiple_choice", "lang": "en", "question": "What is factorial(10)?", "steps": ["Multiply down.", "Result 3628800.", "Select option B."], "subject": "computer_science", "text": "Answer: 3628800.\nSteps:\n1. Multiply down.\n2. Result 3628800.\n3. Select option B.\nAnswer: (B)", "topic": "algorithms"}
{"answer": "O(2^n) fastest.", "choices": {"A": "O(n)", "B": "O(n log n)", "C": "O(n^2)", "D": "O(2^n)"}, "id": "cs_0514", "kind": "multiple_choice", "lang": "en", "question": "Which grows fastest (case 3)?", "steps": ["Exponential.", "Beats poly.", "Select option D."], "subject": "computer_science", "text": "Answer: O(2^n).\nSteps:\n1. Exponential.\n2. Beats poly.\n3. Select option D.\nAnswer: (D)", "topic": "complexity"}
{"answer": "Heap backs it.", "choices": {"A": "Stack", "B": "Queue", "C": "Array", "D": "Heap"}, "id": "cs_0515", "kind": "multiple_choice", "lang": "en", "question": "What backs priority queue (case 3)?", "steps": ["Need min.", "Heap gives.", "Select option D."], "subject": "computer_science", "text": "Answer: Heap.\nSteps:\n1. Need min.\n2. Heap gives.\n3. Select option D.\nAnswer: (D)", "topic": "data_structures"}
{"answer": "Výjimka signalizuje chybu a řeší se try/except.", "choices": null, "id": "cs_0516", "kind": "concept", "lang": "cs", "question": "Co je výjimka?", "steps": ["Vznikne chyba.", "Zachytí except.", "Finally uklidí."], "subject": "computer_science", "text": "Answer: Signál chyby.\nSteps:\n1. Vznikne chyba.\n2. Zachytí except.\n3. Finally uklidí.", "topic": "python"}
{"answer": "Destructuring unpacks arrays or objects into variables.", "choices": null, "id": "cs_0517", "kind": "concept", "lang": "en", "question": "What is destructuring?", "steps": ["const [a]=arr.", "const {x}=obj.", "Short code."], "subject": "computer_science", "text": "Answer: Unpack values.\nSteps:\n1. const [a]=arr.\n2. const {x}=obj.\n3. Short code.", "topic": "javascript"}
{"answer": "Agregace spojí řádky v jednu hodnotu.", "choices": null, "id": "cs_0518", "kind": "concept", "lang": "cs", "question": "Co je agregace?", "steps": ["COUNT SUM AVG.", "Mnoho na jednu.", "S GROUP."], "subject": "computer_science", "text": "Answer: Spojení řádků.\nSteps:\n1. COUNT SUM AVG.\n2. Mnoho na jednu.\n3. S GROUP.", "topic": "sql"}
{"answer": "Mask is 255.255.192.0.", "choices": null, "id": "cs_0519", "kind": "worked_example", "lang": "en", "question": "What is mask for /18 (case 4)?", "steps": ["Prefix 18.", "Bits.", "255.255.192.0."], "subject": "computer_science", "text": "Answer: 255.255.192.0.\nSteps:\n1. Prefix 18.\n2. Bits.\n3. 255.255.192.0.", "topic": "networking"}
{"answer": "Optimistic locking checks versions at commit instead of locking.", "choices": null, "id": "cs_0520", "kind": "concept", "lang": "en", "question": "What is optimistic locking?", "steps": ["Read version.", "Write if same.", "Retry else."], "subject": "computer_science", "text": "Answer: Version check.\nSteps:\n1. Read version.\n2. Write if same.\n3. Retry else.", "topic": "databases"}
{"answer": "A page fault occurs when accessed page is not in RAM.", "choices": null, "id": "cs_0521", "kind": "concept", "lang": "en", "question": "What is a page fault?", "steps": ["Trap kernel.", "Load page.", "Resume."], "subject": "computer_science", "text": "Answer: Missing page.\nSteps:\n1. Trap kernel.\n2. Load page.\n3. Resume.", "topic": "operating_systems"}
{"answer": "Value = 12.", "choices": null, "id": "cs_0522", "kind": "worked_example", "lang": "en", "question": "Counter 11, inc() (case 6). Value?", "steps": ["Start 11.", "Plus 1.", "12."], "subject": "computer_science", "text": "Answer: 12.\nSteps:\n1. Start 11.\n2. Plus 1.\n3. 12.", "topic": "oop"}
{"answer": "A heuristic is a practical rule trading optimality for speed.", "choices": null, "id": "cs_0523", "kind": "concept", "lang": "en", "question": "What is a heuristic?", "steps": ["Good enough.", "No guarantee.", "Guides search."], "subject": "computer_science", "text": "Answer: Fast rule.\nSteps:\n1. Good enough.\n2. No guarantee.\n3. Guides search.", "topic": "algorithms"}
{"answer": "Heap insert and pop cost O(log n) by tree height.", "choices": null, "id": "cs_0524", "kind": "concept", "lang": "en", "question": "What is Big-O of heap operations?", "steps": ["Bubble path.", "Height log.", "Root fast."], "subject": "computer_science", "text": "Answer: Log height.\nSteps:\n1. Bubble path.\n2. Height log.\n3. Root fast.", "topic": "complexity"}
{"answer": "Load = 0.64.", "choices": {"A": "0.64", "B": "0.74", "C": "0.54", "D": "0.89"}, "id": "cs_0525", "kind": "multiple_choice", "lang": "en", "question": "Load factor for 9 items in 14 slots?", "steps": ["9/14.", "=0.64.", "Select option A."], "subject": "computer_science", "text": "Answer: 0.64.\nSteps:\n1. 9/14.\n2. =0.64.\n3. Select option A.\nAnswer: (A)", "topic": "data_structures"}
{"answer": "114%5 is 4.", "choices": {"A": "4", "B": "0", "C": "1", "D": "5"}, "id": "cs_0526", "kind": "multiple_choice", "lang": "en", "question": "What does 114 % 5 give in Python?", "steps": ["Remainder.", "114%5=4.", "Select option A."], "subject": "computer_science", "text": "Answer: 4.\nSteps:\n1. Remainder.\n2. 114%5=4.\n3. Select option A.\nAnswer: (A)", "topic": "python"}
{"answer": "Math.max is 7.", "choices": {"A": "5", "B": "7", "C": "6", "D": "8"}, "id": "cs_0527", "kind": "multiple_choice", "lang": "en", "question": "What does Math.max(5,6,7) give?", "steps": ["Compare three.", "Largest 7.", "Select option B."], "subject": "computer_science", "text": "Answer: 7.\nSteps:\n1. Compare three.\n2. Largest 7.\n3. Select option B.\nAnswer: (B)", "topic": "javascript"}
{"answer": "MIN is 15.", "choices": null, "id": "cs_0528", "kind": "worked_example", "lang": "en", "question": "Compute SELECT MIN of (15,18).", "steps": ["Compare.", "Smallest 15.", "15."], "subject": "computer_science", "text": "Answer: 15.\nSteps:\n1. Compare.\n2. Smallest 15.\n3. 15.", "topic": "sql"}
{"answer": "UDP je bez spojení.", "choices": {"A": "TCP", "B": "HTTP", "C": "IP", "D": "UDP"}, "id": "cs_0529", "kind": "multiple_choice", "lang": "cs", "question": "Co je bez spojení (případ 7)?", "steps": ["No handshake.", "UDP fits.", "Select option D."], "subject": "computer_science", "text": "Answer: UDP.\nSteps:\n1. Žádný handshake.\n2. UDP vyhovuje.\n3. Select option D.\nAnswer: (D)", "topic": "networking"}
{"answer": "B-tree indexes keep sorted keys for fast range search.", "choices": null, "id": "cs_0530", "kind": "concept", "lang": "en", "question": "What is a B-tree index?", "steps": ["Balanced tree.", "Log search.", "Range easy."], "subject": "computer_science", "text": "Answer: Sorted index.\nSteps:\n1. Balanced tree.\n2. Log search.\n3. Range easy.", "topic": "databases"}
{"answer": "Virtual = 12 GB.", "choices": null, "id": "cs_0531", "kind": "worked_example", "lang": "en", "question": "RAM 7 GB + swap 5 GB (case 3). Virtual?", "steps": ["7+5.", "=12.", "12 GB."], "subject": "computer_science", "text": "Answer: 12.\nSteps:\n1. 7+5.\n2. =12.\n3. 12 GB.", "topic": "operating_systems"}
{"answer": "__init__ constructs.", "choices": {"A": "__len__", "B": "__init__", "C": "__add__", "D": "__str__"}, "id": "cs_0532", "kind": "multiple_choice", "lang": "en", "question": "Which is constructor (case 5)?", "steps": ["Init runs.", "Sets fields.", "Select option B."], "subject": "computer_science", "text": "Answer: __init__.\nSteps:\n1. Init runs.\n2. Sets fields.\n3. Select option B.\nAnswer: (B)", "topic": "oop"}
{"answer": "Sorted = [6, 7, 8].", "choices": null, "id": "cs_0533", "kind": "worked_example", "lang": "en", "question": "Selection-sort [8, 6, 7] (case 5). Result?", "steps": ["Min 6.", "Swap.", "[6, 7, 8]."], "subject": "computer_science", "text": "Answer: [6, 7, 8].\nSteps:\n1. Min 6.\n2. Swap.\n3. [6, 7, 8].", "topic": "algorithms"}
{"answer": "400 vs 160000.", "choices": null, "id": "cs_0534", "kind": "worked_example", "lang": "en", "question": "O(n) vs O(n^2) n=400 (case 7). Steps?", "steps": ["O(n)=400.", "O(n^2)=160000.", "Done."], "subject": "computer_science", "text": "Answer: 400 vs 160000.\nSteps:\n1. O(n)=400.\n2. O(n^2)=160000.\n3. Done.", "topic": "complexity"}
{"answer": "Trie ukládá řetězce podle prefixů.", "choices": null, "id": "cs_0535", "kind": "concept", "lang": "cs", "question": "Co je trie?", "steps": ["Znakové uzly.", "Sdílí začátek.", "Konec slova."], "subject": "computer_science", "text": "Answer: Prefixový strom.\nSteps:\n1. Znakové uzly.\n2. Sdílí začátek.\n3. Konec slova.", "topic": "data_structures"}
{"answer": "A metaclass is the class of a class controlling creation.", "choices": null, "id": "cs_0536", "kind": "concept", "lang": "en", "question": "What is a metaclass?", "steps": ["Type default.", "Custom creation.", "Rare use."], "subject": "computer_science", "text": "Answer: Class of class.\nSteps:\n1. Type default.\n2. Custom creation.\n3. Rare use.", "topic": "python"}
{"answer": "Spread ... expands iterables into elements or args.", "choices": null, "id": "cs_0537", "kind": "concept", "lang": "en", "question": "What is spread syntax?", "steps": ["[...a,1].", "Call f(...a).", "Copy arrays."], "subject": "computer_science", "text": "Answer: Expand items.\nSteps:\n1. [...a,1].\n2. Call f(...a).\n3. Copy arrays.", "topic": "javascript"}
{"answer": "SELECT 9+11 returns 20.", "choices": {"A": "20", "B": "19", "C": "21", "D": "22"}, "id": "cs_0538", "kind": "multiple_choice", "lang": "cs", "question": "Kterou hodnotu vrátí SELECT 9 + 11?", "steps": ["Add.", "9+11=20.", "Select option A."], "subject": "computer_science", "text": "Answer: 20.\nSteps:\n1. Add.\n2. 9+11=20.\n3. Select option A.\nAnswer: (A)", "topic": "sql"}
{"answer": "DHCP assigns IP addresses automatically to hosts.", "choices": null, "id": "cs_0539", "kind": "concept", "lang": "en", "question": "What is DHCP?", "steps": ["Discover.", "Offer address.", "Lease renews."], "subject": "computer_science", "text": "Answer: Auto addresses.\nSteps:\n1. Discover.\n2. Offer address.\n3. Lease renews.", "topic": "networking"}
{"answer": "Eventual consistency promises replicas converge over time.", "choices": null, "id": "cs_0540", "kind": "concept", "lang": "en", "question": "What is eventual consistency?", "steps": ["Write anywhere.", "Sync async.", "Brief stale."], "subject": "computer_science", "text": "Answer: Converge later.\nSteps:\n1. Write anywhere.\n2. Sync async.\n3. Brief stale.", "topic": "databases"}
{"answer": "CPUs = 12.", "choices": null, "id": "cs_0541", "kind": "worked_example", "lang": "en", "question": "6 cores, 2 threads each (case 4). Logical CPUs?", "steps": ["6x2.", "=12.", "12."], "subject": "computer_science", "text": "Answer: 12.\nSteps:\n1. 6x2.\n2. =12.\n3. 12.", "topic": "operating_systems"}
{"answer": "B().x = 9.", "choices": null, "id": "cs_0542", "kind": "worked_example", "lang": "en", "question": "Class A x=9, B(A) (case 7). B().x?", "steps": ["A sets.", "B inherits.", "9."], "subject": "computer_science", "text": "Answer: 9.\nSteps:\n1. A sets.\n2. B inherits.\n3. 9.", "topic": "oop"}
{"answer": "factorial(6) = 720.", "choices": null, "id": "cs_0543", "kind": "worked_example", "lang": "en", "question": "Compute factorial(6) (case 6).", "steps": ["Expand.", "Product.", "720."], "subject": "computer_science", "text": "Answer: 720.\nSteps:\n1. Expand.\n2. Product.\n3. 720.", "topic": "algorithms"}
{"answer": "5 items give 32 subsets.", "choices": {"A": "32", "B": "25", "C": "16", "D": "64"}, "id": "cs_0544", "kind": "multiple_choice", "lang": "en", "question": "How many subsets for 5 items?", "steps": ["2^5.", "=32.", "Select option A."], "subject": "computer_science", "text": "Answer: 32.\nSteps:\n1. 2^5.\n2. =32.\n3. Select option A.\nAnswer: (A)", "topic": "complexity"}
{"answer": "Load = 0.9.", "choices": null, "id": "cs_0545", "kind": "worked_example", "lang": "en", "question": "18 items in 20 slots (case 5). Load?", "steps": ["18/20.", "=0.9.", "0.9."], "subject": "computer_science", "text": "Answer: 0.9.\nSteps:\n1. 18/20.\n2. =0.9.\n3. 0.9.", "topic": "data_structures"}
{"answer": "x becomes [1, 2, 18].", "choices": null, "id": "cs_0546", "kind": "worked_example", "lang": "en", "question": "x=[1,2]; x.append(18). What is x?", "steps": ["Start [1,2].", "Append 18.", "x=[1, 2, 18]."], "subject": "computer_science", "text": "Answer: [1, 2, 18].\nSteps:\n1. Start [1,2].\n2. Append 18.\n3. x=[1, 2, 18].", "topic": "python"}
{"answer": "Async/await writes promises as sequential code with pauses.", "choices": null, "id": "cs_0547", "kind": "concept", "lang": "en", "question": "What is async/await?", "steps": ["Async returns promise.", "Await pauses.", "Try/catch works."], "subject": "computer_science", "text": "Answer: Sequential async.\nSteps:\n1. Async returns promise.\n2. Await pauses.\n3. Try/catch works.", "topic": "javascript"}
{"answer": "Sum is 120.", "choices": null, "id": "cs_0548", "kind": "worked_example", "lang": "en", "question": "Sum 1..15 via SELECT. What value?", "steps": ["n=15.", "n(n+1)/2.", "120."], "subject": "computer_science", "text": "Answer: 120.\nSteps:\n1. n=15.\n2. n(n+1)/2.\n3. 120.", "topic": "sql"}
{"answer": "/13 has 524286 usable.", "choices": null, "id": "cs_0549", "kind": "worked_example", "lang": "en", "question": "How many usable hosts in /13 (case 5)?", "steps": ["Host bits 19.", "2^19=524288.", "Usable 524286."], "subject": "computer_science", "text": "Answer: 524286.\nSteps:\n1. Host bits 19.\n2. 2^19=524288.\n3. Usable 524286.", "topic": "networking"}
{"answer": "Remain = 14.", "choices": null, "id": "cs_0550", "kind": "worked_example", "lang": "en", "question": "Table has 18 rows, DELETE removes 4 (case 8). Remain?", "steps": ["Start 18.", "Minus 4.", "14."], "subject": "computer_science", "text": "Answer: 14.\nSteps:\n1. Start 18.\n2. Minus 4.\n3. 14.", "topic": "databases"}
{"answer": "Faults = 5.", "choices": null, "id": "cs_0551", "kind": "worked_example", "lang": "en", "question": "5 frames empty, refs 1..5 (case 5). Faults?", "steps": ["All miss.", "Count 5.", "5."], "subject": "computer_science", "text": "Answer: 5.\nSteps:\n1. All miss.\n2. Count 5.\n3. 5.", "topic": "operating_systems"}
{"answer": "Balance = 230.", "choices": null, "id": "cs_0552", "kind": "worked_example", "lang": "en", "question": "Balance 180, deposit(50) (case 8). Balance?", "steps": ["Start 180.", "Add 50.", "230."], "subject": "computer_science", "text": "Answer: 230.\nSteps:\n1. Start 180.\n2. Add 50.\n3. 230.", "topic": "oop"}
{"answer": "Backtracking zkouší a vrací neúspěšné cesty.", "choices": null, "id": "cs_0553", "kind": "concept", "lang": "cs", "question": "Co je backtracking?", "steps": ["Krok.", "Rekurze.", "Zpět při failu."], "subject": "computer_science", "text": "Answer: Zkus a vrať.\nSteps:\n1. Krok.\n2. Rekurze.\n3. Zpět při failu.", "topic": "algorithms"}
{"answer": "Iterations = 343.", "choices": {"A": "49", "B": "343", "C": "98", "D": "56"}, "id": "cs_0554", "kind": "multiple_choice", "lang": "cs", "question": "Trojnásobné smyčky n = 7. Kolik iterací?", "steps": ["7^3.", "=343.", "Select option B."], "subject": "computer_science", "text": "Answer: 343.\nSteps:\n1. 7^3.\n2. =343.\n3. Select option B.\nAnswer: (B)", "topic": "complexity"}
{"answer": "Edges = 28.", "choices": null, "id": "cs_0555", "kind": "worked_example", "lang": "en", "question": "Edges in K8 (case 6). Count?", "steps": ["n(n-1)/2.", "=28.", "28."], "subject": "computer_science", "text": "Answer: 28.\nSteps:\n1. n(n-1)/2.\n2. =28.\n3. 28.", "topic": "data_structures"}
{"answer": "Monkey patching changes code at runtime by rebinding names.", "choices": null, "id": "cs_0556", "kind": "concept", "lang": "en", "question": "What is monkey patching?", "steps": ["Rebind attr.", "Affects later calls.", "Use sparingly."], "subject": "computer_science", "text": "Answer: Runtime change.\nSteps:\n1. Rebind attr.\n2. Affects later calls.\n3. Use sparingly.", "topic": "python"}
{"answer": "NaN means not-a-number from invalid numeric results.", "choices": null, "id": "cs_0557", "kind": "concept", "lang": "en", "question": "What is NaN?", "steps": ["0/0 gives.", "NaN != NaN.", "Check isNaN."], "subject": "computer_science", "text": "Answer: Invalid number.\nSteps:\n1. 0/0 gives.\n2. NaN != NaN.\n3. Check isNaN.", "topic": "javascript"}
{"answer": "A subquery is a SELECT nested inside another query.", "choices": null, "id": "cs_0558", "kind": "concept", "lang": "en", "question": "What is a subquery?", "steps": ["Inner runs.", "Outer uses.", "In WHERE or FROM."], "subject": "computer_science", "text": "Answer: Nested SELECT.\nSteps:\n1. Inner runs.\n2. Outer uses.\n3. In WHERE or FROM.", "topic": "sql"}
{"answer": "ARP maps IP to MAC.", "choices": {"A": "IP to MAC", "B": "IP to port", "C": "MAC to IP", "D": "Port to MAC"}, "id": "cs_0559", "kind": "multiple_choice", "lang": "en", "question": "What does ARP map (case 8)?", "steps": ["LAN lookup.", "IP to MAC.", "Select option A."], "subject": "computer_science", "text": "Answer: IP to MAC.\nSteps:\n1. LAN lookup.\n2. IP to MAC.\n3. Select option A.\nAnswer: (A)", "topic": "networking"}
{"answer": "INSERT adds rows.", "choices": {"A": "SELECT", "B": "INSERT", "C": "DELETE", "D": "UPDATE"}, "id": "cs_0560", "kind": "multiple_choice", "lang": "cs", "question": "Co přidává řádky (případ 5)?", "steps": ["Write op.", "INSERT fits.", "Select option B."], "subject": "computer_science", "text": "Answer: INSERT.\nSteps:\n1. Write op.\n2. INSERT fits.\n3. Select option B.\nAnswer: (B)", "topic": "databases"}
{"answer": "Kernel manages.", "choices": {"A": "Shell", "B": "App", "C": "Driver", "D": "Kernel"}, "id": "cs_0561", "kind": "multiple_choice", "lang": "en", "question": "What manages resources (case 7)?", "steps": ["Core role.", "CPU mem.", "Select option D."], "subject": "computer_science", "text": "Answer: Kernel.\nSteps:\n1. Core role.\n2. CPU mem.\n3. Select option D.\nAnswer: (D)", "topic": "operating_systems"}
{"answer": "Area = 48.", "choices": null, "id": "cs_0562", "kind": "worked_example", "lang": "en", "question": "Rectangle 6 by 8 (case 9). Area?", "steps": ["6x8.", "=48.", "48."], "subject": "computer_science", "text": "Answer: 48.\nSteps:\n1. 6x8.\n2. =48.\n3. 48.", "topic": "oop"}
{"answer": "Moves = 31.", "choices": null, "id": "cs_0563", "kind": "worked_example", "lang": "en", "question": "Hanoi 5 disks (case 7). Moves?", "steps": ["2^5-1.", "=31.", "31."], "subject": "computer_science", "text": "Answer: 31.\nSteps:\n1. 2^5-1.\n2. =31.\n3. 31.", "topic": "algorithms"}
{"answer": "Steps = 10.", "choices": {"A": "9", "B": "11", "C": "10", "D": "1024"}, "id": "cs_0564", "kind": "multiple_choice", "lang": "en", "question": "Binary steps for n = 1024?", "steps": ["log2=10.", "Halve.", "Select option C."], "subject": "computer_science", "text": "Answer: 10.\nSteps:\n1. log2=10.\n2. Halve.\n3. Select option C.\nAnswer: (C)", "topic": "complexity"}
{"answer": "Returns 12.", "choices": null, "id": "cs_0565", "kind": "worked_example", "lang": "en", "question": "Enqueue 12,13 then dequeue (case 7). Returns?", "steps": ["Front 12.", "FIFO.", "12."], "subject": "computer_science", "text": "Answer: 12.\nSteps:\n1. Front 12.\n2. FIFO.\n3. 12.", "topic": "data_structures"}
{"answer": "sorted([7, 5, 10]) is [5, 7, 10].", "choices": {"A": "[10, 7, 5]", "B": "[5, 7, 10]", "C": "[7, 5, 10]", "D": "[5, 10, 7]"}, "id": "cs_0566", "kind": "multiple_choice", "lang": "en", "question": "What does sorted([7, 5, 10]) give?", "steps": ["Sort ascending.", "Result [5, 7, 10].", "Select option B."], "subject": "computer_science", "text": "Answer: [5, 7, 10].\nSteps:\n1. Sort ascending.\n2. Result [5, 7, 10].\n3. Select option B.\nAnswer: (B)", "topic": "python"}
{"answer": "[6,7].length je 2.", "choices": {"A": "1", "B": "3", "C": "2", "D": "0"}, "id": "cs_0567", "kind": "multiple_choice", "lang": "cs", "question": "Co vrátí [6,7].length?", "steps": ["Two items.", "Length 2.", "Select option C."], "subject": "computer_science", "text": "Answer: 2.\nSteps:\n1. Dva prvky.\n2. Délka je 2.\n3. Select option C.\nAnswer: (C)", "topic": "javascript"}
{"answer": "SELECT returns 240.", "choices": null, "id": "cs_0568", "kind": "worked_example", "lang": "en", "question": "What does SELECT 15 * 16 return?", "steps": ["Multiply.", "15x16=240.", "240."], "subject": "computer_science", "text": "Answer: 240.\nSteps:\n1. Multiply.\n2. 15x16=240.\n3. 240.", "topic": "sql"}
{"answer": "Subnets = 4.", "choices": null, "id": "cs_0569", "kind": "worked_example", "lang": "en", "question": "Split /20 into /22 (case 6). How many subnets?", "steps": ["Bits 2.", "2^2=4.", "4."], "subject": "computer_science", "text": "Answer: 4.\nSteps:\n1. Bits 2.\n2. 2^2=4.\n3. 4.", "topic": "networking"}
{"answer": "Index speeds reads.", "choices": {"A": "Deletes data", "B": "Drops table", "C": "Speeds reads", "D": "Stops DB"}, "id": "cs_0570", "kind": "multiple_choice", "lang": "en", "question": "What is an index for (case 6)?", "steps": ["Lookup aid.", "Faster.", "Select option C."], "subject": "computer_science", "text": "Answer: Speeds reads.\nSteps:\n1. Lookup aid.\n2. Faster.\n3. Select option C.\nAnswer: (C)", "topic": "databases"}
{"answer": "Demand paging loads pages only when first accessed.", "choices": null, "id": "cs_0571", "kind": "concept", "lang": "en", "question": "What is demand paging?", "steps": ["Start empty.", "Fault loads.", "Less I/O."], "subject": "computer_science", "text": "Answer: Lazy load.\nSteps:\n1. Start empty.\n2. Fault loads.\n3. Less I/O.", "topic": "operating_systems"}
{"answer": "Abstraktní třída nelze vytvořit a žádá metody.", "choices": null, "id": "cs_0572", "kind": "concept", "lang": "cs", "question": "Co je abstraktní třída?", "steps": ["Nelze make.", "Potomek doplní.", "Vynucuje API."], "subject": "computer_science", "text": "Answer: Nedokončená.\nSteps:\n1. Nelze make.\n2. Potomek doplní.\n3. Vynucuje API.", "topic": "oop"}
{"answer": "A* picks paths by cost plus estimated remaining distance.", "choices": null, "id": "cs_0573", "kind": "concept", "lang": "en", "question": "What is A* search?", "steps": ["g cost so far.", "h estimate.", "Best first."], "subject": "computer_science", "text": "Answer: Cost plus guess.\nSteps:\n1. g cost so far.\n2. h estimate.\n3. Best first.", "topic": "algorithms"}
{"answer": "O(2^n) fastest.", "choices": {"A": "O(n)", "B": "O(n log n)", "C": "O(n^2)", "D": "O(2^n)"}, "id": "cs_0574", "kind": "multiple_choice", "lang": "cs", "question": "Co roste nejrychleji (případ 7)?", "steps": ["Exponential.", "Beats poly.", "Select option D."], "subject": "computer_science", "text": "Answer: O(2^n).\nSteps:\n1. Exponential.\n2. Beats poly.\n3. Select option D.\nAnswer: (D)", "topic": "complexity"}
{"answer": "K8 has 28 edges.", "choices": {"A": "27", "B": "28", "C": "29", "D": "64"}, "id": "cs_0575", "kind": "multiple_choice", "lang": "en", "question": "How many edges in K8?", "steps": ["n(n-1)/2.", "=28.", "Select option B."], "subject": "computer_science", "text": "Answer: 28.\nSteps:\n1. n(n-1)/2.\n2. =28.\n3. Select option B.\nAnswer: (B)", "topic": "data_structures"}
{"answer": "len([6, 7, 8, 9]) is 4.", "choices": {"A": "3", "B": "5", "C": "4", "D": "6"}, "id": "cs_0576", "kind": "multiple_choice", "lang": "en", "question": "What does len([6, 7, 8, 9]) give?", "steps": ["Count items.", "List has {c}.", "Select option C."], "subject": "computer_science", "text": "Answer: 4.\nSteps:\n1. Count items.\n2. List has {c}.\n3. Select option C.\nAnswer: (C)", "topic": "python"}
{"answer": "'x' + 10 je 'x10'.", "choices": {"A": "'10x'", "B": "'11'", "C": "10", "D": "'x10'"}, "id": "cs_0577", "kind": "multiple_choice", "lang": "cs", "question": "Co vrátí 'x' + 10?", "steps": ["String concat.", "Result 'x10'.", "Select option D."], "subject": "computer_science", "text": "Answer: 'x10'.\nSteps:\n1. Spojení řetězců.\n2. Výsledek je 'x10'.\n3. Select option D.\nAnswer: (D)", "topic": "javascript"}
{"answer": "SELECT returns 19.", "choices": {"A": "18", "B": "19", "C": "20", "D": "21"}, "id": "cs_0578", "kind": "multiple_choice", "lang": "en", "question": "Which value does SELECT 25 - 6 return?", "steps": ["Subtract.", "25-6=19.", "Select option B."], "subject": "computer_science", "text": "Answer: 19.\nSteps:\n1. Subtract.\n2. 25-6=19.\n3. Select option B.\nAnswer: (B)", "topic": "sql"}
{"answer": "Time = 6 s.", "choices": null, "id": "cs_0579", "kind": "worked_example", "lang": "en", "question": "Download 120 MB at 20 MB/s (case 7). Seconds?", "steps": ["Size 120.", "Rate 20.", "6 s."], "subject": "computer_science", "text": "Answer: 6.\nSteps:\n1. Size 120.\n2. Rate 20.\n3. 6 s.", "topic": "networking"}
{"answer": "CAP says pick two of consistency, availability, partition tolerance.", "choices": null, "id": "cs_0580", "kind": "concept", "lang": "en", "question": "What is CAP theorem?", "steps": ["Network splits.", "Choose side.", "Tradeoff."], "subject": "computer_science", "text": "Answer: Pick two.\nSteps:\n1. Network splits.\n2. Choose side.\n3. Tradeoff.", "topic": "databases"}
{"answer": "Cycle = 60 ms.", "choices": null, "id": "cs_0581", "kind": "worked_example", "lang": "en", "question": "Quantum 15 ms, 4 procs (case 6). Cycle?", "steps": ["15x4.", "=60.", "60 ms."], "subject": "computer_science", "text": "Answer: 60.\nSteps:\n1. 15x4.\n2. =60.\n3. 60 ms.", "topic": "operating_systems"}
{"answer": "Encapsulation bundles.", "choices": {"A": "Loop", "B": "Sort", "C": "Encapsulation", "D": "Search"}, "id": "cs_0582", "kind": "multiple_choice", "lang": "cs", "question": "Co spojuje data a metody (případ 6)?", "steps": ["Hide inside.", "One unit.", "Select option C."], "subject": "computer_science", "text": "Answer: Encapsulation.\nSteps:\n1. Hide inside.\n2. One unit.\n3. Select option C.\nAnswer: (C)", "topic": "oop"}
{"answer": "Steps = 5.", "choices": {"A": "4", "B": "6", "C": "5", "D": "32"}, "id": "cs_0583", "kind": "multiple_choice", "lang": "en", "question": "Binary search steps for n = 32?", "steps": ["log2(32)=5.", "Halve 5x.", "Select option C."], "subject": "computer_science", "text": "Answer: 5.\nSteps:\n1. log2(32)=5.\n2. Halve 5x.\n3. Select option C.\nAnswer: (C)", "topic": "algorithms"}
{"answer": "Hash worst case degrades to O(n) with many collisions.", "choices": null, "id": "cs_0584", "kind": "concept", "lang": "en", "question": "What is Big-O of hash worst case?", "steps": ["All one slot.", "Scan list.", "Rare good hash."], "subject": "computer_science", "text": "Answer: Collision pile.\nSteps:\n1. All one slot.\n2. Scan list.\n3. Rare good hash.", "topic": "complexity"}
{"answer": "Order 28,18.", "choices": null, "id": "cs_0585", "kind": "worked_example", "lang": "en", "question": "Push 18,28 then pop twice (case 8). Order?", "steps": ["Top 28.", "Then 18.", "28,18."], "subject": "computer_science", "text": "Answer: 28,18.\nSteps:\n1. Top 28.\n2. Then 18.\n3. 28,18.", "topic": "data_structures"}
{"answer": "The walrus := assigns and returns a value in one step.", "choices": null, "id": "cs_0586", "kind": "concept", "lang": "en", "question": "What is the walrus operator?", "steps": ["Syntax :=.", "Use in if.", "Saves line."], "subject": "computer_science", "text": "Answer: Assign and return.\nSteps:\n1. Syntax :=.\n2. Use in if.\n3. Saves line.", "topic": "python"}
{"answer": "Undefined means missing while null means intentional empty.", "choices": null, "id": "cs_0587", "kind": "concept", "lang": "en", "question": "What is undefined versus null?", "steps": ["No value yet.", "Null assigned.", "Both falsy."], "subject": "computer_science", "text": "Answer: Missing versus empty.\nSteps:\n1. No value yet.\n2. Null assigned.\n3. Both falsy.", "topic": "javascript"}
{"answer": "SELECT returns 81.", "choices": {"A": "80", "B": "82", "C": "81", "D": "18"}, "id": "cs_0588", "kind": "multiple_choice", "lang": "cs", "question": "Kterou hodnotu vrátí SELECT 9 * 9?", "steps": ["Multiply.", "9x9=81.", "Select option C."], "subject": "computer_science", "text": "Answer: 81.\nSteps:\n1. Multiply.\n2. 9x9=81.\n3. Select option C.\nAnswer: (C)", "topic": "sql"}
{"answer": "Rate = 20.", "choices": null, "id": "cs_0589", "kind": "worked_example", "lang": "en", "question": "RTT 50 ms (case 8). Serial req/s?", "steps": ["1000 ms.", "1000/50=20.", "20."], "subject": "computer_science", "text": "Answer: 20.\nSteps:\n1. 1000 ms.\n2. 1000/50=20.\n3. 20.", "topic": "networking"}
{"answer": "A znamená atomicitu.", "choices": {"A": "Consistency", "B": "Isolation", "C": "Durability", "D": "Atomicity"}, "id": "cs_0590", "kind": "multiple_choice", "lang": "cs", "question": "Co je A v ACID (případ 7)?", "steps": ["ACID set.", "A first.", "Select option D."], "subject": "computer_science", "text": "Answer: Atomicity.\nSteps:\n1. Sada ACID.\n2. A je první.\n3. Select option D.\nAnswer: (D)", "topic": "databases"}
{"answer": "Virtual = 16 GB.", "choices": null, "id": "cs_0591", "kind": "worked_example", "lang": "en", "question": "RAM 11 GB + swap 5 GB (case 7). Virtual?", "steps": ["11+5.", "=16.", "16 GB."], "subject": "computer_science", "text": "Answer: 16.\nSteps:\n1. 11+5.\n2. =16.\n3. 16 GB.", "topic": "operating_systems"}
{"answer": "Subtypes must work wherever their parent type works.", "choices": null, "id": "cs_0592", "kind": "concept", "lang": "en", "question": "What is the Liskov principle?", "steps": ["Same contract.", "No surprises.", "Behavior keeps."], "subject": "computer_science", "text": "Answer: Safe substitute.\nSteps:\n1. Same contract.\n2. No surprises.\n3. Behavior keeps.", "topic": "oop"}
{"answer": "16 comparisons, not found.", "choices": null, "id": "cs_0593", "kind": "worked_example", "lang": "en", "question": "Linear search 21 in 1..16 (case 8). Comparisons?", "steps": ["Check 16.", "None match.", "16."], "subject": "computer_science", "text": "Answer: 16.\nSteps:\n1. Check 16.\n2. None match.\n3. 16.", "topic": "algorithms"}
{"answer": "It asks whether fast checking implies fast solving.", "choices": null, "id": "cs_0594", "kind": "concept", "lang": "en", "question": "What is P versus NP about?", "steps": ["P solves fast.", "NP checks fast.", "Open question."], "subject": "computer_science", "text": "Answer: Check versus solve.\nSteps:\n1. P solves fast.\n2. NP checks fast.\n3. Open question.", "topic": "complexity"}
{"answer": "Both directions.", "choices": {"A": "Forward only", "B": "Random only", "C": "Both directions", "D": "No traversal"}, "id": "cs_0595", "kind": "multiple_choice", "lang": "cs", "question": "Jak chodí obousměrný seznam (případ 6)?", "steps": ["Two links.", "Both ways.", "Select option C."], "subject": "computer_science", "text": "Answer: Both directions.\nSteps:\n1. Two links.\n2. Both ways.\n3. Select option C.\nAnswer: (C)", "topic": "data_structures"}
{"answer": "Type hints annotate expected types without enforcing them.", "choices": null, "id": "cs_0596", "kind": "concept", "lang": "en", "question": "What are type hints?", "steps": ["Syntax x: int.", "Checked by tools.", "Docs help."], "subject": "computer_science", "text": "Answer: Type annotations.\nSteps:\n1. Syntax x: int.\n2. Checked by tools.\n3. Docs help.", "topic": "python"}
{"answer": "18%4 is 2.", "choices": {"A": "2", "B": "3", "C": "0", "D": "4"}, "id": "cs_0597", "kind": "multiple_choice", "lang": "en", "question": "What does 18 % 4 give in JavaScript?", "steps": ["Remainder.", "18%4=2.", "Select option A."], "subject": "computer_science", "text": "Answer: 2.\nSteps:\n1. Remainder.\n2. 18%4=2.\n3. Select option A.\nAnswer: (A)", "topic": "javascript"}
{"answer": "LIKE matches text patterns with % and _.", "choices": null, "id": "cs_0598", "kind": "concept", "lang": "en", "question": "What is LIKE for?", "steps": ["% any run.", "_ one char.", "Case varies."], "subject": "computer_science", "text": "Answer: Pattern match.\nSteps:\n1. % any run.\n2. _ one char.\n3. Case varies.", "topic": "sql"}
{"answer": "ARP maps IP addresses to MAC addresses on LAN.", "choices": null, "id": "cs_0599", "kind": "concept", "lang": "en", "question": "What is ARP?", "steps": ["Who has IP.", "Reply MAC.", "Cache it."], "subject": "computer_science", "text": "Answer: IP to MAC.\nSteps:\n1. Who has IP.\n2. Reply MAC.\n3. Cache it.", "topic": "networking"}
{"answer": "Replikace kopíruje data na více serverů.", "choices": null, "id": "cs_0600", "kind": "concept", "lang": "cs", "question": "Co je replikace?", "steps": ["Primár píše.", "Repliky čtou.", "Bezpečnost."], "subject": "computer_science", "text": "Answer: Kopie dat.\nSteps:\n1. Primár píše.\n2. Repliky čtou.\n3. Bezpečnost.", "topic": "databases"}
{"answer": "Segmentation splits memory by logical units like code and stack.", "choices": null, "id": "cs_0601", "kind": "concept", "lang": "en", "question": "What is segmentation?", "steps": ["Variable sizes.", "Base plus limit.", "External gaps."], "subject": "computer_science", "text": "Answer: Logical units.\nSteps:\n1. Variable sizes.\n2. Base plus limit.\n3. External gaps.", "topic": "operating_systems"}
{"answer": "Inheritance reuses.", "choices": {"A": "Loop", "B": "Recursion", "C": "Sorting", "D": "Inheritance"}, "id": "cs_0602", "kind": "multiple_choice", "lang": "en", "question": "Which reuses parent behavior (case 7)?", "steps": ["Child extends.", "Gets methods.", "Select option D."], "subject": "computer_science", "text": "Answer: Inheritance.\nSteps:\n1. Child extends.\n2. Gets methods.\n3. Select option D.\nAnswer: (D)", "topic": "oop"}
{"answer": "Bubble sort swaps adjacent.", "choices": {"A": "Merge sort", "B": "Binary search", "C": "BFS", "D": "Bubble sort"}, "id": "cs_0603", "kind": "multiple_choice", "lang": "cs", "question": "Co prohazuje sousedy (případ 7)?", "steps": ["Neighbor pairs.", "Swap if wrong.", "Select option D."], "subject": "computer_science", "text": "Answer: Bubble sort.\nSteps:\n1. Neighbor pairs.\n2. Swap if wrong.\n3. Select option D.\nAnswer: (D)", "topic": "algorithms"}
{"answer": "Iterations = 400.", "choices": null, "id": "cs_0604", "kind": "worked_example", "lang": "en", "question": "Nested loops n=20 (case 8). Iterations?", "steps": ["20x20.", "=400.", "400."], "subject": "computer_science", "text": "Answer: 400.\nSteps:\n1. 20x20.\n2. =400.\n3. 400.", "topic": "complexity"}
{"answer": "Heap backs it.", "choices": {"A": "Stack", "B": "Queue", "C": "Array", "D": "Heap"}, "id": "cs_0605", "kind": "multiple_choice", "lang": "en", "question": "What backs priority queue (case 7)?", "steps": ["Need min.", "Heap gives.", "Select option D."], "subject": "computer_science", "text": "Answer: Heap.\nSteps:\n1. Need min.\n2. Heap gives.\n3. Select option D.\nAnswer: (D)", "topic": "data_structures"}
{"answer": "17//4 is 4.", "choices": {"A": "5", "B": "3", "C": "6", "D": "4"}, "id": "cs_0606", "kind": "multiple_choice", "lang": "en", "question": "What does 17 // 4 give in Python?", "steps": ["Floor divide.", "17//4=4.", "Select option D."], "subject": "computer_science", "text": "Answer: 4.\nSteps:\n1. Floor divide.\n2. 17//4=4.\n3. Select option D.\nAnswer: (D)", "topic": "python"}
{"answer": "Math.floor(8.7) is 8.", "choices": null, "id": "cs_0607", "kind": "worked_example", "lang": "en", "question": "What does Math.floor(8.7) give?", "steps": ["Round down.", "8.7 to 8.", "8."], "subject": "computer_science", "text": "Answer: 8.\nSteps:\n1. Round down.\n2. 8.7 to 8.\n3. 8.", "topic": "javascript"}
{"answer": "BETWEEN filters values within an inclusive range.", "choices": null, "id": "cs_0608", "kind": "concept", "lang": "en", "question": "What is BETWEEN?", "steps": ["Low and high.", "Includes ends.", "Numbers or dates."], "subject": "computer_science", "text": "Answer: Inclusive range.\nSteps:\n1. Low and high.\n2. Includes ends.\n3. Numbers or dates.", "topic": "sql"}
{"answer": "ICMP carries control messages like ping and errors.", "choices": null, "id": "cs_0609", "kind": "concept", "lang": "en", "question": "What is ICMP?", "steps": ["Echo ping.", "Errors back.", "No ports."], "subject": "computer_science", "text": "Answer: Control messages.\nSteps:\n1. Echo ping.\n2. Errors back.\n3. No ports.", "topic": "networking"}
{"answer": "A stored procedure is saved server-side logic run by call.", "choices": null, "id": "cs_0610", "kind": "concept", "lang": "en", "question": "What is a stored procedure?", "steps": ["Stored code.", "Called often.", "Less roundtrip."], "subject": "computer_science", "text": "Answer: Saved logic.\nSteps:\n1. Stored code.\n2. Called often.\n3. Less roundtrip.", "topic": "databases"}
{"answer": "FIFO evicts oldest.", "choices": {"A": "FIFO", "B": "LIFO", "C": "LRU", "D": "Random"}, "id": "cs_0611", "kind": "multiple_choice", "lang": "cs", "question": "Co vyhazuje nejstarší (případ 8)?", "steps": ["Queue order.", "Oldest first.", "Select option A."], "subject": "computer_science", "text": "Answer: FIFO.\nSteps:\n1. Queue order.\n2. Oldest first.\n3. Select option A.\nAnswer: (A)", "topic": "operating_systems"}
{"answer": "Value = 16.", "choices": null, "id": "cs_0612", "kind": "worked_example", "lang": "en", "question": "Counter 15, inc() (case 10). Value?", "steps": ["Start 15.", "Plus 1.", "16."], "subject": "computer_science", "text": "Answer: 16.\nSteps:\n1. Start 15.\n2. Plus 1.\n3. 16.", "topic": "oop"}
{"answer": "A property exposes a method as attribute access with @property.", "choices": null, "id": "cs_0613", "kind": "concept", "lang": "en", "question": "What is a property?", "steps": ["Getter defined.", "Access no parens.", "Setter optional."], "subject": "computer_science", "text": "Answer: Method as attribute.\nSteps:\n1. Getter defined.\n2. Access no parens.\n3. Setter optional.", "topic": "python"}
{"answer": "9+19 is 28.", "choices": null, "id": "cs_0614", "kind": "worked_example", "lang": "en", "question": "What does 9 + 19 give in JavaScript?", "steps": ["Add.", "=28.", "28."], "subject": "computer_science", "text": "Answer: 28.\nSteps:\n1. Add.\n2. =28.\n3. 28.", "topic": "javascript"}
{"answer": "CASE returns values by conditional branches.", "choices": null, "id": "cs_0615", "kind": "concept", "lang": "en", "question": "What is a CASE expression?", "steps": ["WHEN checks.", "THEN gives.", "ELSE default."], "subject": "computer_science", "text": "Answer: Conditional value.\nSteps:\n1. WHEN checks.\n2. THEN gives.\n3. ELSE default.", "topic": "sql"}
{"answer": "TCP opens SYN, SYN-ACK, ACK.", "choices": {"A": "SYN, ACK", "B": "SYN, SYN-ACK, ACK", "C": "ACK, FIN", "D": "SYN, FIN"}, "id": "cs_0616", "kind": "multiple_choice", "lang": "cs", "question": "Jaké je pořadí TCP (případ 9)?", "steps": ["Three steps.", "In order.", "Select option B."], "subject": "computer_science", "text": "Answer: SYN, SYN-ACK, ACK.\nSteps:\n1. Three steps.\n2. In order.\n3. Select option B.\nAnswer: (B)", "topic": "networking"}
{"answer": "PRIMARY KEY ensures unique rows.", "choices": {"A": "PRIMARY KEY", "B": "FOREIGN KEY", "C": "INDEX", "D": "VIEW"}, "id": "cs_0617", "kind": "multiple_choice", "lang": "en", "question": "Which ensures unique rows (case 8)?", "steps": ["Unique id.", "One per table.", "Select option A."], "subject": "computer_science", "text": "Answer: PRIMARY KEY.\nSteps:\n1. Unique id.\n2. One per table.\n3. Select option A.\nAnswer: (A)", "topic": "databases"}
{"answer": "Round-robin uses slices.", "choices": {"A": "FIFO", "B": "Round-robin", "C": "LIFO", "D": "Stack"}, "id": "cs_0618", "kind": "multiple_choice", "lang": "en", "question": "Which uses time slices (case 9)?", "steps": ["Rotate tasks.", "Fixed quantum.", "Select option B."], "subject": "computer_science", "text": "Answer: Round-robin.\nSteps:\n1. Rotate tasks.\n2. Fixed quantum.\n3. Select option B.\nAnswer: (B)", "topic": "operating_systems"}
{"answer": "super() calls parent.", "choices": {"A": "Calls parent", "B": "Creates child", "C": "Deletes obj", "D": "Copies list"}, "id": "cs_0619", "kind": "multiple_choice", "lang": "en", "question": "What does super() do (case 8)?", "steps": ["Parent link.", "Call method.", "Select option A."], "subject": "computer_science", "text": "Answer: Calls parent.\nSteps:\n1. Parent link.\n2. Call method.\n3. Select option A.\nAnswer: (A)", "topic": "oop"}
{"answer": "18%5 je 3.", "choices": {"A": "3", "B": "4", "C": "0", "D": "5"}, "id": "cs_0620", "kind": "multiple_choice", "lang": "cs", "question": "Co vrátí 18 % 5 v Pythonu?", "steps": ["Zbytek.", "18%5=3.", "Vyber možnost A."], "subject": "computer_science", "text": "Answer: 3.\nSteps:\n1. Zbytek.\n2. 18%5=3.\n3. Vyber možnost A.\nAnswer: (A)", "topic": "python"}
{"answer": "Join gives '10-11-12'.", "choices": null, "id": "cs_0621", "kind": "worked_example", "lang": "en", "question": "What does [10,11,12].join('-') give?", "steps": ["Join dash.", "Parts.", "'10-11-12'."], "subject": "computer_science", "text": "Answer: '10-11-12'.\nSteps:\n1. Join dash.\n2. Parts.\n3. '10-11-12'.", "topic": "javascript"}
{"answer": "MAX je 12.", "choices": {"A": "10", "B": "11", "C": "13", "D": "12"}, "id": "cs_0622", "kind": "multiple_choice", "lang": "cs", "question": "Kterou hodnotu dá SELECT MAX z (10,12,11)?", "steps": ["Compare.", "Largest 12.", "Select option D."], "subject": "computer_science", "text": "Answer: 12.\nSteps:\n1. Porovnej.\n2. Největší je 12.\n3. Select option D.\nAnswer: (D)", "topic": "sql"}
{"answer": "DNS uses port 53.", "choices": {"A": "22", "B": "21", "C": "53", "D": "25"}, "id": "cs_0623", "kind": "multiple_choice", "lang": "en", "question": "Which port does DNS use? (set 10)", "steps": ["Standard port.", "DNS=53.", "Select option C."], "subject": "computer_science", "text": "Answer: 53.\nSteps:\n1. Standard port.\n2. DNS=53.\n3. Select option C.\nAnswer: (C)", "topic": "networking"}
{"answer": "Max = 24.", "choices": null, "id": "cs_0624", "kind": "worked_example", "lang": "en", "question": "Cross-join 6 and 4 rows (case 9). Max?", "steps": ["6x4.", "=24.", "24."], "subject": "computer_science", "text": "Answer: 24.\nSteps:\n1. 6x4.\n2. =24.\n3. 24.", "topic": "databases"}
{"answer": "CPUs = 8.", "choices": null, "id": "cs_0625", "kind": "worked_example", "lang": "en", "question": "4 cores, 2 threads each (case 8). Logical CPUs?", "steps": ["4x2.", "=8.", "8."], "subject": "computer_science", "text": "Answer: 8.\nSteps:\n1. 4x2.\n2. =8.\n3. 8.", "topic": "operating_systems"}
{"answer": "B().x = 13.", "choices": null, "id": "cs_0626", "kind": "worked_example", "lang": "en", "question": "Class A x=13, B(A) (case 11). B().x?", "steps": ["A sets.", "B inherits.", "13."], "subject": "computer_science", "text": "Answer: 13.\nSteps:\n1. A sets.\n2. B inherits.\n3. 13.", "topic": "oop"}
{"answer": "N-tice je neměnný uspořádaný záznam.", "choices": null, "id": "cs_0627", "kind": "concept", "lang": "cs", "question": "Co je n-tice?", "steps": ["Pořadí drží.", "Nelze měnit.", "Příklad: (1,2)."], "subject": "computer_science", "text": "Answer: Neměnný záznam.\nSteps:\n1. Pořadí drží.\n2. Nelze měnit.\n3. Příklad: (1,2).", "topic": "python"}
{"answer": "Result is 'hi11'.", "choices": null, "id": "cs_0628", "kind": "worked_example", "lang": "en", "question": "What does 'Hi11'.toLowerCase() give?", "steps": ["Lowercase.", "'hi11'.", "Result."], "subject": "computer_science", "text": "Answer: 'hi11'.\nSteps:\n1. Lowercase.\n2. 'hi11'.\n3. Result.", "topic": "javascript"}
{"answer": "UNION dedupes combined rows while UNION ALL keeps all.", "choices": null, "id": "cs_0629", "kind": "concept", "lang": "en", "question": "What is UNION versus UNION ALL?", "steps": ["Both stack.", "UNION unique.", "ALL faster."], "subject": "computer_science", "text": "Answer: Dedupe versus keep.\nSteps:\n1. Both stack.\n2. UNION unique.\n3. ALL faster.", "topic": "sql"}
{"answer": "A firewall filters packets by rules to block threats.", "choices": null, "id": "cs_0630", "kind": "concept", "lang": "en", "question": "What is a firewall?", "steps": ["Allow list.", "Deny rest.", "Stateful tracks."], "subject": "computer_science", "text": "Answer: Packet filter.\nSteps:\n1. Allow list.\n2. Deny rest.\n3. Stateful tracks.", "topic": "networking"}
{"answer": "Count = 15.", "choices": null, "id": "cs_0631", "kind": "worked_example", "lang": "en", "question": "INSERT 15 rows into empty (case 10). Count?", "steps": ["Start 0.", "Add 15.", "15."], "subject": "computer_science", "text": "Answer: 15.\nSteps:\n1. Start 0.\n2. Add 15.\n3. 15.", "topic": "databases"}
{"answer": "Faults = 3.", "choices": null, "id": "cs_0632", "kind": "worked_example", "lang": "en", "question": "3 frames empty, refs 1..3 (case 9). Faults?", "steps": ["All miss.", "Count 3.", "3."], "subject": "computer_science", "text": "Answer: 3.\nSteps:\n1. All miss.\n2. Count 3.\n3. 3.", "topic": "operating_systems"}
{"answer": "A static method needs no instance or class state.", "choices": null, "id": "cs_0633", "kind": "concept", "lang": "en", "question": "What is a static method?", "steps": ["Decorator static.", "Call via class.", "Utility fn."], "subject": "computer_science", "text": "Answer: No self.\nSteps:\n1. Decorator static.\n2. Call via class.\n3. Utility fn.", "topic": "oop"}
{"answer": "A shallow copy copies outer container but shares nested objects.", "choices": null, "id": "cs_0634", "kind": "concept", "lang": "en", "question": "What is a shallow copy?", "steps": ["Copy top.", "Nested shared.", "Use copy()."], "subject": "computer_science", "text": "Answer: Outer copy.\nSteps:\n1. Copy top.\n2. Nested shared.\n3. Use copy().", "topic": "python"}
{"answer": "JSON.stringify converts values to JSON text.", "choices": null, "id": "cs_0635", "kind": "concept", "lang": "en", "question": "What is JSON.stringify?", "steps": ["Object in.", "String out.", "Inverse parse."], "subject": "computer_science", "text": "Answer: To JSON text.\nSteps:\n1. Object in.\n2. String out.\n3. Inverse parse.", "topic": "javascript"}
{"answer": "COALESCE returns the first non-NULL argument.", "choices": null, "id": "cs_0636", "kind": "concept", "lang": "en", "question": "What is COALESCE?", "steps": ["Scan args.", "Skip NULL.", "Default last."], "subject": "computer_science", "text": "Answer: First non-NULL.\nSteps:\n1. Scan args.\n2. Skip NULL.\n3. Default last.", "topic": "sql"}
{"answer": "172.16.11.1 je privátní.", "choices": {"A": "8.8.11.1", "B": "1.1.11.1", "C": "203.0.11.1", "D": "172.16.11.1"}, "id": "cs_0637", "kind": "multiple_choice", "lang": "cs", "question": "Která IP je privátní (sada 11)?", "steps": ["Private ranges.", "172.16.11.1 fits.", "Select option D."], "subject": "computer_science", "text": "Answer: 172.16.11.1.\nSteps:\n1. Privátní rozsahy.\n2. 172.16.11.1 vyhovuje.\n3. Select option D.\nAnswer: (D)", "topic": "networking"}
{"answer": "A trigger runs automatically on row changes.", "choices": null, "id": "cs_0638", "kind": "concept", "lang": "en", "question": "What is a trigger?", "steps": ["On insert.", "On update.", "Keeps rules."], "subject": "computer_science", "text": "Answer: Auto action.\nSteps:\n1. On insert.\n2. On update.\n3. Keeps rules.", "topic": "databases"}
{"answer": "Mutex ensures one.", "choices": {"A": "Queue", "B": "Array", "C": "Mutex", "D": "File"}, "id": "cs_0639", "kind": "multiple_choice", "lang": "en", "question": "What ensures one access (case 10)?", "steps": ["Lock it.", "One holder.", "Select option C."], "subject": "computer_science", "text": "Answer: Mutex.\nSteps:\n1. Lock it.\n2. One holder.\n3. Select option C.\nAnswer: (C)", "topic": "operating_systems"}
{"answer": "__init__ constructs.", "choices": {"A": "__len__", "B": "__init__", "C": "__add__", "D": "__str__"}, "id": "cs_0640", "kind": "multiple_choice", "lang": "en", "question": "Which is constructor (case 9)?", "steps": ["Init runs.", "Sets fields.", "Select option B."], "subject": "computer_science", "text": "Answer: __init__.\nSteps:\n1. Init runs.\n2. Sets fields.\n3. Select option B.\nAnswer: (B)", "topic": "oop"}
{"answer": "2**7 is 128.", "choices": {"A": "64", "B": "128", "C": "256", "D": "14"}, "id": "cs_0641", "kind": "multiple_choice", "lang": "en", "question": "What does 2**7 give?", "steps": ["Power of two.", "2**7=128.", "Select option B."], "subject": "computer_science", "text": "Answer: 128.\nSteps:\n1. Power of two.\n2. 2**7=128.\n3. Select option B.\nAnswer: (B)", "topic": "python"}
{"answer": "A callback is a function passed to run later.", "choices": null, "id": "cs_0642", "kind": "concept", "lang": "en", "question": "What is a callback?", "steps": ["Pass fn.", "Called back.", "Async or sync."], "subject": "computer_science", "text": "Answer: Later function.\nSteps:\n1. Pass fn.\n2. Called back.\n3. Async or sync.", "topic": "javascript"}
{"answer": "NULL means unknown so comparisons yield unknown, not true.", "choices": null, "id": "cs_0643", "kind": "concept", "lang": "en", "question": "How does NULL compare?", "steps": ["NULL = NULL unknown.", "Use IS NULL.", "Filter carefully."], "subject": "computer_science", "text": "Answer: Unknown logic.\nSteps:\n1. NULL = NULL unknown.\n2. Use IS NULL.\n3. Filter carefully.", "topic": "sql"}
{"answer": "NAT mapuje privátní adresy na veřejnou.", "choices": null, "id": "cs_0644", "kind": "concept", "lang": "cs", "question": "Co je NAT?", "steps": ["Mnoho na jednu.", "Sleduje porty.", "Šetří IP."], "subject": "computer_science", "text": "Answer: Mapování adres.\nSteps:\n1. Mnoho na jednu.\n2. Sleduje porty.\n3. Šetří IP.", "topic": "networking"}
{"answer": "INSERT adds rows.", "choices": {"A": "SELECT", "B": "INSERT", "C": "DELETE", "D": "UPDATE"}, "id": "cs_0645", "kind": "multiple_choice", "lang": "cs", "question": "Co přidává řádky (případ 9)?", "steps": ["Write op.", "INSERT fits.", "Select option B."], "subject": "computer_science", "text": "Answer: INSERT.\nSteps:\n1. Write op.\n2. INSERT fits.\n3. Select option B.\nAnswer: (B)", "topic": "databases"}
{"answer": "A bootloader loads the kernel at power-on.", "choices": null, "id": "cs_0646", "kind": "concept", "lang": "en", "question": "What is a bootloader?", "steps": ["Firmware runs.", "Load kernel.", "Jump entry."], "subject": "computer_science", "text": "Answer: Start loader.\nSteps:\n1. Firmware runs.\n2. Load kernel.\n3. Jump entry.", "topic": "operating_systems"}
{"answer": "A class method receives the class as first argument.", "choices": null, "id": "cs_0647", "kind": "concept", "lang": "en", "question": "What is a class method?", "steps": ["Decorator class.", "Factory use.", "Alt constructor."], "subject": "computer_science", "text": "Answer: Gets cls.\nSteps:\n1. Decorator class.\n2. Factory use.\n3. Alt constructor.", "topic": "oop"}
{"answer": "Result is [11, 12, 13].", "choices": null, "id": "cs_0648", "kind": "worked_example", "lang": "en", "question": "What does list(range(11,14)) give?", "steps": ["From 11.", "To 13.", "[11, 12, 13]."], "subject": "computer_science", "text": "Answer: [11, 12, 13].\nSteps:\n1. From 11.\n2. To 13.\n3. [11, 12, 13].", "topic": "python"}
{"answer": "Uzávěr je funkce pamatující si vnější proměnné.", "choices": null, "id": "cs_0649", "kind": "concept", "lang": "cs", "question": "Co je uzávěr?", "steps": ["Vnitřní drží.", "Po návratu.", "Soukromý stav."], "subject": "computer_science", "text": "Answer: Pamatuje okolí.\nSteps:\n1. Vnitřní drží.\n2. Po návratu.\n3. Soukromý stav.", "topic": "javascript"}
{"answer": "SELECT 13+15 returns 28.", "choices": {"A": "28", "B": "27", "C": "29", "D": "30"}, "id": "cs_0650", "kind": "multiple_choice", "lang": "cs", "question": "Kterou hodnotu vrátí SELECT 13 + 15?", "steps": ["Add.", "13+15=28.", "Select option A."], "subject": "computer_science", "text": "Answer: 28.\nSteps:\n1. Add.\n2. 13+15=28.\n3. Select option A.\nAnswer: (A)", "topic": "sql"}
{"answer": "Mask is 255.240.0.0.", "choices": null, "id": "cs_0651", "kind": "worked_example", "lang": "en", "question": "What is mask for /12 (case 9)?", "steps": ["Prefix 12.", "Bits.", "255.240.0.0."], "subject": "computer_science", "text": "Answer: 255.240.0.0.\nSteps:\n1. Prefix 12.\n2. Bits.\n3. 255.240.0.0.", "topic": "networking"}
{"answer": "Pooling reuses open connections for many requests.", "choices": null, "id": "cs_0652", "kind": "concept", "lang": "en", "question": "What is connection pooling?", "steps": ["Open once.", "Share queue.", "Less overhead."], "subject": "computer_science", "text": "Answer: Reused links.\nSteps:\n1. Open once.\n2. Share queue.\n3. Less overhead.", "topic": "databases"}
{"answer": "Kernel manages.", "choices": {"A": "Shell", "B": "App", "C": "Driver", "D": "Kernel"}, "id": "cs_0653", "kind": "multiple_choice", "lang": "cs", "question": "Co řídí zdroje (případ 11)?", "steps": ["Core role.", "CPU mem.", "Select option D."], "subject": "computer_science", "text": "Answer: Kernel.\nSteps:\n1. Core role.\n2. CPU mem.\n3. Select option D.\nAnswer: (D)", "topic": "operating_systems"}
{"answer": "Balance = 290.", "choices": null, "id": "cs_0654", "kind": "worked_example", "lang": "en", "question": "Balance 220, deposit(70) (case 12). Balance?", "steps": ["Start 220.", "Add 70.", "290."], "subject": "computer_science", "text": "Answer: 290.\nSteps:\n1. Start 220.\n2. Add 70.\n3. 290.", "topic": "oop"}
{"answer": "'ab'*5 is 'ababababab'.", "choices": null, "id": "cs_0655", "kind": "worked_example", "lang": "en", "question": "What does 'ab'*5 give?", "steps": ["Repeat.", "5x.", "'ababababab'."], "subject": "computer_science", "text": "Answer: 'ababababab'.\nSteps:\n1. Repeat.\n2. 5x.\n3. 'ababababab'.", "topic": "python"}
{"answer": "Repeat gives 'abab'.", "choices": null, "id": "cs_0656", "kind": "worked_example", "lang": "en", "question": "What does 'ab'.repeat(2) give?", "steps": ["Repeat.", "2x.", "'abab'."], "subject": "computer_science", "text": "Answer: 'abab'.\nSteps:\n1. Repeat.\n2. 2x.\n3. 'abab'.", "topic": "javascript"}
{"answer": "GROUP BY groups equal keys for aggregate functions.", "choices": null, "id": "cs_0657", "kind": "concept", "lang": "en", "question": "What is GROUP BY for?", "steps": ["Same key together.", "COUNT or SUM.", "HAVING filters."], "subject": "computer_science", "text": "Answer: Group aggregates.\nSteps:\n1. Same key together.\n2. COUNT or SUM.\n3. HAVING filters.", "topic": "sql"}
{"answer": "Latency is delay while bandwidth is rate of transfer.", "choices": null, "id": "cs_0658", "kind": "concept", "lang": "en", "question": "What is latency versus bandwidth?", "steps": ["Ms delay.", "Mbps rate.", "Both matter."], "subject": "computer_science", "text": "Answer: Delay versus rate.\nSteps:\n1. Ms delay.\n2. Mbps rate.\n3. Both matter.", "topic": "networking"}
{"answer": "Index speeds reads.", "choices": {"A": "Deletes data", "B": "Drops table", "C": "Speeds reads", "D": "Stops DB"}, "id": "cs_0659", "kind": "multiple_choice", "lang": "en", "question": "What is an index for (case 10)?", "steps": ["Lookup aid.", "Faster.", "Select option C."], "subject": "computer_science", "text": "Answer: Speeds reads.\nSteps:\n1. Lookup aid.\n2. Faster.\n3. Select option C.\nAnswer: (C)", "topic": "databases"}
{"answer": "A pipe connects one process output to another input.", "choices": null, "id": "cs_0660", "kind": "concept", "lang": "en", "question": "What is a pipe?", "steps": ["Write end.", "Read end.", "Buffer middle."], "subject": "computer_science", "text": "Answer: Linked stream.\nSteps:\n1. Write end.\n2. Read end.\n3. Buffer middle.", "topic": "operating_systems"}
{"answer": "Multiple inheritance takes behavior from several parents.", "choices": null, "id": "cs_0661", "kind": "concept", "lang": "en", "question": "What is multiple inheritance?", "steps": ["Combine mixins.", "Order MRO.", "Conflicts possible."], "subject": "computer_science", "text": "Answer: Many parents.\nSteps:\n1. Combine mixins.\n2. Order MRO.\n3. Conflicts possible.", "topic": "oop"}
{"answer": "d['a'] is 11.", "choices": null, "id": "cs_0662", "kind": "worked_example", "lang": "en", "question": "If d={'a':11}, what is d['a']?", "steps": ["Key a.", "Value 11.", "Result 11."], "subject": "computer_science", "text": "Answer: 11.\nSteps:\n1. Key a.\n2. Value 11.\n3. Result 11.", "topic": "python"}
{"answer": "Math.floor(13.7) is 13.", "choices": null, "id": "cs_0663", "kind": "worked_example", "lang": "en", "question": "What does Math.floor(13.7) give?", "steps": ["Round down.", "13.7 to 13.", "13."], "subject": "computer_science", "text": "Answer: 13.\nSteps:\n1. Round down.\n2. 13.7 to 13.\n3. 13.", "topic": "javascript"}
{"answer": "LIMIT caps rows and OFFSET skips leading rows.", "choices": null, "id": "cs_0664", "kind": "concept", "lang": "en", "question": "What is LIMIT OFFSET?", "steps": ["LIMIT n.", "OFFSET m.", "Paging."], "subject": "computer_science", "text": "Answer: Cap and skip.\nSteps:\n1. LIMIT n.\n2. OFFSET m.\n3. Paging.", "topic": "sql"}
{"answer": "/7 has 33554430 usable.", "choices": null, "id": "cs_0665", "kind": "worked_example", "lang": "en", "question": "How many usable hosts in /7 (case 10)?", "steps": ["Host bits 25.", "2^25=33554432.", "Usable 33554430."], "subject": "computer_science", "text": "Answer: 33554430.\nSteps:\n1. Host bits 25.\n2. 2^25=33554432.\n3. Usable 33554430.", "topic": "networking"}
{"answer": "Shardování dělí data podle klíče.", "choices": null, "id": "cs_0666", "kind": "concept", "lang": "cs", "question": "Co je shardování?", "steps": ["Klíč směruje.", "Více serverů.", "Škálování."], "subject": "computer_science", "text": "Answer: Dělení dat.\nSteps:\n1. Klíč směruje.\n2. Více serverů.\n3. Škálování.", "topic": "databases"}
{"answer": "Signál je asynchronní oznámení procesu.", "choices": null, "id": "cs_0667", "kind": "concept", "lang": "cs", "question": "Co je signál?", "steps": ["Kill či stop.", "Handler.", "Výchozí jinak."], "subject": "computer_science", "text": "Answer: Async zpráva.\nSteps:\n1. Kill či stop.\n2. Handler.\n3. Výchozí jinak.", "topic": "operating_systems"}
{"answer": "A mixin adds optional behavior to classes.", "choices": null, "id": "cs_0668", "kind": "concept", "lang": "en", "question": "What is a mixin?", "steps": ["Small focused.", "Combined in.", "No alone use."], "subject": "computer_science", "text": "Answer: Added behavior.\nSteps:\n1. Small focused.\n2. Combined in.\n3. No alone use.", "topic": "oop"}
{"answer": "Smyčka spouští frontu callbacků po vyprázdnění zásobníku.", "choices": null, "id": "cs_0669", "kind": "concept", "lang": "cs", "question": "Co je událostní smyčka?", "steps": ["Nejprve stack.", "Pak fronta.", "Async efekt."], "subject": "computer_science", "text": "Answer: Fronta callbacků.\nSteps:\n1. Nejprve stack.\n2. Pak fronta.\n3. Async efekt.", "topic": "javascript"}
{"answer": "SELECT returns 23.", "choices": {"A": "22", "B": "23", "C": "24", "D": "25"}, "id": "cs_0670", "kind": "multiple_choice", "lang": "en", "question": "Which value does SELECT 29 - 6 return?", "steps": ["Subtract.", "29-6=23.", "Select option B."], "subject": "computer_science", "text": "Answer: 23.\nSteps:\n1. Subtract.\n2. 29-6=23.\n3. Select option B.\nAnswer: (B)", "topic": "sql"}
{"answer": "Subnets = 4.", "choices": null, "id": "cs_0671", "kind": "worked_example", "lang": "en", "question": "Split /20 into /22 (case 11). How many subnets?", "steps": ["Bits 2.", "2^2=4.", "4."], "subject": "computer_science", "text": "Answer: 4.\nSteps:\n1. Bits 2.\n2. 2^2=4.\n3. 4.", "topic": "networking"}
{"answer": "Trigger se spustí automaticky při změně.", "choices": null, "id": "cs_0672", "kind": "concept", "lang": "cs", "question": "Co je trigger?", "steps": ["Při insertu.", "Při updatu.", "Pravidla."], "subject": "computer_science", "text": "Answer: Auto akce.\nSteps:\n1. Při insertu.\n2. Při updatu.\n3. Pravidla.", "topic": "databases"}
{"answer": "A signal is an async notification to a process.", "choices": null, "id": "cs_0673", "kind": "concept", "lang": "en", "question": "What is a signal?", "steps": ["Kill or stop.", "Handler runs.", "Default else."], "subject": "computer_science", "text": "Answer: Async notice.\nSteps:\n1. Kill or stop.\n2. Handler runs.\n3. Default else.", "topic": "operating_systems"}
{"answer": "Rozhraní žádá metody bez implementace.", "choices": null, "id": "cs_0674", "kind": "concept", "lang": "cs", "question": "Co je rozhraní?", "steps": ["Jen smlouva.", "Třída splní.", "Více sdílí."], "subject": "computer_science", "text": "Answer: Žádané metody.\nSteps:\n1. Jen smlouva.\n2. Třída splní.\n3. Více sdílí.", "topic": "oop"}
{"answer": "14+29 is 43.", "choices": null, "id": "cs_0675", "kind": "worked_example", "lang": "en", "question": "What does 14 + 29 give in JavaScript?", "steps": ["Add.", "=43.", "43."], "subject": "computer_science", "text": "Answer: 43.\nSteps:\n1. Add.\n2. =43.\n3. 43.", "topic": "javascript"}
{"answer": "SELECT returns 169.", "choices": {"A": "168", "B": "170", "C": "169", "D": "26"}, "id": "cs_0676", "kind": "multiple_choice", "lang": "en", "question": "Which value does SELECT 13 * 13 return?", "steps": ["Multiply.", "13x13=169.", "Select option C."], "subject": "computer_science", "text": "Answer: 169.\nSteps:\n1. Multiply.\n2. 13x13=169.\n3. Select option C.\nAnswer: (C)", "topic": "sql"}
{"answer": "Packet switching routes small packets independently.", "choices": null, "id": "cs_0677", "kind": "concept", "lang": "en", "question": "What is packet switching?", "steps": ["Chop data.", "Route each.", "Reassemble."], "subject": "computer_science", "text": "Answer: Split and route.\nSteps:\n1. Chop data.\n2. Route each.\n3. Reassemble.", "topic": "networking"}
{"answer": "Returned = 7.", "choices": null, "id": "cs_0678", "kind": "worked_example", "lang": "en", "question": "21 rows, WHERE matches 7 (case 11). Returned?", "steps": ["Total 21.", "Match 7.", "7."], "subject": "computer_science", "text": "Answer: 7.\nSteps:\n1. Total 21.\n2. Match 7.\n3. 7.", "topic": "databases"}
{"answer": "Virtualization runs isolated guest machines on one host.", "choices": null, "id": "cs_0679", "kind": "concept", "lang": "en", "question": "What is virtualization?", "steps": ["Hypervisor.", "Share hardware.", "Isolated."], "subject": "computer_science", "text": "Answer: Guest machines.\nSteps:\n1. Hypervisor.\n2. Share hardware.\n3. Isolated.", "topic": "operating_systems"}
{"answer": "Encapsulation bundles.", "choices": {"A": "Loop", "B": "Sort", "C": "Encapsulation", "D": "Search"}, "id": "cs_0680", "kind": "multiple_choice", "lang": "cs", "question": "Co spojuje data a metody (případ 10)?", "steps": ["Hide inside.", "One unit.", "Select option C."], "subject": "computer_science", "text": "Answer: Encapsulation.\nSteps:\n1. Hide inside.\n2. One unit.\n3. Select option C.\nAnswer: (C)", "topic": "oop"}
{"answer": "Math.ceil(9.2) is 10.", "choices": {"A": "9", "B": "10", "C": "11", "D": "8"}, "id": "cs_0681", "kind": "multiple_choice", "lang": "en", "question": "What does Math.ceil(9.2) give?", "steps": ["Round up.", "9.2 to 10.", "Select option B."], "subject": "computer_science", "text": "Answer: 10.\nSteps:\n1. Round up.\n2. 9.2 to 10.\n3. Select option B.\nAnswer: (B)", "topic": "javascript"}
{"answer": "Aggregates combine rows into one value like COUNT or AVG.", "choices": null, "id": "cs_0682", "kind": "concept", "lang": "en", "question": "What is an aggregate?", "steps": ["Many to one.", "COUNT SUM AVG.", "With GROUP."], "subject": "computer_science", "text": "Answer: Row combiner.\nSteps:\n1. Many to one.\n2. COUNT SUM AVG.\n3. With GROUP.", "topic": "sql"}
{"answer": "IPv6 uses 128-bit addresses for huge space.", "choices": null, "id": "cs_0683", "kind": "concept", "lang": "en", "question": "What is IPv6?", "steps": ["Hex groups.", "Many IPs.", "Coexists v4."], "subject": "computer_science", "text": "Answer: Long addresses.\nSteps:\n1. Hex groups.\n2. Many IPs.\n3. Coexists v4.", "topic": "networking"}
{"answer": "Remain = 19.", "choices": null, "id": "cs_0684", "kind": "worked_example", "lang": "en", "question": "Table has 22 rows, DELETE removes 3 (case 12). Remain?", "steps": ["Start 22.", "Minus 3.", "19."], "subject": "computer_science", "text": "Answer: 19.\nSteps:\n1. Start 22.\n2. Minus 3.\n3. 19.", "topic": "databases"}
{"answer": "Cycle = 60 ms.", "choices": null, "id": "cs_0685", "kind": "worked_example", "lang": "en", "question": "Quantum 15 ms, 4 procs (case 10). Cycle?", "steps": ["15x4.", "=60.", "60 ms."], "subject": "computer_science", "text": "Answer: 60.\nSteps:\n1. 15x4.\n2. =60.\n3. 60 ms.", "topic": "operating_systems"}
{"answer": "Area = 28.", "choices": null, "id": "cs_0686", "kind": "worked_example", "lang": "en", "question": "Rectangle 4 by 7 (case 13). Area?", "steps": ["4x7.", "=28.", "28."], "subject": "computer_science", "text": "Answer: 28.\nSteps:\n1. 4x7.\n2. =28.\n3. 28.", "topic": "oop"}
{"answer": "Slib reprezentuje budoucí hodnotu s then/catch.", "choices": null, "id": "cs_0687", "kind": "concept", "lang": "cs", "question": "Co je slib (promise)?", "steps": ["Pending.", "Then/catch.", "Řetězení."], "subject": "computer_science", "text": "Answer: Budoucí hodnota.\nSteps:\n1. Pending.\n2. Then/catch.\n3. Řetězení.", "topic": "javascript"}
{"answer": "SELECT returns 23.", "choices": null, "id": "cs_0688", "kind": "worked_example", "lang": "en", "question": "What does SELECT 46 / 2 return?", "steps": ["Divide.", "46/2=23.", "23."], "subject": "computer_science", "text": "Answer: 23.\nSteps:\n1. Divide.\n2. 46/2=23.\n3. 23.", "topic": "sql"}
{"answer": "Time = 8.5 s.", "choices": null, "id": "cs_0689", "kind": "worked_example", "lang": "en", "question": "Download 170 MB at 20 MB/s (case 12). Seconds?", "steps": ["Size 170.", "Rate 20.", "8.5 s."], "subject": "computer_science", "text": "Answer: 8.5.\nSteps:\n1. Size 170.\n2. Rate 20.\n3. 8.5 s.", "topic": "networking"}
{"answer": "A is Atomicity.", "choices": {"A": "Consistency", "B": "Isolation", "C": "Durability", "D": "Atomicity"}, "id": "cs_0690", "kind": "multiple_choice", "lang": "en", "question": "What is A in ACID (case 11)?", "steps": ["ACID set.", "A first.", "Select option D."], "subject": "computer_science", "text": "Answer: Atomicity.\nSteps:\n1. ACID set.\n2. A first.\n3. Select option D.\nAnswer: (D)", "topic": "databases"}
{"answer": "Virtual = 20 GB.", "choices": null, "id": "cs_0691", "kind": "worked_example", "lang": "en", "question": "RAM 15 GB + swap 5 GB (case 11). Virtual?", "steps": ["15+5.", "=20.", "20 GB."], "subject": "computer_science", "text": "Answer: 20.\nSteps:\n1. 15+5.\n2. =20.\n3. 20 GB.", "topic": "operating_systems"}
{"answer": "Přepsání znovu definuje metodu rodiče.", "choices": null, "id": "cs_0692", "kind": "concept", "lang": "cs", "question": "Co je přepsání metody?", "steps": ["Stejné jméno.", "Potomek vítězí.", "Rozšíří."], "subject": "computer_science", "text": "Answer: Nová definice.\nSteps:\n1. Stejné jméno.\n2. Potomek vítězí.\n3. Rozšíří.", "topic": "oop"}
{"answer": "Boolean('') je false.", "choices": {"A": "true", "B": "0", "C": "false", "D": "1"}, "id": "cs_0693", "kind": "multiple_choice", "lang": "cs", "question": "Co vrátí Boolean('')?", "steps": ["Check falsy.", "Result false.", "Select option C."], "subject": "computer_science", "text": "Answer: false.\nSteps:\n1. Zkontroluj falsy.\n2. Výsledek je false.\n3. Select option C.\nAnswer: (C)", "topic": "javascript"}
{"answer": "Result is 0.", "choices": null, "id": "cs_0694", "kind": "worked_example", "lang": "en", "question": "Compute SELECT 24 % 3.", "steps": ["Modulo.", "24%3=0.", "0."], "subject": "computer_science", "text": "Answer: 0.\nSteps:\n1. Modulo.\n2. 24%3=0.\n3. 0.", "topic": "sql"}
{"answer": "Rate = 20.", "choices": null, "id": "cs_0695", "kind": "worked_example", "lang": "en", "question": "RTT 50 ms (case 13). Serial req/s?", "steps": ["1000 ms.", "1000/50=20.", "20."], "subject": "computer_science", "text": "Answer: 20.\nSteps:\n1. 1000 ms.\n2. 1000/50=20.\n3. 20.", "topic": "networking"}
{"answer": "Max = 20.", "choices": null, "id": "cs_0696", "kind": "worked_example", "lang": "en", "question": "Cross-join 5 and 4 rows (case 13). Max?", "steps": ["5x4.", "=20.", "20."], "subject": "computer_science", "text": "Answer: 20.\nSteps:\n1. 5x4.\n2. =20.\n3. 20.", "topic": "databases"}
{"answer": "CPUs = 4.", "choices": null, "id": "cs_0697", "kind": "worked_example", "lang": "en", "question": "2 cores, 2 threads each (case 12). Logical CPUs?", "steps": ["2x2.", "=4.", "4."], "subject": "computer_science", "text": "Answer: 4.\nSteps:\n1. 2x2.\n2. =4.\n3. 4.", "topic": "operating_systems"}
{"answer": "Inheritance reuses.", "choices": {"A": "Loop", "B": "Recursion", "C": "Sorting", "D": "Inheritance"}, "id": "cs_0698", "kind": "multiple_choice", "lang": "cs", "question": "Co dědí chování (případ 11)?", "steps": ["Child extends.", "Gets methods.", "Select option D."], "subject": "computer_science", "text": "Answer: Inheritance.\nSteps:\n1. Child extends.\n2. Gets methods.\n3. Select option D.\nAnswer: (D)", "topic": "oop"}
{"answer": "Faults = 4.", "choices": null, "id": "cs_0699", "kind": "worked_example", "lang": "en", "question": "4 frames empty, refs 1..4 (case 13). Faults?", "steps": ["All miss.", "Count 4.", "4."], "subject": "computer_science", "text": "Answer: 4.\nSteps:\n1. All miss.\n2. Count 4.\n3. 4.", "topic": "operating_systems"}
{"answer": "Injection passes dependencies from outside instead of creating.", "choices": null, "id": "cs_0700", "kind": "concept", "lang": "en", "question": "What is dependency injection?", "steps": ["Pass in.", "Test easy.", "Loose link."], "subject": "computer_science", "text": "Answer: Outside deps.\nSteps:\n1. Pass in.\n2. Test easy.\n3. Loose link.", "topic": "oop"}