Question: Please code in java Colored Stones There are two coloured stones, namely Yellow and Blue. Total of N stones is/are placed in this Stony World.
Please code in java

Colored Stones There are two coloured stones, namely Yellow and Blue. Total of N stones is/are placed in this Stony World. You are fond of collecting stones of both colours, but you stop to do so when only 1 type of stone is left. Find the number of stones you can pick Input Format: The first line contains an integer N, denoting the number of stones. The second line contains a string denoting the stones in the order they are kept in front of you. (Y for yellow stone, B for Blue stone) Constraints: 1
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
