Given two equal-length uppercase strings A and B, find the minimum number of moves that bring a chosen character to the front of A so that A becomes B, or -1 if impossible.
Medium5StringGreedyTwo pointersHash mapInterviewNo attempts yetTime limit2sMemory limit512 MB