Search⌘ K
AI Features

Custom Sort String

Custom Sort String gives an ordered string and another string; return a permutation where characters appearing in the order string follow its relative order, while other characters may appear anywhere.

Statement

Given two strings, order and s, where all characters in order are ...