Re: [閒聊] 每日leetcode

作者: Rushia (みけねこ的鼻屎)   2024-03-11 09:41:38
https://leetcode.com/problems/custom-sort-string/description
791. Custom Sort String
給你一個字串s和一個表示字元排序優先的字串order,排序字串s,如果字元不在 order
的話順序隨意。
思路:
1.創建一個基於order索引的comparator丟給排序函數
py code
作者: sustainer123 (caster)   2024-03-11 09:46:00
大師

Links booklink

Contact Us: admin [ a t ] ucptt.com