Algorithm · SoFi · Easy
Problem: Determine the Runner-Up Tag Frequency in a Flat String Array You receive a string array arr arranged as repeating three-item records: In other words, each consecutive group of three represents an id, a name, and a tag. Compute how often each tag occurs, then return the tag with the second-largest frequency. Rules / Edge Cases Return the following value when a second-highest tag does not exist—for instance, when every tag occurs equally often or when there is just…
Checking your access…