摘要:
题目链接:https://leetcode cn.com/problems/cong wei dao tou da yin lian biao lcof/ 改变链表 先逆置链表,然后将结果保存到数组中 reverse 依次将链表保存到数组中,然后逆置数组 栈 依次遍历链表并入栈,然后栈中元素依次弹到 阅读全文
摘要:
题目链接:https://leetcode-cn.com/problems/hua-dong-chuang-kou-de-zui-da-zhi-lcof/ 单调队列 时间复杂度:O(n) 空间复杂度:O(k):双端队列中最多同时存储k个元素,即窗口大小 class Solution { public 阅读全文