Queen's Attack II Discussions | Algorithms | HackerRank
  • + 1 comment

    the logic is simple you move the queen in the eight directions [(1,0),(0,1),(-1,0),(0,-1),(1,1),(-1,-1),(-1,1),(1,-1)], [right,up,left,down,right up,left down,left up,right down] untill you hit the end of the board or an obstacle and count each step