← All problemsSign in

Word Dealer

Sonny the robot can only speak words that he has stored in his memory.But he has now run out of memory space and he has to forget a word to learn a new word. So, he goes to the Word Dealer who takes the word he knows and gives him the word he wants for a price. The price is determined by a 26 x 26 matrix containing non-negative entries. The entry (i , j) denotes the cost of replacing the ith alpha

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.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start