<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[MidnightDJ的博客]]></title><description><![CDATA[]]></description><link>https://blog.youkuaiyun.com/MidnightDJ</link><language>zh-cn</language><generator>https://blog.youkuaiyun.com/</generator><copyright><![CDATA[Copyright &copy; MidnightDJ]]></copyright><item><title><![CDATA[关于Arrays.copyOfRange一个易错点]]></title><link>https://blog.youkuaiyun.com/MidnightDJ/article/details/79575709</link><guid>https://blog.youkuaiyun.com/MidnightDJ/article/details/79575709</guid><author>MidnightDJ</author><pubDate>Thu, 15 Mar 2018 23:29:52 +0800</pubDate><description><![CDATA[Arrays.copyOfRange方法可以实现对一个数组一定范围内元素的拷贝。其函数原型为：static type copyOfRange(type[] a, int start, int end)参数：a    类型为8大基本类型的数组。start    起始下标（包含这个值）。end    终止下标（不包含这个值）。使用方法如：int [] s1 = {1,2,3,4,5};
int [] ...]]></description><category></category></item><item><title><![CDATA[算法 习题8.22 题解]]></title><link>https://blog.youkuaiyun.com/MidnightDJ/article/details/79116209</link><guid>https://blog.youkuaiyun.com/MidnightDJ/article/details/79116209</guid><author>MidnightDJ</author><pubDate>Sat, 20 Jan 2018 19:40:55 +0800</pubDate><description><![CDATA[Problem
In task scheduling, it is common to use a graphrepresentation with a node for each task and a directed edge from task
ito task j if i is a precondition for j. This directedgraph depicts the ]]></description><category></category></item><item><title><![CDATA[Leetcode代码学习周记——Number Complement]]></title><link>https://blog.youkuaiyun.com/MidnightDJ/article/details/79116178</link><guid>https://blog.youkuaiyun.com/MidnightDJ/article/details/79116178</guid><author>MidnightDJ</author><pubDate>Sat, 20 Jan 2018 19:30:02 +0800</pubDate><description><![CDATA[题目链接：
https://leetcode.com/problems/number-complement/description/

题目描述：
Given a positive integer, output its complement number. The complement strategy is to flip the
 bits of its binary repres]]></description><category></category></item><item><title><![CDATA[Leetcode代码学习周记——Merge Two Binary Trees]]></title><link>https://blog.youkuaiyun.com/MidnightDJ/article/details/79116089</link><guid>https://blog.youkuaiyun.com/MidnightDJ/article/details/79116089</guid><author>MidnightDJ</author><pubDate>Sat, 20 Jan 2018 19:18:40 +0800</pubDate><description><![CDATA[题目链接：
https://leetcode.com/problems/merge-two-binary-trees/description/

题目描述：


Given two binary trees and imagine that when you put one of them to cover the other, some nodes of the two trees ]]></description><category></category></item><item><title><![CDATA[Leetcode代码学习周记——Find Anagram Mappings]]></title><link>https://blog.youkuaiyun.com/MidnightDJ/article/details/79116074</link><guid>https://blog.youkuaiyun.com/MidnightDJ/article/details/79116074</guid><author>MidnightDJ</author><pubDate>Sat, 20 Jan 2018 19:07:48 +0800</pubDate><description><![CDATA[题目链接：
https://leetcode.com/problems/find-anagram-mappings/description/

题目描述：


Given two lists Aand B,
 and B is an anagram of A. B is
 an anagram of A means B is
 made by randomizing the or]]></description><category></category></item><item><title><![CDATA[Leetcode代码学习周记——3Sum]]></title><link>https://blog.youkuaiyun.com/MidnightDJ/article/details/79115786</link><guid>https://blog.youkuaiyun.com/MidnightDJ/article/details/79115786</guid><author>MidnightDJ</author><pubDate>Sat, 20 Jan 2018 18:16:36 +0800</pubDate><description><![CDATA[题目链接：
https://leetcode.com/problems/3sum/description/

题目描述：
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 wh]]></description><category></category></item><item><title><![CDATA[Leetcode代码学习周记——Longest Common Prefix]]></title><link>https://blog.youkuaiyun.com/MidnightDJ/article/details/79115393</link><guid>https://blog.youkuaiyun.com/MidnightDJ/article/details/79115393</guid><author>MidnightDJ</author><pubDate>Sat, 20 Jan 2018 17:14:28 +0800</pubDate><description><![CDATA[题目链接：
https://leetcode.com/problems/longest-common-prefix/description/

题目描述：
Write a function to find the longest common prefix string amongst an array of strings.

编写一个函数以查找一个字符串数组中所有字符串的最长公共前]]></description><category></category></item><item><title><![CDATA[Leetcode代码学习周记——Palindrome Number]]></title><link>https://blog.youkuaiyun.com/MidnightDJ/article/details/79114986</link><guid>https://blog.youkuaiyun.com/MidnightDJ/article/details/79114986</guid><author>MidnightDJ</author><pubDate>Sat, 20 Jan 2018 16:20:48 +0800</pubDate><description><![CDATA[题目链接：
https://leetcode.com/problems/palindrome-number/description/

题目描述：
Determine whether an integer is a palindrome. Do this without extra space.

判断一个整数是否为回文整数。
题解：
先排除复数和非0的10的倍数。
随后从该整数]]></description><category></category></item><item><title><![CDATA[Leetcode代码学习周记——Longest Palindromic Substring]]></title><link>https://blog.youkuaiyun.com/MidnightDJ/article/details/79053928</link><guid>https://blog.youkuaiyun.com/MidnightDJ/article/details/79053928</guid><author>MidnightDJ</author><pubDate>Sat, 13 Jan 2018 21:48:52 +0800</pubDate><description><![CDATA[题目链接：https://leetcode.com/problems/longest-palindromic-substring/
题目描述：Given a string s,
 find the longest palindromic substring in s.
 You may assume that the maximum length of s is
 1000.
给定一个字]]></description><category></category></item><item><title><![CDATA[算法练习——前K小数]]></title><link>https://blog.youkuaiyun.com/MidnightDJ/article/details/78821003</link><guid>https://blog.youkuaiyun.com/MidnightDJ/article/details/78821003</guid><author>MidnightDJ</author><pubDate>Sat, 16 Dec 2017 17:31:13 +0800</pubDate><description><![CDATA[题目描述：给定一个数组，输出该数组前K小数（无需排序）
示例：
Input: nums = {38, 61, 7, 87, 81, 18, 50, 55, 90, 26} K = 7
Output: result = {7, 18, 26, 38, 50, 55, 61}


题解：
这道题目有两种解题方法，一是使用排序的算法让数组从小到大排好序，然后依次输出数组的前K个整数。
这]]></description><category></category></item><item><title><![CDATA[Leetcode代码学习周记——Self Dividing Numbers]]></title><link>https://blog.youkuaiyun.com/MidnightDJ/article/details/78820209</link><guid>https://blog.youkuaiyun.com/MidnightDJ/article/details/78820209</guid><author>MidnightDJ</author><pubDate>Sat, 16 Dec 2017 15:35:48 +0800</pubDate><description><![CDATA[题目链接：
https://leetcode.com/problems/self-dividing-numbers/description/

题目描述：


A self-dividing number is a number that is divisible by every digit it contains.

For example, 128 is a self-div]]></description><category></category></item><item><title><![CDATA[Leetcode代码学习周记——Sqrt(x)]]></title><link>https://blog.youkuaiyun.com/MidnightDJ/article/details/78776324</link><guid>https://blog.youkuaiyun.com/MidnightDJ/article/details/78776324</guid><author>MidnightDJ</author><pubDate>Mon, 11 Dec 2017 20:35:18 +0800</pubDate><description><![CDATA[题目链接：
https://leetcode.com/problems/sqrtx/description/

题目描述：


Implement int sqrt(int x).

Compute and return the square root of x.

x is guaranteed to be a non-negative integer.


实现函数 ]]></description><category></category></item><item><title><![CDATA[Leetcode代码学习周记——Judge Route Circle]]></title><link>https://blog.youkuaiyun.com/MidnightDJ/article/details/78768044</link><guid>https://blog.youkuaiyun.com/MidnightDJ/article/details/78768044</guid><author>MidnightDJ</author><pubDate>Sun, 10 Dec 2017 22:11:10 +0800</pubDate><description><![CDATA[题目链接：
https://leetcode.com/problems/judge-route-circle/description/

题目描述：


Initially, there is a Robot at position (0, 0). Given a sequence of its moves, judge if this robot makes a circle, wh]]></description><category></category></item><item><title><![CDATA[Leetcode代码学习周记——Hamming Distance]]></title><link>https://blog.youkuaiyun.com/MidnightDJ/article/details/78767875</link><guid>https://blog.youkuaiyun.com/MidnightDJ/article/details/78767875</guid><author>MidnightDJ</author><pubDate>Sun, 10 Dec 2017 21:49:41 +0800</pubDate><description><![CDATA[题目链接：
https://leetcode.com/problems/hamming-distance/description/

题目描述：


The Hamming distance between two integers is the number of positions at which the corresponding bits are
 different.
]]></description><category></category></item><item><title><![CDATA[Leetcode代码学习周记——Container With Most Water]]></title><link>https://blog.youkuaiyun.com/MidnightDJ/article/details/78240624</link><guid>https://blog.youkuaiyun.com/MidnightDJ/article/details/78240624</guid><author>MidnightDJ</author><pubDate>Sun, 15 Oct 2017 14:32:45 +0800</pubDate><description><![CDATA[题目链接：
https://leetcode.com/problems/container-with-most-water/description/
题目描述：
Given n non-negative
 integers a1, a2,
 ..., an,
 where each represents a point at coordinate (i, ai). n vertical]]></description><category></category></item><item><title><![CDATA[Leetcode代码学习周记——Reverse Integer]]></title><link>https://blog.youkuaiyun.com/MidnightDJ/article/details/78156457</link><guid>https://blog.youkuaiyun.com/MidnightDJ/article/details/78156457</guid><author>MidnightDJ</author><pubDate>Tue, 03 Oct 2017 21:42:19 +0800</pubDate><description><![CDATA[原题目链接：
https://leetcode.com/problems/reverse-integer/description/

题目描述：
反转一个整数的数位。
实例：
x = 123，return 321 

x = -123，return -321

注意：
输入假定为32位有符号整数。当反转的整数溢出时，您的函数应返回0。



除了题目给出的限制，还应该]]></description><category></category></item><item><title><![CDATA[Leetcode代码学习周记——Longest Substring Without Repeating Characters]]></title><link>https://blog.youkuaiyun.com/MidnightDJ/article/details/78049095</link><guid>https://blog.youkuaiyun.com/MidnightDJ/article/details/78049095</guid><author>MidnightDJ</author><pubDate>Thu, 21 Sep 2017 10:36:18 +0800</pubDate><description><![CDATA[原题目链接：
https://leetcode.com/problems/longest-substring-without-repeating-characters/description/

题目描述：
给定一个字符串，求其最长的没有重复字符的子字符串长度。
实例：


给定 "abcabcbb"， 答案为 "abc",
 长度为3。

给定 "bbbbb"，答案为 "b]]></description><category></category></item><item><title><![CDATA[Leetcode代码学习周记——Add Two Nmubers]]></title><link>https://blog.youkuaiyun.com/MidnightDJ/article/details/78004296</link><guid>https://blog.youkuaiyun.com/MidnightDJ/article/details/78004296</guid><author>MidnightDJ</author><pubDate>Sat, 16 Sep 2017 16:08:13 +0800</pubDate><description><![CDATA[原题目链接：
https://leetcode.com/problems/add-two-numbers/description/
题目描述：
给定两个表示了非负整数的链表。数字以相反的顺序存储，每个节点包含一个数字。把两个数相加并将其以链表的形式返回。
给定的两个数除了0自身不含首位为0的。
实例：
输入: (2
 -> 4 -> 3) + (5 -> 6 -> 4)
输出: 7]]></description><category></category></item><item><title><![CDATA[Leetcode代码学习周记——Two Sum]]></title><link>https://blog.youkuaiyun.com/MidnightDJ/article/details/77925629</link><guid>https://blog.youkuaiyun.com/MidnightDJ/article/details/77925629</guid><author>MidnightDJ</author><pubDate>Sun, 10 Sep 2017 21:17:46 +0800</pubDate><description><![CDATA[原题目链接：
https://leetcode.com/problems/two-sum/description/
题目描述：
给定一个整数数组，返回两个数字的索引，使它们相加得到一个特定的目标值。
你可以假设每个输入都只有一个解决方案，而您可能不会使用相同的元素两次。
实例：

Given nums = [2, 7, 11, 15], target = 9,

Because nu]]></description><category></category></item></channel></rss>