Search
⌘K
Get Premium
Leetcode 779. K-th Symbol in Grammar
Given a binary sequence that evolves each row by replacing 0→01 and 1→10 (so row lengths double each time), return the k-th symbol in the n-th row without constructing the full row. The challenge is to use the parent-child recursion or bit-parity of flips (rather than building the string) to determine the symbol efficiently.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.