Software Development Programmer Interview Questions

33,200 software development programmer 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 1901 - 1910 interview questions

Glassdoor has 33,200 interview questions and reports from Software development programmer interviews. Prepare for your interview. Get hired. Love your job.