← Microsoft questions

Check divisibility of binary stream by n

Filed under Microsoft

Given an infinite stream of binary digits (bits arriving one by one) and a target integer n, determine at any point whether the binary number formed so far is divisible by n.

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Microsoft questions

Collected from public candidate posts and coding forums. Updated Nov 2026.