Merge every run of K identical cars repeatedly and return the final arrangement.
Unlock detailed company stats for this questionUpgrade
You are given a list of car names. You can merge K cars together, and after a merge the process can repeat. Return the final arrangement of the cars.
Example: Honda, Honda, Maruti, Maruti, Maruti, BMW, Maruti, Maruti, Maruti with K=2 gives Honda, Maruti, BMW, Maruti.
Format · Phone screen.
Community answers
No answers contributed by the community yet.
Related questions
Find the k-th largest element in an array and return its index.Related courses

Course

Course
Course
