[AtCoder] C - Lining UpRead more
[AtCoder] D - Candidates of No Shortest PathsRead more
[AtCoder] C - Back and ForthRead more
[AtCoder] B - Sum of Three IntegersRead more
[Codeforces] Round #655 (Div. 2) C. Omkar and BaseballRead more
[Codeforces] Round #657 (Div. 2) A. Acacius and StringRead more
[Codeforces] Round #657 (Div. 2) B. Dubious CyrptoRead more
[Codeforces] Round #656 (Div. 3) D. a-Good StringRead more
[Codeforces] Educational Round 92 (Rated for Div. 2) C. Good StringRead more
[LeetCode] Minimum Number of Frogs Croaking

1419. Minimum Number of Frogs Croaking

You are given the string croakOfFrogs, which represents a combination of the string “croak” from different frogs, that is, multiple frogs can croak at the same time, so multiple “croak” are mixed.

Return the minimum number of different frogs to finish all the croaks in the given string.

A valid “croak” means a frog is printing five letters ‘c’, ‘r’, ‘o’, ‘a’, and ‘k’ sequentially. The frogs have to print all five letters to finish a croak. If the given string is not a combination of a valid “croak” return -1.

Read more