对于树的层次遍历是基本操作,话不多说,直接进正题..... 比如实现下面这个树的层次遍历 实现的结果应该是 [1],[2,3],[4,5,6,7...
这次继续学习使用标准库里的数据结构来解题 Q:Given a string, sort it in decreasing order based...
解一些算法题时,我们可以借助语言标准库里的方法或数据结构,它能够有效的帮助我们。比如下面的两道LeetCode上的题目,这两道题很类似,都是求交...
LeetCode 483:Find All Anagrams in a String(找到字符串中所有字母异位词) Q:Given a stri...
LeetCode 3:Longest Substring Without Repeating Characters(最长不含重复字符的子串) Q...
LeetCode 209: Minimum Size Subarray Sum(长度最小的子数组) Q:Given an array of n ...
LeetCode 80:Remove Duplicates from Sorted Array II(去除重复元素) Q:Given a sor...
LeetCode 125:Valid Palindrome(有效回文) Q:Given a string, determine if it is...
LeetCode 167 Two Sum II Q:Given an array of integers that is already sor...
文集作者