Question: Task 2 Java 8 There is a board made of two rows and N columns. The board is represented by two strings, row 1 and
Task
Java
There is a board made of two rows and columns. The board is represented by two strings, row and row made of characters andor A board is balanced if in each row and in each column, the number of characters is equal to the number of characters For example, the following board is balanced:
RWWR
WRRW
and the following board is not balanced:
WWR
RW
there are two characters and one character in the first row
The question marks can be replaced with or What is the minimum number of replacements needed to balance the board?
Write a function:
class Solution public int solutionString row String row ;
that, given two strings row and row made of characters each, returns the minimum number of replacements needed to balance the board. If it is not possible to balance the board, the function should return
Partly sunny
Search
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
