Skip to main content
Admissions guidance, study banks, and career tools — get started on Shalyam

Custom Order String

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.

Rewards · v2.1

Get Exclusive Insights with Every Issue

Join Shalyam Newsletter

Stay ahead in education, research, and innovation—straight to your inbox.