摘要: 题目链接:https://leetcode-cn.com/problems/remove-duplicate-letters/ 题目描述: 题解: 1.遍历字符串,记录字符出现次数。 2.定义标记数组,记录字符是否重复出现过。 3.为了确保返回结果的字典序最小,使用单调栈。 class Soluti 阅读全文
posted @ 2021-07-17 21:30 张宵 阅读(84) 评论(0) 推荐(0)