Today I only studied a little bit. I had too much other stuff to do. But I did manage to find a nice brain teaser from GeeksForGeeks.org.
Imagine a champagne pyramid, but in only two dimensions. Like this:
Level 1: 1 Level 2: 1 2 Level 3: 1 2 3
Of course, we could have as many levels of this "pyramid" as we liked.
All the glasses are the same. When you overfill Level 1 glass 1, the overflow goes half to the left (Level 2 glass 1) and half to the right (Level 2 glass 2). Every time a glass is overfilled, half the overflow goes to the left and half to the right.
Find a method to tell me how much champagne is in any glass, when I tell you how much I poured into the top glass.
For instance, if I say I poured 4 glassfuls, and I want to know about Level 3 glass 3, you'd tell me it had 0.25 glassfuls.Continue reading "Interview Prep Day 2: Studying and Champagne " »