Code
The highlighted line runs next. The pill shows the live values in the running call.
Cost
Work done so far, and how the three solutions compare
The string
Green = keep, orange = would be replaced
The highlighted line runs next. The pill shows the live values in the running call.
Work done so far, and how the three solutions compare
Green = keep, orange = would be replaced
Keyboard: ← → step, Space play or pause. s is 1 to 14 uppercase letters and 0 ≤ k ≤ len(s). In solution 2 the order letters are tried in depends on the set (it differs between Python, Java and C++); the page uses order of first appearance, and the answer is the same either way.