摘要:
仅供自己学习 题目: Given a string s, return the longest palindromic substring in s. 思路: 1.暴力求解,每个元素都遍历一遍,获得的每个子串都逆向遍历一边比较是否相等,RT为O(n^3) 2.中心扩展法。每个元素从两侧扩展,如果左右 阅读全文
摘要:
仅供自己学习 题目: Given an unsorted array of integers nums, return the length of the longest continuous increasing subsequence (i.e. subarray). The subsequen 阅读全文
摘要:
仅供自己学习,有借鉴成分。 题目: Given a string s, find the length of the longest substring without repeating characters. 思路: 1.下意识想到暴力是可以求解的,把所有无重复字母子串记录下来再来比较。但从每个 阅读全文