Search
⌘K

Leetcode 299. Bulls and Cows

Given two equal-length digit strings, return a hint "xAyB" where x is the number of bulls (digits that match in the same position) and y is the number of cows (digits present in both strings but in different positions), properly accounting for duplicate digits so none are double-counted.


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Comments

Your account is free and you can post anonymously if you choose.

Leetcode 299. Bulls and Cows | Hello Interview