Minimum Time to Revert Word to Initial State II at Sprinklr

Hard35.0% acceptance

This problem has 87.5% frequency at Sprinklr.

Problem Description

You are given a **0-indexed** string `word` and an integer `k`. At every second, you must perform the following operations: * Remove the first `k` characters of `word`. * Add any `k` characters to the end of `word`. **Note** that you do not necessarily need to add the same characters that y...

Read full problem and hints

Topics


More Sprinklr Questions

View all Sprinklr questions