Queen's Attack II Discussions | Algorithms | HackerRank
  • + 4 comments

    I came up with this as well after running into memory exceptions with my previous solution.

    My first algorithm was to initialize a 2-d byte array with 1s where the obstacles are located. Then I'd start from the queen and count in each direction until I hit a 1.