I am really confused on how Layton's solution worked in Atbash Cypher problem. The solution works only when all characters are alphabets and in lower case strictly. It is not even passing the example given. I am not sure how it passed all the testcases.
@@bhuvansharma6979 Yes you are correct but that was not my question or concern. In the example, 0 is given then it should be False but in the example itself is expecting True as an answer. So, here I am not questioning the solution given by the winner but the question itself. Because Anton is checking and the tests passed but the example given is expecting wrong answer.
I am really confused on how Layton's solution worked in Atbash Cypher problem. The solution works only when all characters are alphabets and in lower case strictly. It is not even passing the example given. I am not sure how it passed all the testcases.
You're right it won't work for uppercases and non-alphabets ...maybe the test cases were designed in such a way that he luckily got through with this
May I know in Sudoku problem set, how the example is return True if there is no 5 in the matrix?
Yeah I’m quite confused by that game. They said maybe 0 is allowed as a “space” in the sudoku. But nothing in the question says that.
@@ThomasGiles But even though, the Anton is checking whether the number is less than 1 or greater than 9 here at 1:06:45 and he got all tests passed.
@@sohantirpude2455But he is returning false in case it is less than 1 or greater than 9 which is correct
@@bhuvansharma6979 Yes you are correct but that was not my question or concern. In the example, 0 is given then it should be False but in the example itself is expecting True as an answer. So, here I am not questioning the solution given by the winner but the question itself. Because Anton is checking and the tests passed but the example given is expecting wrong answer.
@@sohantirpude2455 oh my bad I didn't see the example test cases probably some error from their end if the question was solved from 1-9 constraint
Hackers isn’t any good? Are you insane?!
def Solution(a):
return a[::-1] == a
My java solution: return string.equals(new StringBuilder(string).reverse().toString());
Easy