Edit Distance Revisited
Sergey has an uppercase Latin letter string S, which he wants to make equal to another uppercase Latin letter string T. However, he is only allowed to do the following kinds of operations on the string S: - To insert a symbol everywhere in the string S at any position. The operation costs I rubles. - To delete a symbol from everywhere of the string S. The operation costs for D rubles. - To r
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start