Description
Given a binary string S
(a string consisting only of ‘0’ and ‘1’s) and a positive integer N, return true if and only if for every integer X from 1 to N
, the binary representation of X
is a substring of S
.
给定一个二进制字符串 S
(一个仅由若干 ‘0’ 和 ‘1’ 构成的字符串)和一个正整数 N
,如果对于从 1 到 N 的每个整数 X,其二进制表示都是 S 的子串,就返回 true
,否则返回 false
。
题目链接:https://leetcode.com/problems/partition-array-into-three-parts-with-equal-sum/