摘要:
1. 每一轮,如果有可以删除的(和为0),则删除,并从头开始遍历;如果没有可以删除的,则右移left。 class Solution { public: ListNode* removeZeroSumSublists(ListNode* head) { head=reverseList(head); 阅读全文
摘要:
1. 按序放入栈中,如果当前数字比栈中的数字大,则出栈,更新这个数的next greater node。 class Solution { public: vector<int> nextLargerNodes(ListNode* head) { vector<int> vec; stack<pai 阅读全文