摘要: Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. The brackets must close in the 阅读全文
posted @ 2016-01-04 16:19 wangb021 阅读(160) 评论(0) 推荐(0)
摘要: 参考:http://www.cnblogs.com/shitianzeng/articles/2336765.html主要的操作w:Epush(Eitem)把项压入堆栈顶部。Epop()移除堆栈顶部的对象,并作为此函数的值返回该对象。Epeek()查看堆栈顶部的对象,但不从堆栈中移除它。boolea... 阅读全文
posted @ 2016-01-04 14:13 wangb021 阅读(139) 评论(0) 推荐(0)
摘要: 注意的地方:1、使用双指针操作,当第二个指针到尾部时,第一个指针的位置就是要删除位置的前一位 2、注意head节点的删除,如果删除head,直接使head返回null; /** * Definition for singly-linked list. * public class ListNode 阅读全文
posted @ 2016-01-04 00:51 wangb021 阅读(124) 评论(0) 推荐(0)