MongoDB interview question

I was asked about run length encoding and implementing it on a shared screen.

Interview Answer

Anonymous

17 Mar 2021

Typical answer where we iterate over the string and increase count whenever i == i+1 and add count next to the letter