Find Kth Bit in Nth Binary String

Medium

📝 Description

Find the kth bit in the nth binary string sequence

Input Format

Integers n and k

Output Format

kth bit as character

Constraints

1 ≤ n ≤ 20 1 ≤ k ≤ 2^n - 1

🔍 Sample Input

3
1
            

✅ Sample Output

"0"
            

Code Editor

Please login to run and submit code.

Shortcuts: Ctrl+Enter to submit, Ctrl+Shift+R to run