You are given a string s of lowercase English letters.
Rearrange it as follows:
s in the order of their first occurrence.Return the resulting string.
Input: s = "cccabbbbcca"
Output: "cabcabcbcbc"
Explanation: First-occurrence order is c, a, b with counts c×5, a×2, b×4.
Rounds: "cab", "cab" (a is used up), "cb", "cb" (b is used up), "c".
Concatenated: "cabcabcbcbc".
Input: s = "zzz"
Output: "zzz"
Explanation: One distinct character; every round emits a single z.
s.length ≤105s consists of lowercase English letters