Infosys Interview Question

Asked to solve coding question:-Number of battles in given 2d array