Construct String With Repeat Limit at Arista Networks

Medium70.9% acceptance

This problem has 100.0% frequency at Arista Networks.

Problem Description

You are given a string `s` and an integer `repeatLimit`. Construct a new string `repeatLimitedString` using the characters of `s` such that no letter appears **more than** `repeatLimit` times **in a row**. You do **not** have to use all characters from `s`. Return _the**lexicographically largest**...

Read full problem and hints

Topics

Also asked at 5 companies


More Arista Networks Questions

View all Arista Networks questions