Intuit | Technical 1 (Zoom) | Checksum

Difficulty: EASYCategory: InterviewExperienceFrequency: 1Asked On 2022-04-26Added By Anonymous
Source: Link

I was asked this coding question for SE2 role with an Intuit.

•Given a string "5 7 8 9 \n 8 7 6 \n 4 5 6", differentiate rows from \n and find the largest and smallest number and return a sum of the largest and smallest numbers for each row. Return sum of all the numbers from each row.


Input: "5 7 8 9 \n 8 7 6 \n 4 5 6"

{14, 14, 10} - Return sum of all the numbers in an array


Output: 38


How would you approach solution for this problem. Any suggestions would be appreciated.

Comments