GE Vernova Coding OA (2021) | Backtracking Algorithms | On-campus
Question · Posted Jun 2026
Question 1: N - Queens Problem Statement The N-queens puzzle involves placing N queens on an N x N chessboard such that no two queens can attack each other. Given an integer N, display all the unique solutions. Each solution should represent a distinct board configuration with '1' indicating a queen and '0' indicating an empty space. Input Format The first line of input contains T - the number of test cases. It is followed by T lines, each line ...
The full answer & interview discussion are available to premium members.
Log in Create a free account