摘要: 遇到运算符将栈底两个元素弹出,进行计算 class Solution { public: int evalRPN(vector<string>& tokens) { stack<int> stk; int n = tokens.size(); for (int i = 0; i < n; i++) 阅读全文
posted @ 2021-04-11 20:14 章大佬 阅读(33) 评论(0) 推荐(0)
摘要: 运用链表进行插入排序。 class Solution { public: ListNode* insertionSortList(ListNode* head) { if(head==NULL) { return head; } ListNode* oldhead=new ListNode(0); 阅读全文
posted @ 2021-04-11 19:49 章大佬 阅读(24) 评论(0) 推荐(0)