Summer Sale
Limited Time Deal: Unlock all premium questions for over 30% off
$10.42$7.08
14
:
03
:
47
:
45
Back to Dashboard
Digit Replacement Maximizer
Medium
A numeric optimization system performs exactly k substitution operations on a number string s. In each operation, choose any digit in s that is not "7" and replace it with "7". Find the largest possible number after performing exactly k operations.
If it is impossible to perform exactly k operations (because there are fewer than k non-"7" digits), return an empty string.
...
OfferRetriever
Master technical interviews with real questions from top companies. Build your confidence and career.
LEGAL
© 2026 Purple Business Holdings LLC. All rights reserved. See Terms of Service.