The code-breaking mind game of Bulls & Cows, where you need to guess a 4 digit number.
Android decides a 4 digit secret number (digits could be repeated and the number may start with zeroes) and you need to guess this 4 digit number with the help of bulls and cows. Take a guess, enter a 4 digit number and Android will tell you how many bulls and cows exist in your guess.
What is a bull? If a correct digit exists in your guess and it is in the correct position in the number, then it is a bull.
What is a cow? If a correct digit exists but not in its correct position, then it is a cow.
Secret number - 5731
Your guess - 5678
Bulls = 1 (The digit 5 is at its correct position)
Cows = 1 (The digit 7 exists in the secret number but not at its correct position)
Secret number - 0409
Your guess - 1904
Bulls = 1 (The digit 0 is at its correct position)
Cows = 2 (The digits 4 & 9 exist in the secret number but not at their correct positions)
Note: 0 in the above guess is only shown as a Bull since it was matched to a bull first. If your guess had 2 zeros, it would match both.
The idea therefore is to have 4 Bulls and 0 Cows (all 4 digits in the correct positions)
Learn from each of your guesses and arrive at the secret number! You have 10 chances to find the secret number!