cracking-the-coding-interview
cracking-the-coding-interview copied to clipboard
Java solutions and explanations to problems in the book Cracking the Coding Interview(6th Edition).
Here: https://github.com/Turingfly/cracking-the-coding-interview/blob/master/src/chapter01ArraysAndStrings/OneAway.java#L37
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: Index -1 out of bounds for length 3 at ctci.RobotInAGrid.getPath1(RobotInAGrid.java:49) at ctci.RobotInAGrid.getPath1(RobotInAGrid.java:56) at ctci.RobotInAGrid.getPath1(RobotInAGrid.java:56) at ctci.RobotInAGrid.getPath1(RobotInAGrid.java:56) at ctci.RobotInAGrid.getPath1(RobotInAGrid.java:41) at ctci.RobotInAGrid.main(RobotInAGrid.java:33) Program RobotInAGrid.java Error Line 70...
https://github.com/Turingfly/cracking-the-coding-interview/blob/efe6d6c5d7d57e64ec876d648e15cf79f98a014f/src/chapter01ArraysAndStrings/ZeroMatrix.java#L59
https://github.com/Turingfly/cracking-the-coding-interview/blob/efe6d6c5d7d57e64ec876d648e15cf79f98a014f/src/chapter01ArraysAndStrings/StringRotation.java#L15 current implementation always returns `true`, even if `s2` contains all different characters: `isRotation("abcd", "1234")` -> `true` it should be: ```java return isSubstring((s1 + s1), s2); ```