Leetcode 2796. Repeat String
Given a string s and an integer n, return the string formed by concatenating s to itself n times; handle edge cases like n ≤ 0 or empty s and aim for an O(|s|·n) time/space solution (or use built-in repetition where available).
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
0
Hello Interview Premium
Your account is free and you can post anonymously if you choose.