Custom Order String
Medium
Custom Sorting Rules
Given a string 'order' with distinct letters and a string s, sort s so letters appearing in order come first in that sequence; other letters follow in any order (print them in alphabetical order for this problem).
Constraints
1 <= |order|, |s| <= 200
Discussion
No discussions yet.
Shalyam Support
Hi! Ask us anything — we'll reply on WhatsApp or Telegram within 24 hours.