Search⌘ K
AI Features

Custom Sort String

Custom Sort String gives a custom character order and a second string; return a permutation of the second string whose characters follow that order whenever both characters appear.

Statement

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