I don't why the
[aaaaaa....aaa] test case is put there, I tried all of the algorithms with high ranking and none of them could beat the TLE.
It's same thing that so frustrative that sometimes, the MAX_VALUE and MIN_VALUE show up in the test case.
Any one get any idea that how to pass the new test cases?
You must have done something wrong. I just tried the top-voted solution and it got accepted just fine (just had to adapt to the new signature of course, i.e., change
@StefanPochmann Hi Stefan, could you post the url for Java solution? I tried the first several Java solutions and none of them pass the test....
@lsy1991121 This one: https://discuss.leetcode.com/topic/27855/my-concise-java-solution-based-on-memorized-dfs
What's the URL of the highest-voted you tried?
@StefanPochmann this passed. I didn't remember I have tried this solution before. Thanks anyway.
Looks like the test suite has preference to dfs+memorization. ;)
Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.