Print All Permutations of a String: Recursion, Backtracking, Heap Algorithm
6 min read Print All Permutations of a String: Recursion, Backtracking, and Iterative Heap’s Algorithm Generating all permutations of a string is a […] Read article
Mathematical problems involving probability, combinatorics, and number theory.
6 min read Print All Permutations of a String: Recursion, Backtracking, and Iterative Heap’s Algorithm Generating all permutations of a string is a […] Read article
6 min read Prime Numbers: Sieve of Eratosthenes, Trial Division, and the Miller-Rabin Test Prime number problems appear at FAANG interviews, fintech screens, Read article
4 min read Probability of a Car Passing By: Poisson Process and Inter-Arrival Times “Cars pass a point on a road independently. The Read article
5 min read Probability Distribution Functions: PMF, PDF, CDF, and the Common Distributions Understanding probability distribution functions is foundational for quant trading interviews, Read article
4 min read Problem: you are given a sequence of numbers from 1 to n-1 with one of the numbers repeating only once. Read article
5 min read This is a card trick without the trick. there is no sleight of hand, no tricks up my sleeve, no Read article
4 min read Another well known problem in probability is the Monty Hall problem. You are presented with three doors (door 1, door Read article
1 min read At 6 a.m. a man starts hiking a path up a mountain. he walks at a variable pace, resting occasionally, Read article
2 min read There are three ants on a triangle, one at each corner. at a given moment in time, they all set Read article
3 min read This is difficult to describe in words, so read this carefully, lest there be any confusion. You have a normal Read article
3 min read There is a pot of N noodles. (so there are 2N ends). A person randomly grabs two ends and merges Read article
2 min read A person dies, and arrives at the gate to heaven. there are three doors. one of them leads to heaven. Read article
4 min read Every night, I dump all the change in my pocket into a big bucket. When I buy things, I never Read article
1 min read how many trailing zeroes are there in 100! (100 factorial)? Solution One per factor of 10, and one per factor Read article
2 min read You are an oil mogul considering the purchase of drilling rights to an as yet unexplored tract of land. The Read article