|
|
Hi, I have submitted one solution with: new String("0").repeat(n) => n is one number, and the system not know repeat method for Java 1.8, what's about that?! It's core Java. Thanks, Jose input : 3 answer : 1110001011 Edited by author 21.02.2014 00:33 Please, give me some hints and idea. I write bruteForce but i see no hints. Only random 0 and 1. Length of the answer is 2^n + n - 1, it can be constructed with brute-force Thank you. Please, give me more hints. =) Above hint is more than enough to solve it. The only possible latest hint: during BF, when construct a sequence, think how to check in O(1) that the new suffix of length n didn't occur in the sequence before. |
|
|