随笔分类 - 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
阅读全文
摘要:Evaluate the value of an arithmetic expression in Reverse Polish Notation. Valid operators are +, -, *, /. Each operand may be an integer or another e
阅读全文
摘要:题目: Sort a linked list in O(n log n) time using constant space complexity. 题目解析:要求用链表作为排序的数据结构,时间复杂度为O(nlogn),空间复杂度为O(1)。 分析:首先想到复杂度为O(nlogn)的排序算法有:快排
阅读全文

浙公网安备 33010602011771号