-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbrain.json
More file actions
602 lines (602 loc) · 24.4 KB
/
brain.json
File metadata and controls
602 lines (602 loc) · 24.4 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
[
{
"id": 1,
"category": "logic",
"difficulty": "easy",
"question": "You have two ropes. Each rope takes exactly 60 minutes to burn from end to end, but the burning rate is uneven along the rope. How can you measure exactly 45 minutes using these two ropes and a lighter?"
},
{
"id": 2,
"category": "logic",
"difficulty": "easy",
"question": "You have a 3 liter jug and a 5 liter jug and unlimited water. How can you measure exactly 4 liters of water?"
},
{
"id": 3,
"category": "logic",
"difficulty": "easy",
"question": "A farmer needs to take a wolf, a goat, and a cabbage across a river. His boat can carry only him and one item at a time. If left alone, the wolf eats the goat and the goat eats the cabbage. How can he get all three across safely?"
},
{
"id": 4,
"category": "logic",
"difficulty": "easy",
"question": "You have 8 balls of the same size. One of them is slightly heavier. Using a balance scale, what is the minimum number of weighings needed to find the heavier ball?"
},
{
"id": 5,
"category": "logic",
"difficulty": "easy",
"question": "There are three light switches outside a closed room, and inside the room are three bulbs. Each switch controls exactly one bulb. You may enter the room only once. How can you determine which switch controls which bulb?"
},
{
"id": 6,
"category": "logic",
"difficulty": "easy",
"question": "A man walks into a bar and asks for a glass of water. The bartender pulls out a gun and points it at him. The man says thank you and leaves. What happened?"
},
{
"id": 7,
"category": "logic",
"difficulty": "easy",
"question": "You are in a room with two doors and two guards. One door leads to freedom and one to death. One guard always tells the truth and one always lies. You do not know which is which. You can ask only one yes or no question to one guard. What do you ask to guarantee you pick the door to freedom?"
},
{
"id": 8,
"category": "logic",
"difficulty": "easy",
"question": "How many times do the hands of a clock overlap in a 12 hour period?"
},
{
"id": 9,
"category": "logic",
"difficulty": "easy",
"question": "What is the maximum number of times you can subtract 5 from 25?"
},
{
"id": 10,
"category": "logic",
"difficulty": "easy",
"question": "You have a square. You draw a diagonal. How many triangles does the square get divided into and why?"
},
{
"id": 11,
"category": "probability",
"difficulty": "medium",
"question": "You toss two fair coins. What is the probability that at least one of them is heads?"
},
{
"id": 12,
"category": "probability",
"difficulty": "medium",
"question": "You roll two standard six sided dice. What is the probability that the sum is 7?"
},
{
"id": 13,
"category": "probability",
"difficulty": "medium",
"question": "You draw two cards at random from a standard 52 card deck without replacement. What is the probability that both cards are aces?"
},
{
"id": 14,
"category": "probability",
"difficulty": "medium",
"question": "In a family with two children, you meet one child who is a boy born on a Tuesday. What is the probability that the other child is also a boy?"
},
{
"id": 15,
"category": "probability",
"difficulty": "medium",
"question": "A box contains 3 red balls and 2 blue balls. You draw two balls at random without replacement. What is the probability that they are of different colors?"
},
{
"id": 16,
"category": "probability",
"difficulty": "medium",
"question": "You have two biased coins. Coin A comes up heads with probability 0.6, coin B with 0.3. You choose one coin at random and flip it. The result is heads. What is the probability you chose coin A?"
},
{
"id": 17,
"category": "probability",
"difficulty": "hard",
"question": "You are given two envelopes, each containing a different positive amount of money. You choose one envelope at random. Before opening it, you are allowed to switch envelopes if you wish. Does switching give you any advantage? Why or why not?"
},
{
"id": 18,
"category": "probability",
"difficulty": "hard",
"question": "You have a fair coin. You flip it repeatedly until you see the pattern H T H. What is the expected number of flips required?"
},
{
"id": 19,
"category": "probability",
"difficulty": "hard",
"question": "In the Monty Hall problem, you pick one of three doors. One door has a car and two have goats. The host opens a different door showing a goat and then offers you the chance to switch. Should you switch and why?"
},
{
"id": 20,
"category": "probability",
"difficulty": "hard",
"question": "Three people each flip a fair coin repeatedly until one person gets a head. What is the probability that the first person to get a head is person A?"
},
{
"id": 21,
"category": "combinatorics",
"difficulty": "medium",
"question": "How many distinct permutations are there of the letters in the word BANANA?"
},
{
"id": 22,
"category": "combinatorics",
"difficulty": "medium",
"question": "How many ways can you seat 5 people around a round table if rotations are considered the same arrangement?"
},
{
"id": 23,
"category": "combinatorics",
"difficulty": "medium",
"question": "From a group of 10 people, how many ways can you choose a committee of 3 people?"
},
{
"id": 24,
"category": "combinatorics",
"difficulty": "medium",
"question": "You have 10 distinct books and a shelf that can hold all of them in a row. In how many ways can you arrange the books if two particular books must always be together?"
},
{
"id": 25,
"category": "combinatorics",
"difficulty": "hard",
"question": "How many different 6 character passwords can be formed using the digits 0 to 9 if repetition is allowed but the password cannot start with 0?"
},
{
"id": 26,
"category": "combinatorics",
"difficulty": "hard",
"question": "How many bit strings of length 10 contain exactly four ones no two of which are adjacent?"
},
{
"id": 27,
"category": "combinatorics",
"difficulty": "hard",
"question": "How many ways are there to climb a staircase of n steps if you can take either 1 or 2 steps at a time and the order of steps matters?"
},
{
"id": 28,
"category": "combinatorics",
"difficulty": "hard",
"question": "There are n people in a room. How many handshakes are possible if everyone shakes hands with everyone else exactly once?"
},
{
"id": 29,
"category": "estimation",
"difficulty": "medium",
"question": "Estimate how many piano tuners there are in New York City and explain your reasoning step by step."
},
{
"id": 30,
"category": "estimation",
"difficulty": "medium",
"question": "Estimate how many gas stations are in your country using reasonable assumptions."
},
{
"id": 31,
"category": "estimation",
"difficulty": "medium",
"question": "How many golf balls can fit inside a standard school bus? State your assumptions and approach rather than trying to get an exact number."
},
{
"id": 32,
"category": "estimation",
"difficulty": "medium",
"question": "Estimate the number of windows in a large city. Describe the main factors you would consider."
},
{
"id": 33,
"category": "estimation",
"difficulty": "hard",
"question": "Estimate the number of messages sent per day on a popular chat application with 1 billion active users."
},
{
"id": 34,
"category": "estimation",
"difficulty": "hard",
"question": "Estimate the total number of lines of code running on a modern passenger airplane during flight."
},
{
"id": 35,
"category": "lateral_thinking",
"difficulty": "easy",
"question": "A man pushes his car to a hotel and then tells the owner he is bankrupt. What is going on?"
},
{
"id": 36,
"category": "lateral_thinking",
"difficulty": "easy",
"question": "A man is found dead in a room with 53 bicycles. What happened?"
},
{
"id": 37,
"category": "lateral_thinking",
"difficulty": "easy",
"question": "A truck is stuck under a low bridge. Many people try to pull it out with no success. A child walks by and solves the problem immediately. What does the child suggest?"
},
{
"id": 38,
"category": "lateral_thinking",
"difficulty": "medium",
"question": "You are in a dark room with a candle, a wood stove, and a gas lamp. You only have one match. What do you light first?"
},
{
"id": 39,
"category": "lateral_thinking",
"difficulty": "medium",
"question": "A man lives on the 10th floor of a building. Every day he takes the elevator down to the ground floor to go to work. When he comes back, he takes the elevator to the 7th floor and walks the rest of the way unless it is raining. Then he goes all the way to the 10th floor. Why?"
},
{
"id": 40,
"category": "lateral_thinking",
"difficulty": "medium",
"question": "A father and his son are in a car accident. The father dies at the scene. The boy is rushed to the hospital for surgery. The surgeon looks at the boy and says I cannot operate on this boy, he is my son. How is this possible?"
},
{
"id": 41,
"category": "lateral_thinking",
"difficulty": "hard",
"question": "You are in a room with no windows and three switches controlling three bulbs in another room you cannot see. You can flip the switches any way you like and then may enter the bulb room only once. How do you determine which switch controls which bulb if the bulbs take time to cool down after being lit?"
},
{
"id": 42,
"category": "lateral_thinking",
"difficulty": "hard",
"question": "You are standing on one side of a river with a fox, a chicken, and a bag of grain. You have a boat that can carry only one of them at a time across the river. The fox will eat the chicken, and the chicken will eat the grain if left together without you. How do you get all three across safely?"
},
{
"id": 43,
"category": "numbers",
"difficulty": "easy",
"question": "What is the next number in the sequence 2, 4, 8, 16, 32, ? Explain your reasoning."
},
{
"id": 44,
"category": "numbers",
"difficulty": "easy",
"question": "What is the next number in the sequence 1, 1, 2, 3, 5, 8, ? Explain your reasoning."
},
{
"id": 45,
"category": "numbers",
"difficulty": "medium",
"question": "What is the next number in the sequence 3, 9, 27, 81, ? Explain your reasoning."
},
{
"id": 46,
"category": "numbers",
"difficulty": "medium",
"question": "What is the next number in the sequence 1, 4, 9, 16, 25, ? Explain your reasoning."
},
{
"id": 47,
"category": "numbers",
"difficulty": "medium",
"question": "What is the next number in the sequence 2, 3, 5, 7, 11, ? Explain your reasoning."
},
{
"id": 48,
"category": "numbers",
"difficulty": "hard",
"question": "What is the next number in the sequence 1, 2, 4, 7, 11, 16, ? Explain a pattern that fits."
},
{
"id": 49,
"category": "numbers",
"difficulty": "hard",
"question": "What is the next number in the sequence 10, 4, 20, 9, 30, 14, ? Explain your reasoning."
},
{
"id": 50,
"category": "numbers",
"difficulty": "hard",
"question": "What is the next number in the sequence 2, 6, 12, 20, 30, ? Explain your reasoning."
},
{
"id": 51,
"category": "geometry",
"difficulty": "easy",
"question": "You have a square cake. What is the minimum number of straight cuts needed to divide it into 8 equal sized pieces?"
},
{
"id": 52,
"category": "geometry",
"difficulty": "easy",
"question": "A rectangular field is 100 meters by 50 meters. How many meters is the diagonal approximately?"
},
{
"id": 53,
"category": "geometry",
"difficulty": "medium",
"question": "A circular pizza is cut into 8 equal slices. If the radius is 10 centimeters, what is the area of one slice?"
},
{
"id": 54,
"category": "geometry",
"difficulty": "medium",
"question": "Two trains are 300 kilometers apart and travel toward each other at 60 and 40 kilometers per hour respectively. A bird flies back and forth between them at 80 kilometers per hour starting from the first train until the trains meet. How far does the bird travel?"
},
{
"id": 55,
"category": "geometry",
"difficulty": "hard",
"question": "A rope is tightly wrapped around the Earth at the equator. You add 1 meter to the length of the rope and raise it evenly all around the Earth. Roughly how high above the surface is the rope now?"
},
{
"id": 56,
"category": "geometry",
"difficulty": "hard",
"question": "You have a cube. If you paint all six faces and then cut the cube into 27 smaller cubes by dividing each edge into three segments, how many of the small cubes have exactly two painted faces?"
},
{
"id": 57,
"category": "logic",
"difficulty": "medium",
"question": "You have 12 coins, one of which is counterfeit and has a different weight, though you do not know if it is heavier or lighter. Using a balance scale, what is the minimum number of weighings needed to identify the counterfeit coin and whether it is heavier or lighter?"
},
{
"id": 58,
"category": "logic",
"difficulty": "medium",
"question": "There are 100 lockers in a hallway, all initially closed. One person toggles every locker. A second person toggles every second locker. A third toggles every third locker, and so on until 100 people have toggled. Which lockers remain open at the end?"
},
{
"id": 59,
"category": "logic",
"difficulty": "medium",
"question": "You are given a list of n plus 1 integers where each integer is between 1 and n inclusive. At least one integer is repeated. Without modifying the list and using only constant extra space, how can you find a repeated number?"
},
{
"id": 60,
"category": "logic",
"difficulty": "hard",
"question": "You have 25 horses and a track on which you can race at most 5 horses at a time. There is no timing system. What is the minimum number of races needed to determine the three fastest horses?"
},
{
"id": 61,
"category": "logic",
"difficulty": "hard",
"question": "You have 3 boxes. One contains only apples, one only oranges, and one a mix of apples and oranges. All are incorrectly labeled. You can pick one fruit from one box at a time. What is the minimum number of picks needed to determine the correct labels for all three boxes?"
},
{
"id": 62,
"category": "logic",
"difficulty": "hard",
"question": "There are three suspects for a crime: Alice, Bob, and Carol. Exactly one of them is guilty. Alice says Bob is guilty. Bob says Carol is guilty. Carol says Bob is lying. If only the guilty person lies, who is guilty?"
},
{
"id": 63,
"category": "puzzle",
"difficulty": "easy",
"question": "Which weighs more, a kilogram of feathers or a kilogram of steel?"
},
{
"id": 64,
"category": "puzzle",
"difficulty": "easy",
"question": "You have a single piece of paper. How many times can you fold it in half?"
},
{
"id": 65,
"category": "puzzle",
"difficulty": "easy",
"question": "What gets wetter the more it dries?"
},
{
"id": 66,
"category": "puzzle",
"difficulty": "medium",
"question": "You see a boat filled with people, yet there is not a single person on board. How is this possible?"
},
{
"id": 67,
"category": "puzzle",
"difficulty": "medium",
"question": "A grandfather, two fathers, and two sons enter a room, but there are only three people. How is that possible?"
},
{
"id": 68,
"category": "puzzle",
"difficulty": "medium",
"question": "A man looks at a painting and says, Brothers and sisters I have none, but that man’s father is my father’s son. Who is in the painting?"
},
{
"id": 69,
"category": "puzzle",
"difficulty": "hard",
"question": "You have 9 identical looking coins. One of them is heavier than the others. Using a balance scale, what is the minimum number of weighings needed to find the heavier coin?"
},
{
"id": 70,
"category": "puzzle",
"difficulty": "hard",
"question": "You have two hourglasses, one measuring 7 minutes and one measuring 11 minutes. How can you measure exactly 15 minutes using only these hourglasses?"
},
{
"id": 71,
"category": "logic",
"difficulty": "easy",
"question": "You are running in a race and you pass the person in second place. What place are you in now?"
},
{
"id": 72,
"category": "logic",
"difficulty": "easy",
"question": "If five machines take five minutes to make five gadgets, how long will 100 machines take to make 100 gadgets, assuming all machines work at the same rate?"
},
{
"id": 73,
"category": "logic",
"difficulty": "medium",
"question": "It is currently 3 o'clock. What is the angle between the hour and minute hands on a clock?"
},
{
"id": 74,
"category": "logic",
"difficulty": "medium",
"question": "How many squares are there in an 8 by 8 chessboard if you count squares of all possible sizes?"
},
{
"id": 75,
"category": "logic",
"difficulty": "hard",
"question": "In a tournament, every player plays every other player exactly once. A win gives 3 points, a draw 1 point to each player, and a loss 0. Is it possible for three players to all end up with the same total number of points without having identical match results? Explain."
},
{
"id": 76,
"category": "logic",
"difficulty": "hard",
"question": "You have an infinite 2D grid of squares and a robot starting at the origin. The robot can move one step up, down, left, or right. How many distinct paths of length n return the robot to the origin?"
},
{
"id": 77,
"category": "probability",
"difficulty": "medium",
"question": "Two people each pick a random real number between 0 and 1 uniformly. What is the probability that their numbers differ by less than 0.2?"
},
{
"id": 78,
"category": "probability",
"difficulty": "medium",
"question": "Three friends arrive at a cafe independently and each chooses a random time between 5 and 6 pm to arrive, staying for 20 minutes. What is the probability that at least two of them are in the cafe at the same time?"
},
{
"id": 79,
"category": "probability",
"difficulty": "hard",
"question": "You roll a fair six sided die repeatedly until you roll the same number twice in a row. What is the expected number of rolls?"
},
{
"id": 80,
"category": "probability",
"difficulty": "hard",
"question": "There are three boxes. One contains two gold coins, one contains two silver coins, and one contains one gold and one silver coin. You choose a box at random and pull out one coin and it is gold. What is the probability that the other coin in that box is also gold?"
},
{
"id": 81,
"category": "estimation",
"difficulty": "medium",
"question": "Estimate how many smartphones are sold in the world per year and describe your assumptions."
},
{
"id": 82,
"category": "estimation",
"difficulty": "medium",
"question": "Estimate the number of cups of coffee consumed per day in a large tech company with 10,000 employees."
},
{
"id": 83,
"category": "estimation",
"difficulty": "hard",
"question": "Estimate the total storage needed to store one day of logs for a system that serves 100 million requests per day, assuming each request generates 1 kilobyte of log data plus overhead."
},
{
"id": 84,
"category": "estimation",
"difficulty": "hard",
"question": "Estimate the bandwidth needed to support a video conferencing system with 10,000 concurrent users in high definition."
},
{
"id": 85,
"category": "lateral_thinking",
"difficulty": "medium",
"question": "You see a digital clock displaying the correct time but its battery died yesterday. How can it still show the correct time twice a day?"
},
{
"id": 86,
"category": "lateral_thinking",
"difficulty": "medium",
"question": "You go into a room that contains a single match, an oil lamp, a candle, and a fireplace. Which do you light first?"
},
{
"id": 87,
"category": "lateral_thinking",
"difficulty": "hard",
"question": "You are blindfolded in a room with a large table containing 100 coins. You are told that exactly 20 of them are heads and 80 are tails, but you cannot see or feel the difference between heads and tails. How can you split the coins into two piles so that both piles contain the same number of heads?"
},
{
"id": 88,
"category": "lateral_thinking",
"difficulty": "hard",
"question": "Four people need to cross a bridge at night with one flashlight. The bridge can hold at most two people at a time and the flashlight must be carried with anyone crossing. Each person walks at a different speed and when two walk together they move at the slower pace. How do you get everyone across in the minimum possible time?"
},
{
"id": 89,
"category": "logic",
"difficulty": "medium",
"question": "There are n people in a circle and every second person is eliminated repeatedly until only one remains. This is known as the Josephus problem. For a given n, how can you determine the position of the survivor?"
},
{
"id": 90,
"category": "logic",
"difficulty": "medium",
"question": "You have an unsorted array of n integers where every element appears exactly twice except for one which appears only once. How can you find the unique element using linear time and constant extra space?"
},
{
"id": 91,
"category": "logic",
"difficulty": "hard",
"question": "You are given a 100 story building and two identical eggs. The eggs will break if dropped from a certain floor or above and will not break below that floor. What is the minimum number of drops needed in the worst case to determine the highest floor from which you can drop an egg without breaking it?"
},
{
"id": 92,
"category": "logic",
"difficulty": "hard",
"question": "You have a large file containing billions of integers that does not fit into memory and you need to determine if there are any duplicates. How would you approach this problem conceptually?"
},
{
"id": 93,
"category": "puzzle",
"difficulty": "medium",
"question": "A snail climbs a 10 meter wall. Each day it climbs 3 meters, but each night it slides back 2 meters. How many days does it take to reach the top?"
},
{
"id": 94,
"category": "puzzle",
"difficulty": "medium",
"question": "You buy a shirt for 10, sell it for 20, then buy it back for 30, and finally sell it again for 40. What is your total profit?"
},
{
"id": 95,
"category": "puzzle",
"difficulty": "hard",
"question": "You have two sticks of the same length. One burns completely in 30 minutes and the other in 45 minutes, but both burn at variable rates along their length. Using only these sticks and a lighter, how can you measure exactly 15 minutes?"
},
{
"id": 96,
"category": "puzzle",
"difficulty": "hard",
"question": "Two trains start at the same time from stations A and B, which are 100 kilometers apart, and travel toward each other at speeds of 20 and 30 kilometers per hour respectively. A fly starts at station A flying at 50 kilometers per hour toward station B, turns around when it reaches each train, and continues back and forth until the trains meet. How far does the fly travel?"
},
{
"id": 97,
"category": "numbers",
"difficulty": "medium",
"question": "What is the sum of the integers from 1 to 100 and how can you compute it quickly without adding them all one by one?"
},
{
"id": 98,
"category": "numbers",
"difficulty": "medium",
"question": "How many trailing zeros are there in 100 factorial?"
},
{
"id": 99,
"category": "numbers",
"difficulty": "hard",
"question": "Given a positive integer n, how can you determine whether it is a power of 2 using bit operations?"
},
{
"id": 100,
"category": "numbers",
"difficulty": "hard",
"question": "You are given an unsorted array of integers. How can you find the maximum product of any three numbers in O(n) time?"
}
]