LeetCode 第201次周赛 1545 Find Kth Bit in Nth Binary String
LeetCode 1545. Find Kth Bit in Nth Binary String题目描述思路这里简单证明一下长度是指数增长的利用构造对称性代码对称位置的计算问题代码最后一步的异或操作复杂度分析
题目描述
Given two positive integers n and k, the binary string SnS_nSn is formed as follows:
S1="0"S_1 = "0"S1="0"
Si=Si−1+"1"+reverse(invert(Si−1))S_i
原创
2020-08-10 04:27:51 ·
114 阅读 ·
0 评论