Hi, can anyone give me the algorithm for cows and bulls game which takes minimum number of passes to guess a 4-digit number? regards