Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started