Student Representative Interview Questions

37,479 student representative interview questions shared by candidates

Given an NXN array, filled with battleships that can only be horizontal or vertical, count how many battleships are there in the board. The battleships will always have at least one horizontal/vertical space between them. Solution should be with no extra memory, one pass, and without changing the board.
avatar

Student Software Development Engineer

Interviewed at Microsoft

4
Oct 29, 2016

Given an NXN array, filled with battleships that can only be horizontal or vertical, count how many battleships are there in the board. The battleships will always have at least one horizontal/vertical space between them. Solution should be with no extra memory, one pass, and without changing the board.

Viewing 1341 - 1350 interview questions

Glassdoor has 37,479 interview questions and reports from Student representative interviews. Prepare for your interview. Get hired. Love your job.