摘要:
1.题目描述 Reverse digits of an integer. Example1: x = 123, return 321 Example2: x = -123, return -321 ... 阅读全文
摘要:
1.题目描述Given a string S, find the longest palindromic substring in S. You may assume that the maximum length of S is 1000, and there exists one unique longest palindromic substring.2.解法分析拿到题目的一瞬间,我就想到了两个办法,但都看起来不是那么好的方法,方法一是求出输入串和输入串逆置串(就是将输入串逆序)的最长公共字串,这个算法很容易实现,但是时间复杂度过高,还有一种就是后缀数组的方法,求出最长后缀即可,但是这种 阅读全文
摘要:
1.题目描述 You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes c... 阅读全文
摘要:
1.题目描述 Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repe... 阅读全文
摘要:
1.题目描述 There are two sorted arrays A and B of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexity sh... 阅读全文