Question: Implement a method smallestPerRow that takes as input a two dimensional array of char; finds the char with the smallest value in each row of
Implement a method smallestPerRow that takes as input a two dimensional array of char; finds the char with the smallest value in each row of the original; and returns an array containing the values found. The result at position [0] will be the smallest valued char in row 0 of original. This method does NOT assume that all subarrays of the original are of the same length. Example input: [['e', 'c', T, 'g' 'c' 'e'] ['b' 'b', 'b', 'b'] ['a', 'd'] ['d', 'c'. 'b']] Example output ['c', 'b', 'a', 'b']
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
