Algorithm · OpenAI · Medium
A row of microorganisms is laid out from left to right. Each one has a family, given by a single letter, and a positive integer size. You receive two arrays of equal length, families and sizes, describing the row. Simulate the feeding process until nothing more can happen, then report the family and size of the single biggest individual microorganism left in the row. Note that you report the largest individual, not the combined size of a family. Simulation rules A…