Custom Sort String at Amazon
Medium72.3% acceptance
This problem has 37.5% frequency at Amazon.
Problem Description
You are given two strings `order` and `s`. All the characters of `order` are **unique** and were sorted in some custom order previously. Permute the characters of `s` so that they match the order that `order` was sorted. More specifically, if a character `x` occurs before a character `y` in `order`...
Read full problem and hintsTopics
Also asked at 8 companies
More Amazon Questions
Two SumEasyLongest Substring Without Repeating CharactersMediumLRU CacheMediumLongest Palindromic SubstringMediumLongest Common PrefixEasy
View all Amazon questions