paradox dragon
2 min read I met three dragons. One always tells the truth, other one always lies and the last one alternates between lie […] Read article
2 min read I met three dragons. One always tells the truth, other one always lies and the last one alternates between lie […] Read article
5 min read Right Rotate an Array by K Elements: Three-Reverse, Cyclic Replacements, and Modulus Tricks Rotating an array by k positions is Read article
5 min read Bayesian Weather Forecasting: How Forecasts Update with Evidence “How do you forecast tomorrow’s weather given today’s observation?” is a classic Read article
2 min read A half is a third of it. What is it? 2026 Update: The Half-Full Glass — Estimation and Fermi Problems Read article
1 min read When was the last year that looked the same upside down? (1961) 2026 Update: Strobogrammatic Numbers — Rotation Invariant Digits Read article
2 min read A book costs $1 plus half its price. How much does it cost? 2026 Update: The Interview Icebreaker — How Read article
4 min read Question: You have two identical eggs. Standing in front of a 100 floor building, you wonder what is the maximum Read article
3 min read Suppose you had a Stack class. Write a new class MaxStack which, in addition to push() and pop(), has a Read article
1 min read How can you get a fair coin toss if someone hands you a coin that is weighted to come up Read article
2 min read What is the most efficient way, memory-wise, to store 1 million phone numbers? Apparently this is an interview question at Read article
3 min read A typical programming interview question is “reverse a string, in place”. if you understand pointers, the solution is simple. even Read article
3 min read Problem: you have 100 doors in a row that are all initially closed. you make 100 passes by the doors Read article
4 min read Problem: you have two jars, 50 red marbles, 50 blue marbles. you need to place all the marbles into the Read article
3 min read problem: two trains enter a tunnel 200 miles long (yeah, its a big tunnel) travelling at 100 mph at the Read article
4 min read Problem: write the definition for this function without using any built-in functions. if pStr is null, return 0. if pStr Read article