随笔分类 -  leetcode

摘要:Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases. For example,"A man, a plan, a canal: Pan 阅读全文
posted @ 2016-06-24 16:52 泥石流小盆友 阅读(771) 评论(0) 推荐(0)
摘要:Evaluate the value of an arithmetic expression in Reverse Polish Notation. Valid operators are +, -, *, /. Each operand may be an integer or another e 阅读全文
posted @ 2016-05-13 17:39 泥石流小盆友 阅读(541) 评论(1) 推荐(0)
摘要:题目: Sort a linked list in O(n log n) time using constant space complexity. 题目解析:要求用链表作为排序的数据结构,时间复杂度为O(nlogn),空间复杂度为O(1)。 分析:首先想到复杂度为O(nlogn)的排序算法有:快排 阅读全文
posted @ 2016-05-06 16:35 泥石流小盆友 阅读(713) 评论(0) 推荐(0)