摘要:
思路: 1.第一次扫描字符串,记录每个字符最后出现的索引。 2.第二次扫描,如果当前索引是该字符的最后出现的索引,则记录当前分割段的长度。 参考: https://discuss.leetcode.com/topic/117141/java-2-pass-o-n-time-o-1-space-ext 阅读全文
摘要:
Given two integers L and R, find the count of numbers in the range [L, R] (inclusive) having a prime number of set bits in their binary representation 阅读全文