Leetcode 2311. Longest Binary Subsequence Less Than or Equal to K
Find the longest subsequence of a binary string s whose interpreted integer value is ≤ k. The core challenge is maximizing length by exploiting free zeros and carefully choosing a small number of significant ones (usually from the least-significant side) so the resulting binary value stays within k.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
0
Hello Interview Premium
Your account is free and you can post anonymously if you choose.