Given a binary string s and a positive integer k, return the length of the longest subsequence of s that represents a binary number less than or equal to k.
Note: The subsequence may contain leading zeros.
Constraints:
s.length
s[i] is either '0' or '1'
k
Given a binary string s and a positive integer k, return the length of the longest subsequence of s that represents a binary number less than or equal to k.
Note: The subsequence may contain leading zeros.
Constraints:
s.length
s[i] is either '0' or '1'
k