![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
leetcode
zhangpan19910604
这个作者很懒,什么都没留下…
展开
-
Remove Duplicates from Sorted List II
先看这样一道题:Delete Node in a Linked ListWrite a function to delete a node (except the tail) in a singly linked list, given only access to that node.Supposed the linked list is 1 -> 2 ->原创 2016-03-05 16:23:33 · 524 阅读 · 0 评论 -
表达式求值
表达式求值分为2个步骤:1、中缀表达式=》后缀表达式2、后缀表达式求值以9+(3+5)*2+10/2为例一、中缀表达式=》后缀表达式 思路遍历整个表达式,如果是数字直接输出,如果是操作符与栈顶元素(最上面 那一个元素)比较操作符的优先级,如果优先级比栈顶元素大,则入栈,如果小于等于则栈顶元素出现(循环比较),然后该操作符入栈。以上为例(设op为操作符栈):9 3原创 2016-03-15 21:06:09 · 444 阅读 · 0 评论 -
leetcode MajorityElement相关问题
题目:MajorityElement Given an array of size n, find the majority element. The majority element is the element that appears more than n/2 times. You may assume that the array is non-empty and the m原创 2016-02-24 19:31:53 · 424 阅读 · 0 评论