Question: Codility Interview Reschedule Reques static class Task ( int du : . app.codility.com / c / run / XQHB 3 K - EQM / Microsoft

Codility
Interview Reschedule Reques
static class Task
(int du
:.
app.codility.com/c/run/XQHB3K-EQM/
Microsoft Office H...
Scheduledata
Exchange_Mail
News
Translate
E Mrorsoth
1
Task 1
Files
2
There is a board of size NM(represented by an array board consisting of strings). Rows are numbered from 0 to N-1(from top to bottom) and columns are numbered from 0 to M-1(from left to right). Each cell is either empty (denoted by '.') or contains a letter A or B. The cell in the R-th row and C-th column is represented by board [R][C].
Calculate the number of rectangles inside the board with a corner at position (0,0)(board [0][0]) which cover an equal number of letters A and B.
For example, for board =["AB.","BY.",".. A"], there are five such rectangles:
the first row without the last element (marked in the picture below);
the whole first row;
symmetrically, the whole first column (marked below) and the first column without the last element;
the whole board.
\table[[,0,1,2],[,A,B,],[,B,.,*
 Codility Interview Reschedule Reques static class Task (int du :. app.codility.com/c/run/XQHB3K-EQM/

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!