<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[LZTree的专栏]]></title><description><![CDATA[]]></description><link>https://blog.youkuaiyun.com/LZTree</link><language>zh-cn</language><generator>https://blog.youkuaiyun.com/</generator><copyright><![CDATA[Copyright &copy; LZTree]]></copyright><item><title><![CDATA[Spring 松耦合实例]]></title><link>https://blog.youkuaiyun.com/LZTree/article/details/78297182</link><guid>https://blog.youkuaiyun.com/LZTree/article/details/78297182</guid><author>LZTree</author><pubDate>Fri, 20 Oct 2017 16:48:55 +0800</pubDate><description><![CDATA[假定我们现在需要输出不同格式文件，传统实现方式如下：
1 创建输出文件接口IGenerateFile.java
package com.xidian.edu;

public interface IGenerateFile {
    public void generateFile();
}
2 创建TxtGenerateFile.java、XmlGenerateFile.java实现IG]]></description><category></category></item><item><title><![CDATA[JAVA Spring HelloWord实现]]></title><link>https://blog.youkuaiyun.com/LZTree/article/details/78285705</link><guid>https://blog.youkuaiyun.com/LZTree/article/details/78285705</guid><author>LZTree</author><pubDate>Thu, 19 Oct 2017 15:46:00 +0800</pubDate><description><![CDATA[IDE:IntelliJ IDEA 2017
HelloWord.java
package com.xidian.edu;

public class HelloWorld {
    private String name;
    public void setName(String name){
        this.name=name;
    }
    public void]]></description><category></category></item><item><title><![CDATA[LeetCode算法题——27. Remove Element]]></title><link>https://blog.youkuaiyun.com/LZTree/article/details/71246207</link><guid>https://blog.youkuaiyun.com/LZTree/article/details/71246207</guid><author>LZTree</author><pubDate>Fri, 05 May 2017 22:33:40 +0800</pubDate><description><![CDATA[题目：


Given an array and a value, remove all instances of that value in place and return the new length.

Do not allocate extra space for another array, you must do this in place with constant me]]></description><category></category></item><item><title><![CDATA[LeetCode算法题——26. Remove Duplicates from Sorted Array]]></title><link>https://blog.youkuaiyun.com/LZTree/article/details/71245609</link><guid>https://blog.youkuaiyun.com/LZTree/article/details/71245609</guid><author>LZTree</author><pubDate>Fri, 05 May 2017 22:20:49 +0800</pubDate><description><![CDATA[题目：


Given a sorted array, remove the duplicates in place such that each element appear only once and return the new length.

Do not allocate extra space for another array, you must do this in p]]></description><category></category></item><item><title><![CDATA[LeetCode算法题——25. Reverse Nodes in k-Group]]></title><link>https://blog.youkuaiyun.com/LZTree/article/details/71244521</link><guid>https://blog.youkuaiyun.com/LZTree/article/details/71244521</guid><author>LZTree</author><pubDate>Fri, 05 May 2017 21:43:34 +0800</pubDate><description><![CDATA[题目：


Given a linked list, reverse the nodes of a linked list k at a time and return its modified list.

k is a positive integer and is less than or equal to the length of the linked list. If the]]></description><category></category></item><item><title><![CDATA[LeetCode算法题——24. Swap Nodes in Pairs]]></title><link>https://blog.youkuaiyun.com/LZTree/article/details/71215954</link><guid>https://blog.youkuaiyun.com/LZTree/article/details/71215954</guid><author>LZTree</author><pubDate>Fri, 05 May 2017 17:08:00 +0800</pubDate><description><![CDATA[题目：


Given a linked list, swap every two adjacent nodes and return its head.

For example,
Given 1->2->3->4, you should return the list as 2->1->4->3.

Your algorithm should use only constant]]></description><category></category></item><item><title><![CDATA[LeetCode算法题——23. Merge k Sorted Lists]]></title><link>https://blog.youkuaiyun.com/LZTree/article/details/71179480</link><guid>https://blog.youkuaiyun.com/LZTree/article/details/71179480</guid><author>LZTree</author><pubDate>Thu, 04 May 2017 20:24:22 +0800</pubDate><description><![CDATA[题目：


Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity.




Subscribe to see which companies asked this question.


算法思想：
     针对K个排序的链表进行两]]></description><category></category></item><item><title><![CDATA[LeetCode算法题——22. Generate Parentheses]]></title><link>https://blog.youkuaiyun.com/LZTree/article/details/70477182</link><guid>https://blog.youkuaiyun.com/LZTree/article/details/70477182</guid><author>LZTree</author><pubDate>Sat, 22 Apr 2017 21:11:26 +0800</pubDate><description><![CDATA[题目：


Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses.

For example, given n = 3, a solution set is:

[
  "((()))",
  "(()())",
  "(())]]></description><category></category></item><item><title><![CDATA[LeetCode算法题——21. Merge Two Sorted Lists]]></title><link>https://blog.youkuaiyun.com/LZTree/article/details/70145042</link><guid>https://blog.youkuaiyun.com/LZTree/article/details/70145042</guid><author>LZTree</author><pubDate>Wed, 12 Apr 2017 17:01:42 +0800</pubDate><description><![CDATA[题目
Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two
 lists.


算法思想：
比较两个已排序的链表的第一个元素，哪一个链表第一个元素小则添加到新的链表中去，并]]></description><category></category></item><item><title><![CDATA[LeetCode算法题——20. Valid Parentheses]]></title><link>https://blog.youkuaiyun.com/LZTree/article/details/70135996</link><guid>https://blog.youkuaiyun.com/LZTree/article/details/70135996</guid><author>LZTree</author><pubDate>Tue, 11 Apr 2017 21:47:39 +0800</pubDate><description><![CDATA[题目


Given a string containing just the characters '(', ')', '{', '}', '[' and ']',
 determine if the input string is valid.

The brackets must close in the correct order, "()" and "()[]{}" are]]></description><category></category></item><item><title><![CDATA[LeetCode算法题——17. Letter Combinations of a Phone Number]]></title><link>https://blog.youkuaiyun.com/LZTree/article/details/70134938</link><guid>https://blog.youkuaiyun.com/LZTree/article/details/70134938</guid><author>LZTree</author><pubDate>Tue, 11 Apr 2017 20:53:37 +0800</pubDate><description><![CDATA[题目


Given a digit string, return all possible letter combinations that the number could represent.

A mapping of digit to letters (just like on the telephone buttons) is given below.


Input:]]></description><category></category></item><item><title><![CDATA[LeetCode算法题——19. Remove Nth Node From End of List]]></title><link>https://blog.youkuaiyun.com/LZTree/article/details/66480504</link><guid>https://blog.youkuaiyun.com/LZTree/article/details/66480504</guid><author>LZTree</author><pubDate>Sun, 26 Mar 2017 21:28:16 +0800</pubDate><description><![CDATA[题目


Given a linked list, remove the nth node from the end of list and return its head.

For example,
   Given linked list: 1->2->3->4->5, and n = 2.

   After removing the second node from the ]]></description><category></category></item><item><title><![CDATA[LeetCode算法题——18. 4Sum]]></title><link>https://blog.youkuaiyun.com/LZTree/article/details/66475500</link><guid>https://blog.youkuaiyun.com/LZTree/article/details/66475500</guid><author>LZTree</author><pubDate>Sun, 26 Mar 2017 14:45:27 +0800</pubDate><description><![CDATA[题目：
Given an array S of n integers, are there elements a, b, c, and d in S such
 that a + b + c + d = target? Find all unique quadruplets in the array which gives the sum of target.


Note: The s]]></description><category></category></item><item><title><![CDATA[LeetCode算法题——16. 3Sum Closest]]></title><link>https://blog.youkuaiyun.com/LZTree/article/details/65632725</link><guid>https://blog.youkuaiyun.com/LZTree/article/details/65632725</guid><author>LZTree</author><pubDate>Fri, 24 Mar 2017 16:21:03 +0800</pubDate><description><![CDATA[题目：
Given an array S of n integers, find three integers in S such that the sum is closest to a given number, target. Return the sum of the three integers. You may
 assume that each input would have ]]></description><category></category></item><item><title><![CDATA[LeetCode算法题——15. 3Sum]]></title><link>https://blog.youkuaiyun.com/LZTree/article/details/65631213</link><guid>https://blog.youkuaiyun.com/LZTree/article/details/65631213</guid><author>LZTree</author><pubDate>Fri, 24 Mar 2017 15:11:38 +0800</pubDate><description><![CDATA[题目：
Given an array S of n integers, are there elements a, b, c in S such that a + b + c =
 0? Find all unique triplets in the array which gives the sum of zero.


Note: The solution set must not ]]></description><category></category></item><item><title><![CDATA[LeetCode算法题——14. Longest Common Prefix]]></title><link>https://blog.youkuaiyun.com/LZTree/article/details/64444619</link><guid>https://blog.youkuaiyun.com/LZTree/article/details/64444619</guid><author>LZTree</author><pubDate>Tue, 21 Mar 2017 17:12:46 +0800</pubDate><description><![CDATA[Write a function to find the longest common prefix string amongst an array of strings.
算法思想：逐个比对每个字符串的前缀字符，若出现不相等或者其中某个字符已经是最末尾的字符时，跳出循环。
C++实现如下：
#include 
#include 
using namespace std;
class]]></description><category></category></item><item><title><![CDATA[LeetCode算法题——13. Roman to Integer]]></title><link>https://blog.youkuaiyun.com/LZTree/article/details/64444591</link><guid>https://blog.youkuaiyun.com/LZTree/article/details/64444591</guid><author>LZTree</author><pubDate>Tue, 21 Mar 2017 17:11:27 +0800</pubDate><description><![CDATA[Given a roman numeral, convert it to an integer.

Input is guaranteed to be within the range from 1 to 3999.


针对罗马字符出现的每个位上所有情况考虑进去，得到相应整形数字
class Solution {
public:
    int romanToInt(string]]></description><category></category></item><item><title><![CDATA[LeetCode算法题——12. Integer to Roman]]></title><link>https://blog.youkuaiyun.com/LZTree/article/details/64444578</link><guid>https://blog.youkuaiyun.com/LZTree/article/details/64444578</guid><author>LZTree</author><pubDate>Tue, 21 Mar 2017 17:10:34 +0800</pubDate><description><![CDATA[Given an integer, convert it to a roman numeral.

Input is guaranteed to be within the range from 1 to 3999.


求出所给数字的个、十、百、千位上的数字，然后对应到相应罗马数字字符
class Solution {
public:
    string intToRoman(]]></description><category></category></item><item><title><![CDATA[LeetCode算法题——11. Container With Most Water]]></title><link>https://blog.youkuaiyun.com/LZTree/article/details/62885496</link><guid>https://blog.youkuaiyun.com/LZTree/article/details/62885496</guid><author>LZTree</author><pubDate>Fri, 17 Mar 2017 12:11:30 +0800</pubDate><description><![CDATA[Given n non-negative integers a1, a2,
 ..., an, where each represents a point at coordinate (i, ai). n vertical
 lines are drawn such that the two endpoints of line i is at (i, ai) and (i, 0). Find ]]></description><category></category></item><item><title><![CDATA[Python面向对象编程（5）——类的特殊方法]]></title><link>https://blog.youkuaiyun.com/LZTree/article/details/61621913</link><guid>https://blog.youkuaiyun.com/LZTree/article/details/61621913</guid><author>LZTree</author><pubDate>Sun, 12 Mar 2017 17:06:23 +0800</pubDate><description><![CDATA[类的特殊方法
1 深入理解类
     类本质上也是一个对象，只是其拥有创建自身实例的能力
     类可以与变量进行绑定，并且可以为类增加属性
     可以把类作为函数的参数传递


2 元类
     类的创建和管理者（type）,所有的类都是元类的实例
isinstance(Empty,type)查看Empty是否是type的实例
类实例化过程：__new__()、__]]></description><category></category></item></channel></rss>