-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdata.json
More file actions
1904 lines (1904 loc) · 42.9 KB
/
Copy pathdata.json
File metadata and controls
1904 lines (1904 loc) · 42.9 KB
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
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
{
"Arrays": {
"pts": 8,
"questions": [
{
"answer": 1,
"info": [
"mcq",
"Why should you be careful when declaring arrays with too many dimensions?",
"It will take too much memory",
"Most modern computers cannot handle 5D calculations",
"Modifying arrays above 4 dimensions requires a graphics card",
"It is difficult to access and modify"
]
},
{
"answer": 2,
"info": [
"mcq",
"What is a data structure?",
"A structured method to declaring variables and storing it as data",
"A programming structure designed to hold data",
"Data that has become large enough to necessitate a custom hardware structure to support it",
"The backbone of databases"
]
},
{
"answer": 4,
"info": [
"mcq",
"Which of the following languages are not 0-indexed?",
"Python",
"C++",
"Java",
"MATLAB"
]
},
{
"answer": 1,
"info": [
"mcq",
"Which of the following indices accesses the 1st element in a 0-indexed array?",
"0",
"1",
"2",
"-1"
]
},
{
"answer": 3,
"info": [
"mcq",
"What needs to be provided when an array is initialized?",
"Data type and storage type",
"Data structure type",
"Data type and size",
"Size and data structure"
]
},
{
"answer": "5",
"info": [
"frs",
"What index is required to access the 4th element in an array?"
]
},
{
"answer": "10",
"info": [
"fr",
"What is the output of the following code?",
"arr = [5, 3, 2, 4, 1] <br>sum = 0 <br>for i in range(3): <br> sum += arr[i] <br>print(sum)",
"Python"
]
},
{
"answer": "7",
"info": [
"fr",
"What is the output of the following code?",
"arr = [2, 5, 4, 3, 1] <br>print(arr[0] + arr[2] + arr[4])",
"Python"
]
},
{
"answer": "11",
"info": [
"fr",
"What is the output of the following code?",
"arr = [3, 6, 10, 4, 2] <br>x = 20 <br>for i in range(2): <br> x -= arr[i] <br>print(x)",
"Python"
]
}
]
},
"Automation": {
"pts": 10,
"questions": [
{
"answer": 3,
"info": [
"mc",
"What is the main reason why we automate things?",
"Because it’s fun",
"Because it’s not fun",
"To spend less time on routine tasks",
"To spend more time on routine tasks"
]
},
{
"answer": 1,
"info": [
"mc",
"What types of tasks are most easily automated?",
"Routine tasks",
"Challenging intellectual tasks",
"Skilled jobs like carpentry or plumbing",
"Creative tasks"
]
},
{
"answer": 4,
"info": [
"mc",
"Which of the following would be a task best suited for automation?",
"cooking food",
"talking to customers",
"cleaning tables",
"sending weekly paychecks to employees"
]
},
{
"answer": 3,
"info": [
"mc",
"What does API stand for?",
"Apple Programming Instance",
"Application Port Initialization",
"Application Programming Interface",
"Anonymous Pilot Interface"
]
},
{
"answer": 2,
"info": [
"mc",
"What is the main purpose of APIs?",
"To track you and your data",
"To allow developers to interact with applications",
"To automate server maintenance",
"To automatically respond to emails"
]
},
{
"answer": 1,
"info": [
"mc",
"Which of the following is an example of automation?",
"Scheduled Instagram posts",
"Driving a car",
"Writing a paper",
"Playing an instrument"
]
},
{
"answer": 4,
"info": [
"mc",
"What is a background process?",
"A process that outputs information to the user",
"A website that tracks you in the background",
"A process that does not require an internet connection",
"A process that does not require user input"
]
},
{
"answer": 2,
"info": [
"mc",
"Which of the following should not be run in a background process?",
"Scheduled Twitter posts",
"Video game",
"Music",
"Routine security checks"
]
},
{
"answer": 3,
"info": [
"mc",
"Why is abstraction beneficial?",
"It teaches us more",
"It tells us how things work",
"It makes it unnecessary to know exactly how things work",
"It forces us to understand in detail how things work"
]
},
{
"answer": 2,
"info": [
"mc",
"Which of the following is an example of abstraction?",
"An engineer designing a spacecraft in detail",
"A regular person driving a car ",
"An accountant keeping track of all company expenses",
"A student learning a complicated math topic"
]
}
]
},
"BFS DFS": {
"pts": 16,
"questions": [
{
"answer": 3,
"info": [
"mc",
"What does BFS stand for?",
"Binary fast search",
"Binary fast sorting",
"Breadth-first search",
"Binary-first sorting"
]
},
{
"answer": 3,
"info": [
"mc",
"What does DFS stand for?",
"Depth-following sorting",
"Dearth first search",
"Depth-first search",
"Depth-fade sorting"
]
},
{
"answer": 1,
"info": [
"tf",
"Will BFS prioritize closer nodes over further nodes?",
"Yes",
"No"
]
},
{
"answer": 2,
"info": [
"tf",
"Will DFS prioritize closer nodes over further nodes?",
"Yes",
"No"
]
},
{
"answer": 3,
"info": [
"mc",
"Which of the following will ALWAYS visit every reachable node in a graph?",
"BFS",
"DFS",
"Both",
"Neither"
]
},
{
"answer": 4,
"info": [
"mc",
"Which of the following can reach nodes that are not connected to the start node?",
"BFS",
"DFS",
"Both",
"Neither"
]
}
]
},
"Binary Search": {
"pts": 15,
"questions": [
{
"answer": 2,
"info": [
"tf",
"Sequential search has a better time complexity than binary search.",
"True",
"False"
]
},
{
"answer": 1,
"info": [
"tf",
"The time complexity of binary search is logarithmic.",
"True ",
"False "
]
},
{
"answer": 2,
"info": [
"smc",
"How is binary search implemented?",
"Going through values sequentially",
"Searching a sorted array by repeatedly dividing search interval in half",
"Randomly picking values"
]
},
{
"answer": 1,
"info": [
"mc",
"How do you efficiently narrow down the amount of elements being searched?",
"Divide the search space in half each time",
"Double the search space each time",
"Decrease search space by 1 each time",
"Keep search space the same each time"
]
},
{
"answer": 2,
"info": [
"mc",
"Binary search works when the array is ______",
"Sequential",
"Sorted",
"Any of these",
"Random"
]
},
{
"answer": 2,
"info": [
"mc",
"The maximum number of comparisons needed in binary search on array of size 32 is ____",
"8",
"5",
"4",
"16"
]
},
{
"answer": 2,
"info": [
"mc",
"Binary search terminates when_____",
"Starting index<ending index",
"Starting index>=ending index",
"Starting index<=ending index",
"None of these"
]
},
{
"answer": 2,
"info": [
"tf",
"If the middle element is greater than the target value, then the binary search algorithm searches for the target in the second half of the array.",
"True",
"False"
]
},
{
"answer": 3,
"info": [
"smc",
"How do you know if the element you are searching for is found?",
"The while loop terminates",
"The index is not returned",
"The index is returned"
]
},
{
"answer": 2,
"info": [
"tf",
"Binary search is ALWAYS faster than iterating through every element",
"True",
"False"
]
}
]
},
"Booleans": {
"pts": 10,
"questions": [
{
"answer": 4,
"info": [
"mcq",
"What are the two values that can be stored in a boolean variable?",
"Good, Bad",
"-1, 1",
"Deprecated, Modern",
"True, False"
]
},
{
"answer": 1,
"info": [
"tf",
"True or False: The two possible answers for a true or false question can be stored as a boolean",
"True",
"False"
]
},
{
"answer": 2,
"info": [
"mcq",
"What three components make up an if-statement?",
"The boolean, the loop, the if-statement",
"If-statement itself, the body of code, the boolean",
"A what-if clause, a noun, and a verb",
"If-statement itself, the boolean, and a pointer to the code to run"
]
},
{
"answer": 2,
"info": [
"mcq",
"What differentiates an if-statement from an if-else statement?",
"If the given boolean is true, the “else” code block is ran",
"It has another body of code that runs only if the given boolean is false",
"The else body of code runs only if the if-else statement matches the else-if statement",
"They are the same"
]
},
{
"answer": "False",
"info": [
"fr",
"What is the output of this code? (Note: Python capitalizes the first letter of a boolean’s value / uses “True” and “False”)",
"a = True <br>b = 6 <br>c = 7 <br>if a: <br> print(b==c)",
"Python"
]
},
{
"answer": "False",
"info": [
"fr",
"What is the output of this code? (Note: Python capitalizes the first letter of a boolean’s value / uses “True” and “False”)",
"a = 7 <br>b = 5 <br>c = 1 <br>if c: <br> print(b>a)",
"Python"
]
},
{
"answer": "False",
"info": [
"fr",
"What is the output of this code? (Note: Python capitalizes the first letter of a boolean’s value / uses “True” and “False”)",
"a = 6 <br>b = 4 <br>c = False <br>if c: <br> print(b>a) <br>else: <br> print(a<b)",
"Python"
]
},
{
"answer": "3",
"info": [
"fr",
"What is the output of this code? (Note: Python capitalizes the first letter of a boolean’s value / uses “True” and “False”)",
"a = 4 <br>b = 2 <br>c = 7 <br>d = 5 <br>if d > c: <br> if b < a: <br> print(1) <br> else: <br> print(2) <br>else: <br> print(3)",
"Python"
]
}
]
},
"Dynamic Programming": {
"pts": 17,
"questions": [
{
"answer": 1,
"info": [
"mc",
"What is dynamic programming?",
"Reusing the solution to repetitive subproblems to speed up computation",
"Reusing memory locations in order to save space",
"Changing the sizes of arrays",
"Exploding, as dynamic sounds like dynamite"
]
},
{
"answer": 4,
"info": [
"mc",
"What’s the abbreviation for dynamic programming?",
"DyPr",
"DY",
"D.Y.N.A.M.I.C. P.R.O.G.R.A.M.M.I.N.G.",
"DP"
]
},
{
"answer": 3,
"info": [
"mc",
"What are the two criteria that must be filled to use dynamic programming?",
"Optimal substructure and differentiated subproblems",
"Recursion and storage",
"Optimal substructure and overlapping subproblems",
"Limited memory and memory locations"
]
},
{
"answer": 1,
"info": [
"tf",
"The Fibonacci sequence can be calculated quickly using dynamic programming.",
"True",
"False"
]
},
{
"answer": 2,
"info": [
"mc",
"What common technique can be optimized using dynamic programming?",
"Top-down processing",
"Recursion",
"Automatically resizing arrays",
"Too much free time"
]
},
{
"answer": 3,
"info": [
"mc",
"How many UNIQUE calculations will the Fibonacci sequence implemented make when calculating the 56th number in that sequence? (Disregard when the algorithm just calls storage for already calculated subproblems.)",
"2",
"28",
"56",
"84"
]
},
{
"answer": 1,
"info": [
"mc",
"What is the purpose of dynamic programming?",
"Capitalize on overlapping subproblems by only ever solving a subproblem once",
"Run your program on a dynamically-allocated array, thus speeding up runtime",
"Optimize collaborative programming through dynamic allocation of tasks",
"Break down big problems into smaller subproblems until we eventually reach a base case"
]
}
]
},
"Flood Fill": {
"pts": 13,
"questions": [
{
"answer": 1,
"info": [
"mc",
"What is flood fill?",
"Starting from one point and visiting other nodes by “filling” outward",
"Starting from one point and processing everything about that point (i.e., “filling” up info on it)",
"Overloading a system with as much data as possible",
"Dumping water over your computer"
]
},
{
"answer": 1,
"info": [
"tf",
"True or False: flood fill can be implemented using BFS.",
"True",
"False"
]
},
{
"answer": 2,
"info": [
"tf",
"True or False: Flood fill cannot be implemented using DFS.",
"True",
"False"
]
},
{
"answer": 2,
"info": [
"mc",
"Which of the following tools is most similar to flood fill?",
"Straight-line drawing tool",
"Bucket tool",
"Spambot",
"Color picker"
]
},
{
"answer": 1,
"info": [
"tf",
"True or False: Flood fill can help with filling a bounded region.",
"True",
"False"
]
},
{
"answer": 4,
"info": [
"mc",
"Starting from one node, in a standard flood fill which nodes should you visit?",
"The node 2 to the right",
"The node at the corners of the bounded region",
"Every node that is NOT connected to the selected node",
"Every node that IS connected to the selected node"
]
}
]
},
"Functions": {
"pts": 13,
"questions": [
{
"answer": 3,
"info": [
"mc",
"Which is the following NOT a benefit of using functions?",
"Increases reusability",
"Saves time",
"Harder to debug",
"Decreases complexity"
]
},
{
"answer": 2,
"info": [
"mc",
"What is a parameter in a function?",
"Useless value",
"Input",
"Output",
"Middleput"
]
},
{
"answer": 4,
"info": [
"mc",
"If a function has the “void” keyword in the function definition, what does it return?",
"An integer",
"A boolean value",
"A decimal value",
"Nothing"
]
},
{
"answer": 4,
"info": [
"mc",
"Functions improve…",
"readability",
"shareability",
"encapsulation",
"all of the above"
]
},
{
"info": [
"mc",
"What is the output of this code? <br> def foo(a, b): <br> return b+a <br> print(foo('how are you doing?','Hi, '))",
"how are you doing?Hi,",
"Hi, how are you doing",
"Error: cannot add strings",
"Hello World!"
]
},
{
"answer": "17",
"info": [
"fr",
"What is the output of this code?",
"def foo(a, b, c): <br> return a+b+(2*c) <br> print(foo(3,4,5))",
"Python"
]
},
{
"answer": "good day!",
"info": [
"fro",
"Given the code and its output, fill in the blank:",
"def foo(a, b): <br> return a+b <br>print(foo('Have a ','_______'))",
"> Have a good day!",
"Python"
]
},
{
"answer": "8",
"info": [
"fr",
"What is the output of this code?",
"def pow(a, b): <br> return a**b <br>print(pow(2,3))",
"Python"
]
},
{
"answer": "c",
"info": [
"fro",
"Given this code and its output,fill in the blank.",
"def foo(a, b, ____): <br> return a+b+c <br>print(foo(3,4,5))",
"> 12",
"Python"
]
},
{
"answer": "return",
"info": ["frs", "What keyword is used to exit a function forcibly?"]
}
]
},
"Game Making": {
"pts": 4,
"questions": [
{
"answer": 0,
"info": [
"mc",
"What website is a good place to start making games on?",
"Codeforces",
"Hackerrank",
"Code.org",
"Leetcode"
]
},
{
"answer": 0,
"info": [
"frs",
"The two main components to game design are ___________ and ____________. Seperate answers with a space"
]
},
{
"answer": 0,
"info": [
"mc",
"What function does the design part serve?",
"Codes the functionality of the game",
"Erases unnecessary code",
"Adds visuals to the game",
"Nothing"
]
},
{
"answer": 0,
"info": [
"frs",
"The two ways to code your game in code.org are __________ and _____________. Seperate answers with a space"
]
},
{
"answer": 0,
"info": [
"mc",
"What language is code.org based around?",
"Python",
"Java",
"JavaScript",
"C++"
]
},
{
"answer": 0,
"info": [
"mc",
"Why is text mode recommended for more experienced programmers?",
"Blocks are more visually appealing",
"Syntax can be difficult to remember",
"Text mode is more fun",
"They’re the same"
]
},
{
"answer": 0,
"info": [
"mc",
"Why is code.org beginner friendly?",
"It codes the game for you",
"It provides many useful built-in functions",
"It has no ads",
"It isn’t"
]
},
{
"answer": 0,
"info": [
"mc",
"What does the “onEvent” function do?",
"Runs whatever is inside the function when the event occurs",
"Sets a timer for the event",
"Runs whatever is inside the function regardless of what happens",
"Nothing"
]
},
{
"answer": 0,
"info": [
"mc",
"What is the final project in Ap Computer Science Principles?",
"Make USACO platinum",
"Create a game",
"Create a replica of Minecraft",
"Reach LGM on Codeforces"
]
},
{
"answer": 0,
"info": [
"mc",
"How can you get good at making games?",
"Practice",
"Have natural talent",
"Doign Nothing",
"You can't be good"
]
}
]
},
"Google Maps": {
"pts": 6,
"questions": [
{
"answer": 4,
"info": [
"mc",
"What kind of graph is a map usually represented as?",
"Undirected Unweighted Graph",
"Directed Acyclic Graph",
"Undirected Weighted Tree",
"Directed Weighted Graph"
]
},
{
"answer": 2,
"info": [
"mc",
"An singular road with no intersections between two locations is represented as a _____",
"Node",
"Edge",
"Cycle",
"Path"
]
},
{
"answer": 1,
"info": [
"mc",
"A location on a map is represented as a _____",
"Node",
"Edge",
"Cycle",
"Path"
]
},
{
"answer": 4,
"info": [
"mc",
"A route (possibly consisting of multiple roads) between two locations is known as a _____",
"Node",
"Edge",
"Cycle",
"Path"
]
},
{
"answer": 1,
"info": [
"mc",
"An intersection point between two roads is represented as a _____",
"Node",
"Edge",
"Cycle",
"Path"
]
},
{
"answer": 3,
"info": [
"mc",
"What is the primary difference between a shortest-path algorithm and a pathfinding algorithm?",
"A pathfinding algorithm finds the longest route",
"A shortest-path algorithm uses machine learning to determine the fastest route",
"A pathfinding algorithm uses a heuristic to predict the fastest route",
"A shortest-path algorithm tries every possible route"
]
},
{
"answer": 4,
"info": [
"mc",
"Which is the relationship between the performance of a shortest-path algorithm and a pathfinding algorithm?",
"A shortest path algorithm is always faster",
"A pathfinding algorithm is always faster",
"A shortest path algorithm is usually faster in a realistic context",
"A pathfinding algorithm is usually faster in a realistic context"
]
}
]
},
"Graphs": {
"pts": 7,
"questions": [
{
"answer": 3,
"info": [
"mc",
"What is a graph (in graph theory)?",
"A function - y in terms of x, etc",
"A function specifically in terms of time (something with respect to time, etc.)",
"A collection of nodes connected by edges",
"A collection of nodes"
]
},
{
"answer": 1,
"info": [
"mc",
"What connects nodes in a graph?",
"Edges",
"Connections",
"Links",
"Bridges"
]
},
{
"answer": 1,
"info": [
"tf",
"True or false: you can go both ways across a bidirectional edge.",
"True",
"False"
]
},
{
"answer": 2,
"info": [
"tf",
"True or false: you can go both ways across a directed edge.",
"True",
"False"
]
},
{
"answer": 4,
"info": [
"mc",
"What is true about a graph theory tree?",
"All edges are directed and pointed upward, like tree branches",
"All edges are directed and pointed downward, like tree roots",
"All edges are directed and point toward a center point, like how tree roots collect nutrients (maybe)",
"The number of edges is exactly the number of nodes minus one"
]
},
{
"answer": 2,
"info": [
"mc",
"What does DAG stand for?",
"Directed anticlockwise graph",
"Directed acyclic graph",
"Dijkstra’s acyclic graph",
"DAG acrylic graph"
]
}
]
},
"Greedy": {
"pts": 15,
"questions": [
{
"answer": 2,
"info": [
"mcq",
"What is an algorithm?",
"A mathematical formula",
"A specific set of instructions",
"A problem in your code",
"The header of your code"
]
},
{
"answer": 2,
"info": [
"mcq",
"The goal of a greedy algorithm is to",
"Write the least lines of code",
"Determine the globally optimal solution from locally optimal solutions",
"Write the code in the shortest amount of time",
"Make the most money from your code"
]
},
{
"answer": 1,
"info": [
"mcq",
"Where does the greedy algorithm get its name?",
"The English word “greedy” has a similar meaning to what the algorithm does",
"It created the word “greedy”",
"It was randomly named",