> For the complete documentation index, see [llms.txt](https://851958789.gitbook.io/notes/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://851958789.gitbook.io/notes/1370_increasing_decreasing_string/slt.md).

# 思路1 桶技术

用一个大小为26的桶统计每个字符出现的次数。然后在从a到z再从z到a把桶里的字符加到res里

|M|是字符集，这里是26

时间复杂度O(len(s) \* |M|) 空间复杂度O(|M|)
