یک جمله داده شده که اعدادی درون هر کلمه قرار دارند و نشاندهندهی موقعیت آن کلمه در جمله هستند.
جمله را مرتب کنید و خروجی صحیح را برگردانید.
نمونه ورودی و خروجی
Rearrange("is2 Thi1s T4est 3a") ➞ "This is a Test"
Rearrange("4of Fo1r pe6ople g3ood th5e the2") ➞ "For the good of the people"
Rearrange(" ") ➞ " "
نکات:
- فقط اعداد 1 تا 9 درون کلمات استفاده خواهند شد.
Rearrange("is2 Thi1s T4est 3a") ➞ "This is a Test"
Rearrange("4of Fo1r pe6ople g3ood th5e the2") ➞ "For the good of the people"
Rearrange(" ") ➞ " "
نظرات