Counting 8-bit strings
How many -bit binary strings (each character or ) either begin with a or end with the two characters (or both)?
Show hints (2)+
- Count "begins with 1" and "ends with 00" separately by fixing those bits.
- Subtract the strings satisfying both (inclusion–exclusion).
Answer
Reveal answer →Final answer
160
Create a free account to see the full worked solution and track your progress.
Interview format: Market Maker, Hedge Fund Quant