<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[Krysta1的博客]]></title><description><![CDATA[]]></description><link>https://blog.youkuaiyun.com/Krysta1</link><language>zh-cn</language><generator>https://blog.youkuaiyun.com/</generator><copyright><![CDATA[Copyright &copy; Krysta1]]></copyright><item><title><![CDATA[104. Maximum Depth of Binary Tree]]></title><link>https://blog.youkuaiyun.com/Krysta1/article/details/88862718</link><guid>https://blog.youkuaiyun.com/Krysta1/article/details/88862718</guid><author>Krysta1</author><pubDate>Thu, 28 Mar 2019 10:13:01 +0800</pubDate><description><![CDATA[题目描述：

Given a binary tree, find its maximum depth.

The maximum depth is the number of nodes along the longest path from the root node down to the farthest leaf node.

Note:A leaf is a node with no ...]]></description><category></category></item><item><title><![CDATA[102. Binary Tree Level Order Traversal]]></title><link>https://blog.youkuaiyun.com/Krysta1/article/details/86603901</link><guid>https://blog.youkuaiyun.com/Krysta1/article/details/86603901</guid><author>Krysta1</author><pubDate>Wed, 23 Jan 2019 04:31:07 +0800</pubDate><description><![CDATA[题目描述：

Given a binary tree, return the level order traversal of its nodes' values. (ie, from left to right, level by level).

For example:
Given binary tree [3,9,20,null,null,15,7],


    3
   / \
  9...]]></description><category></category></item><item><title><![CDATA[101. Symmetric Tree]]></title><link>https://blog.youkuaiyun.com/Krysta1/article/details/86603894</link><guid>https://blog.youkuaiyun.com/Krysta1/article/details/86603894</guid><author>Krysta1</author><pubDate>Wed, 23 Jan 2019 03:46:36 +0800</pubDate><description><![CDATA[题目描述：

Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).

For example, this binary tree [1,2,2,3,4,4,3] is symmetric:


    1
   / \
  2   2
 / \ / \
3  4 ...]]></description><category></category></item><item><title><![CDATA[100. Same Tree]]></title><link>https://blog.youkuaiyun.com/Krysta1/article/details/79722352</link><guid>https://blog.youkuaiyun.com/Krysta1/article/details/79722352</guid><author>Krysta1</author><pubDate>Wed, 28 Mar 2018 11:34:33 +0800</pubDate><description><![CDATA[题目描述：给定两个二叉树，写一个函数来检查它们是否相同。如果两棵树在结构上相同并且节点具有相同的值，则认为它们是相同的。示例 1:输入 :     1          1
          / \       / \
         2   3     2   3

        [1,2,3],   [1,2,3]

输出: true
示例 2:输入  :    1          1...]]></description><category></category></item><item><title><![CDATA[98. Validate Binary Search Tree]]></title><link>https://blog.youkuaiyun.com/Krysta1/article/details/79722351</link><guid>https://blog.youkuaiyun.com/Krysta1/article/details/79722351</guid><author>Krysta1</author><pubDate>Wed, 28 Mar 2018 10:58:04 +0800</pubDate><description><![CDATA[题目描述：给定一个二叉树，判断其是否是一个有效的二叉搜索树。一个二叉搜索树有如下定义：左子树只包含小于当前节点的数。右子树只包含大于当前节点的数。所有子树自身必须也是二叉搜索树。示例 1：    2
   / \
  1   3
二叉树[2,1,3], 返回 true.示例 2：    1
   / \
  2   3
二叉树 [1,2,3], 返回 false.我的思路：        中序遍历...]]></description><category></category></item><item><title><![CDATA[95. Unique Binary Search Trees II]]></title><link>https://blog.youkuaiyun.com/Krysta1/article/details/79722345</link><guid>https://blog.youkuaiyun.com/Krysta1/article/details/79722345</guid><author>Krysta1</author><pubDate>Wed, 28 Mar 2018 10:44:16 +0800</pubDate><description><![CDATA[题目描述：给定一个整数 n，生成所有由 1...n 为节点组成的不同的二叉查找树。例如，给定 n = 3，则返回所有 5 种不同形态的二叉查找树：   1         3     3      2      1
    \       /     /      / \      \
     3     2     1      1   3      2
    /     /       \...]]></description><category></category></item><item><title><![CDATA[96. Unique Binary Search Trees]]></title><link>https://blog.youkuaiyun.com/Krysta1/article/details/79722512</link><guid>https://blog.youkuaiyun.com/Krysta1/article/details/79722512</guid><author>Krysta1</author><pubDate>Wed, 28 Mar 2018 10:14:00 +0800</pubDate><description><![CDATA[题目描述：给出 n，问由 1...n 为节点组成的不同的二叉查找树有多少种？例如，给出 n = 3，则有 5 种不同形态的二叉查找树：   1         3     3      2      1
    \       /     /      / \      \
     3     2     1      1   3      2
    /     /       \      ...]]></description><category></category></item><item><title><![CDATA[94. Binary Tree Inorder Traversal]]></title><link>https://blog.youkuaiyun.com/Krysta1/article/details/79722339</link><guid>https://blog.youkuaiyun.com/Krysta1/article/details/79722339</guid><author>Krysta1</author><pubDate>Wed, 28 Mar 2018 09:50:01 +0800</pubDate><description><![CDATA[题目描述：给定一个二叉树，返回其中序遍历。例如：给定二叉树 [1,null,2,3],   1
    \
     2
    /
   3
返回 [1,3,2].说明: 递归算法很简单，你可以通过迭代算法完成吗？我的思路：        就是非递归遍历二叉树，用栈来实现。基本原则是，如果有左孩子进栈，知道没有左孩子。如果栈不空，弹出栈顶元素，同时去遍历根节点的右子树。在节点不空或者栈不空的情况...]]></description><category></category></item><item><title><![CDATA[93. Restore IP Addresses（DFS）]]></title><link>https://blog.youkuaiyun.com/Krysta1/article/details/79717800</link><guid>https://blog.youkuaiyun.com/Krysta1/article/details/79717800</guid><author>Krysta1</author><pubDate>Tue, 27 Mar 2018 19:44:23 +0800</pubDate><description><![CDATA[题目描述：给定一个只包含数字的字符串，复原它并返回所有可能的IP地址格式。例如：给定 &quot;25525511135&quot;,返回 [&quot;255.255.11.135&quot;, &quot;255.255.111.35&quot;]. (我们可以不考虑数组内元素的顺序)我的思路：我的代码：Discuss：class Solution:
    def restoreIpAddresses(self, s):
        &quot;&quot;&quot;
  ...]]></description><category></category></item><item><title><![CDATA[92. Reverse Linked List II]]></title><link>https://blog.youkuaiyun.com/Krysta1/article/details/79717390</link><guid>https://blog.youkuaiyun.com/Krysta1/article/details/79717390</guid><author>Krysta1</author><pubDate>Tue, 27 Mar 2018 19:18:19 +0800</pubDate><description><![CDATA[题目描述：反转从位置 m 到 n 的链表。用一次遍历在原地完成反转。例如：给定 1-&amp;gt;2-&amp;gt;3-&amp;gt;4-&amp;gt;5-&amp;gt;NULL, m = 2 和 n = 4,返回 1-&amp;gt;4-&amp;gt;3-&amp;gt;2-&amp;gt;5-&amp;gt;NULL.注意:给定 m，n 满足以下条件：1 ≤ m ≤ n ≤ 列表长度。我的思路：        先设定一个dummy节点标示整个链表，用pre来表...]]></description><category></category></item><item><title><![CDATA[91. Decode Ways]]></title><link>https://blog.youkuaiyun.com/Krysta1/article/details/79709126</link><guid>https://blog.youkuaiyun.com/Krysta1/article/details/79709126</guid><author>Krysta1</author><pubDate>Tue, 27 Mar 2018 11:33:56 +0800</pubDate><description><![CDATA[中文版leetcode上线啦！！！虽然功能尚未完善，但是看题目的时候舒服了不少。题目描述：包含 A-Z 的字母的消息通过以下规则编码：'A' -&amp;gt; 1
'B' -&amp;gt; 2
...
'Z' -&amp;gt; 26
给定一个包含数字的编码消息，请确定解码方法的总数。例如，给定消息为 &quot;12&quot;， 它可以解码为 &quot;AB&quot;（1 2）或 &quot;L&quot;（12）。&quot;12&quot; 的解码方法为 2 种。我的思路：     ...]]></description><category></category></item><item><title><![CDATA[90. Subsets II]]></title><link>https://blog.youkuaiyun.com/Krysta1/article/details/79702227</link><guid>https://blog.youkuaiyun.com/Krysta1/article/details/79702227</guid><author>Krysta1</author><pubDate>Mon, 26 Mar 2018 19:16:42 +0800</pubDate><description><![CDATA[题目描述：Given a collection of integers that might contain duplicates, nums, return all possible subsets (the power set).Note: The solution set must not contain duplicate subsets.For example,If nums = [1,...]]></description><category></category></item><item><title><![CDATA[89. Gray Code]]></title><link>https://blog.youkuaiyun.com/Krysta1/article/details/79701207</link><guid>https://blog.youkuaiyun.com/Krysta1/article/details/79701207</guid><author>Krysta1</author><pubDate>Mon, 26 Mar 2018 18:51:15 +0800</pubDate><description><![CDATA[题目描述：The gray code is a binary numeral system where two successive values differ in only one bit.Given a non-negative integer n representing the total number of bits in the code, print the sequence of...]]></description><category></category></item><item><title><![CDATA[88. Merge Sorted Array]]></title><link>https://blog.youkuaiyun.com/Krysta1/article/details/79699901</link><guid>https://blog.youkuaiyun.com/Krysta1/article/details/79699901</guid><author>Krysta1</author><pubDate>Mon, 26 Mar 2018 17:31:34 +0800</pubDate><description><![CDATA[题目描述：Given two sorted integer arrays nums1 and nums2, merge nums2 into nums1 as one sorted array.Note:You may assume that nums1 has enough space (size that is greater or equal to m + n) to hold additi...]]></description><category></category></item><item><title><![CDATA[82. Remove Duplicates from Sorted List II]]></title><link>https://blog.youkuaiyun.com/Krysta1/article/details/79663700</link><guid>https://blog.youkuaiyun.com/Krysta1/article/details/79663700</guid><author>Krysta1</author><pubDate>Fri, 23 Mar 2018 11:19:44 +0800</pubDate><description><![CDATA[题目描述：Given a sorted linked list, delete all nodes that have duplicate numbers, leaving only distinct numbers from the original list.For example,Given 1-&amp;gt;2-&amp;gt;3-&amp;gt;3-&amp;gt;4-&amp;gt;4-&amp;gt;5, return 1-&amp;g...]]></description><category></category></item><item><title><![CDATA[83. Remove Duplicates from Sorted List]]></title><link>https://blog.youkuaiyun.com/Krysta1/article/details/79663103</link><guid>https://blog.youkuaiyun.com/Krysta1/article/details/79663103</guid><author>Krysta1</author><pubDate>Fri, 23 Mar 2018 10:11:28 +0800</pubDate><description><![CDATA[题目描述：Given a sorted linked list, delete all duplicates such that each element appear only once.For example,Given 1-&amp;gt;1-&amp;gt;2, return 1-&amp;gt;2.Given 1-&amp;gt;1-&amp;gt;2-&amp;gt;3-&amp;gt;3, return 1-&amp;gt;2-&amp;gt;3.我得思...]]></description><category></category></item><item><title><![CDATA[81. Search in Rotated Sorted Array II]]></title><link>https://blog.youkuaiyun.com/Krysta1/article/details/79657887</link><guid>https://blog.youkuaiyun.com/Krysta1/article/details/79657887</guid><author>Krysta1</author><pubDate>Thu, 22 Mar 2018 19:54:43 +0800</pubDate><description><![CDATA[题目描述：Suppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand.(i.e., 0 1 2 4 5 6 7 might become 4 5 6 7 0 1 2).Write a function to determine if a given target is i...]]></description><category></category></item><item><title><![CDATA[80. Remove Duplicates from Sorted Array II]]></title><link>https://blog.youkuaiyun.com/Krysta1/article/details/79652206</link><guid>https://blog.youkuaiyun.com/Krysta1/article/details/79652206</guid><author>Krysta1</author><pubDate>Thu, 22 Mar 2018 13:05:08 +0800</pubDate><description><![CDATA[题目描述：Follow up for &quot;Remove Duplicates&quot;:What if duplicates are allowed at most twice?For example,Given sorted array nums = [1,1,1,2,2,3],Your function should return length = 5, with the first five elem...]]></description><category></category></item><item><title><![CDATA[79. Word Search]]></title><link>https://blog.youkuaiyun.com/Krysta1/article/details/79651092</link><guid>https://blog.youkuaiyun.com/Krysta1/article/details/79651092</guid><author>Krysta1</author><pubDate>Thu, 22 Mar 2018 12:14:09 +0800</pubDate><description><![CDATA[题目描述：Given a 2D board and a word, find if the word exists in the grid.The word can be constructed from letters of sequentially adjacent cell, where &quot;adjacent&quot; cells are those horizontally or verticall...]]></description><category></category></item><item><title><![CDATA[78. Subsets]]></title><link>https://blog.youkuaiyun.com/Krysta1/article/details/79648681</link><guid>https://blog.youkuaiyun.com/Krysta1/article/details/79648681</guid><author>Krysta1</author><pubDate>Thu, 22 Mar 2018 11:03:38 +0800</pubDate><description><![CDATA[题目描述：Given a set of distinct integers, nums, return all possible subsets (the power set).Note: The solution set must not contain duplicate subsets.For example,If nums = [1,2,3], a solution is:[
  [3],...]]></description><category></category></item></channel></rss>