Two strings hold the same distinct characters in different orders. How many swaps of neighbouring characters turn one into the other? A Verily phone-screen question.
Two strings hold the same distinct characters in different orders. How many swaps of neighbouring characters turn one into the other? A Verily phone-screen question.
The discussion opens with the full question.