力扣 第314场周赛 Q3 使用机器人打印字典序最小的字符串【难度:中等,rating: 1953】(栈+贪心)
题目链接https://leetcode.cn/problems/using-a-robot-to-print-the-lexicographically-smallest-string/题目来源于:第314场周赛Q3rating:1953思路字符串t后进先出,可以看成是一个栈。贪心思想:遍历字符串s,操作如下:若当前栈顶sta;charmi[100010];//后缀数组,记录[i,sz)中最小的