Arcesium OA 2023 | Reverse String & Graph Bipartition
arcesium · Question · Posted Jun 2026
Problem 1 - The String Transformer Problem Statement You are given a string s and an integer k. Transform the string using the following rules: For every block of 2k characters, reverse the first k characters. Leave the next k characters unchanged. If fewer than k characters remain, reverse all remaining characters. If at least k but fewer than 2k characters remain, reverse the first k characters and leave the rest unchanged. Return the transformed string. Constraints Constraint 1 ≤ ...
The full answer & interview discussion are available to premium members.
Log in Create a free account