Probability of cutting a rope into three pieces such that the sides form a triangle

Given a rope. We have to find the probability of cutting a rope into 3 pieces such that they form a triangle. Answer: 0.25 Explanation:… Read More »

Puzzle | Is it Raining

A Geek is about to get a plane to Hyderabad. Geek wants to know if it’s raining. Geek calls 3 random friends staying at Hyderabad… Read More »

Probability that the pieces of a broken stick form a n sided polygon

We have a stick of length L. The stick got broken at (n-1) randomly chosen points (lengths of parts can be non-integer or floating point… Read More »

Probability of rain on N+1th day

Given an array of 1 and 0’s, where Ai = 1 denotes that ith day was a rainy day and Ai = 0 denotes it… Read More »

Find the probability of reaching all points after N moves from point N

Given N which denotes the initial position of the person on the number line. Also given L which is the probability of the person of… Read More »

Maximizing Probability of one type from N containers

Given N containers consisting of N copies of number A and N copies of number B. We need to arrange the numbers in the N… Read More »

Probability for three randomly chosen numbers to be in AP

Given a number n and an array containing 1 to (2n+1) consecutive numbers. Three elements are chosen at random. Find the probability that the elements… Read More »

Probability of reaching a point with 2 or 3 steps at a time

A person starts walking from position X = 0, find the probability to reach exactly on X = N if she can only take either… Read More »

Select a Random Node from a tree with equal probability

Given a Binary Tree with children Nodes, Return a random Node with equal Probability of selecting any Node in tree. Consider the given tree with… Read More »

Probability of choosing a random pair with maximum sum in an array

Given an array of N integers, You have to find the probability of choosing a random pair(i, j), i < j such that A[i] +… Read More »

Probability of a random pair being the maximum weighted pair

Given two arrays A and B, a random pair is picked having an element from array A and another from array B. Output the probability… Read More »

Prosecutor’s Fallacy

Prosecutor’s fallacy is a very famous but neglected application of Baye’s rule. Prosecutor’s fallacy is a fallacy in statistical reasoning. This very famous problem uncovers… Read More »