<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[summerdj的博客]]></title><description><![CDATA[]]></description><link>https://blog.youkuaiyun.com/summerdj</link><language>zh-cn</language><generator>https://blog.youkuaiyun.com/</generator><copyright><![CDATA[Copyright &copy; summerdj]]></copyright><item><title><![CDATA[leetcode 92. Reverse Linked List II]]></title><link>https://blog.youkuaiyun.com/summerdj/article/details/58661025</link><guid>https://blog.youkuaiyun.com/summerdj/article/details/58661025</guid><author>summerdj</author><pubDate>Tue, 28 Feb 2017 21:14:10 +0800</pubDate><description><![CDATA[反转指定两个位置之间的树。ListNode *reverseBetween(ListNode *head, int m, int n) {
    if(m==n)return head;
    n-=m;
    ListNode prehead(0);
    prehead.next=head;
    ListNode* pre=&prehead;
    while(--m)pre=pr]]></description><category></category></item><item><title><![CDATA[leetcode 84 Remove Duplicates from Sorted List II]]></title><link>https://blog.youkuaiyun.com/summerdj/article/details/58601893</link><guid>https://blog.youkuaiyun.com/summerdj/article/details/58601893</guid><author>summerdj</author><pubDate>Tue, 28 Feb 2017 16:03:42 +0800</pubDate><description><![CDATA[删除一个链表里面重复出现过的元素。 
11123 -〉 23自己的思路：/**
 * Definition for singly-linked list.
 * struct ListNode {
 *     int val;
 *     ListNode *next;
 *     ListNode(int x) : val(x), next(NULL) {}
 * };
 */
class]]></description><category></category></item><item><title><![CDATA[leetcode 41 finding missing positive]]></title><link>https://blog.youkuaiyun.com/summerdj/article/details/58247994</link><guid>https://blog.youkuaiyun.com/summerdj/article/details/58247994</guid><author>summerdj</author><pubDate>Mon, 27 Feb 2017 20:41:47 +0800</pubDate><description><![CDATA[找到数组中第一个消失的正整数。先桶排序，将值为i的数和第 i-1 位 交换，然后遍历数组找到第一个值不等于位置 +1 的即可。class Solution {
public:
    int firstMissingPositive(vector<int>& nums) {
        int l=nums.size();
        for(int i=0;i<l;i++){]]></description><category></category></item><item><title><![CDATA[leetcode-38-count and say]]></title><link>https://blog.youkuaiyun.com/summerdj/article/details/52846187</link><guid>https://blog.youkuaiyun.com/summerdj/article/details/52846187</guid><author>summerdj</author><pubDate>Tue, 18 Oct 2016 09:46:37 +0800</pubDate><description><![CDATA[1, 11, 21, 1211, 111221, …1 is read off as “one 1” or 11. 
11 is read off as “two 1s” or 21. 
21 is read off as “one 2, then one 1” or 1211.求第n个序列的输出。基本思路，迭代。 
循环计算下一个输出，循环调用next函数。 
int b=8; 
char a=b]]></description><category></category></item><item><title><![CDATA[leetcode-37-sudoku solver]]></title><link>https://blog.youkuaiyun.com/summerdj/article/details/52668451</link><guid>https://blog.youkuaiyun.com/summerdj/article/details/52668451</guid><author>summerdj</author><pubDate>Mon, 26 Sep 2016 11:11:09 +0800</pubDate><description><![CDATA[题目：求解数独，假设只有一种结果。回溯法递归判断每一个 空位置的 所有可能性。 
比如 第一个为空 的位置 为1是是有效的，然后递归调用 solvesudoku（新的第一个位置为1的board），依次递归。如果false了，在返回到第一个位置为第二个有效数字的情况。注意： 
board[i][j] = ‘1’ + k; 
int 和 char 可以直接加，vector。// LeetCode, Su]]></description><category></category></item><item><title><![CDATA[leetcode-36-valid sudoku]]></title><link>https://blog.youkuaiyun.com/summerdj/article/details/52608331</link><guid>https://blog.youkuaiyun.com/summerdj/article/details/52608331</guid><author>summerdj</author><pubDate>Wed, 21 Sep 2016 15:05:17 +0800</pubDate><description><![CDATA[Determine if a Sudoku is valid, according to: Sudoku Puzzles - The Rules.The Sudoku board could be partially filled, where empty cells are filled with the character ‘.’.A partially filled sudoku which]]></description><category></category></item><item><title><![CDATA[leetcode-35-search insert position]]></title><link>https://blog.youkuaiyun.com/summerdj/article/details/52541373</link><guid>https://blog.youkuaiyun.com/summerdj/article/details/52541373</guid><author>summerdj</author><pubDate>Wed, 14 Sep 2016 20:52:05 +0800</pubDate><description><![CDATA[Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in order.You may assume no duplicates in the array.Here]]></description><category></category></item><item><title><![CDATA[leetcode-34-search for a range]]></title><link>https://blog.youkuaiyun.com/summerdj/article/details/52537834</link><guid>https://blog.youkuaiyun.com/summerdj/article/details/52537834</guid><author>summerdj</author><pubDate>Wed, 14 Sep 2016 14:41:15 +0800</pubDate><description><![CDATA[Given a sorted array of integers, find the starting and ending position of a given target value.Your algorithm’s runtime complexity must be in the order of O(log n).If the target is not found in the ar]]></description><category></category></item><item><title><![CDATA[leetcode-33-search in rotated array]]></title><link>https://blog.youkuaiyun.com/summerdj/article/details/52488361</link><guid>https://blog.youkuaiyun.com/summerdj/article/details/52488361</guid><author>summerdj</author><pubDate>Fri, 09 Sep 2016 16:24:04 +0800</pubDate><description><![CDATA[Suppose a sorted array 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).You are given a target value to search. If found in the array return its index]]></description><category></category></item><item><title><![CDATA[leetcode-32-Longest Valid Parentheses]]></title><link>https://blog.youkuaiyun.com/summerdj/article/details/52366400</link><guid>https://blog.youkuaiyun.com/summerdj/article/details/52366400</guid><author>summerdj</author><pubDate>Tue, 30 Aug 2016 09:20:02 +0800</pubDate><description><![CDATA[Given a string containing just the characters ‘(’ and ‘)’, find the length of the longest valid (well-formed) parentheses substring.For “(()”, the longest valid parentheses substring is “()”, which has]]></description><category></category></item><item><title><![CDATA[leetcode-02-add two numbers-c++]]></title><link>https://blog.youkuaiyun.com/summerdj/article/details/52329271</link><guid>https://blog.youkuaiyun.com/summerdj/article/details/52329271</guid><author>summerdj</author><pubDate>Fri, 26 Aug 2016 15:56:06 +0800</pubDate><description><![CDATA[You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it as a linke]]></description><category></category></item><item><title><![CDATA[leetcode-31-Next Permutation]]></title><link>https://blog.youkuaiyun.com/summerdj/article/details/52300817</link><guid>https://blog.youkuaiyun.com/summerdj/article/details/52300817</guid><author>summerdj</author><pubDate>Wed, 24 Aug 2016 15:25:22 +0800</pubDate><description><![CDATA[题目： Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers.If such arrangement is not possible, it must rearrange it as the lowest possible]]></description><category></category></item><item><title><![CDATA[leetcode-30-Substring with Concatenation of All Words]]></title><link>https://blog.youkuaiyun.com/summerdj/article/details/52096323</link><guid>https://blog.youkuaiyun.com/summerdj/article/details/52096323</guid><author>summerdj</author><pubDate>Tue, 02 Aug 2016 17:28:01 +0800</pubDate><description><![CDATA[You are given a string, s, and a list of words, words, that are all of the same length. Find all starting indices of substring(s) in s that is a concatenation of each word in words exactly once and wit]]></description><category></category></item><item><title><![CDATA[leetcode-29-Divide Two Integers]]></title><link>https://blog.youkuaiyun.com/summerdj/article/details/51833047</link><guid>https://blog.youkuaiyun.com/summerdj/article/details/51833047</guid><author>summerdj</author><pubDate>Tue, 05 Jul 2016 17:07:36 +0800</pubDate><description><![CDATA[题目：Divide two integers without using multiplication, division and mod operator.If it is overflow, return MAX_INT.题目大意：不用乘法除法和取余运算符来完成除法运算。 
思路：只能用减法咯。 
a 除以 b 
每次我们可以使用2分法来加速这个过程。每次减运算时对除数乘以2加倍，直到它比被除数]]></description><category></category></item><item><title><![CDATA[leetcode-28-Implement strStr()]]></title><link>https://blog.youkuaiyun.com/summerdj/article/details/51570539</link><guid>https://blog.youkuaiyun.com/summerdj/article/details/51570539</guid><author>summerdj</author><pubDate>Thu, 02 Jun 2016 22:01:42 +0800</pubDate><description><![CDATA[题目：Returns the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack.题目大意：给两个字符串haystack和needle。返回needle在haystack中第一次出现的位置。思路：遍历haystack。如果在i位置满足条件就返回当前位置。注意边界条件。]]></description><category></category></item><item><title><![CDATA[leetcode-27-Remove Element]]></title><link>https://blog.youkuaiyun.com/summerdj/article/details/51554549</link><guid>https://blog.youkuaiyun.com/summerdj/article/details/51554549</guid><author>summerdj</author><pubDate>Wed, 01 Jun 2016 11:17:10 +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 memory.The or]]></description><category></category></item><item><title><![CDATA[leetcode-26-Remove Duplicates from Sorted Array]]></title><link>https://blog.youkuaiyun.com/summerdj/article/details/51554269</link><guid>https://blog.youkuaiyun.com/summerdj/article/details/51554269</guid><author>summerdj</author><pubDate>Wed, 01 Jun 2016 10:49:31 +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 place with c]]></description><category></category></item><item><title><![CDATA[leetcode-25-Reverse Nodes in k-Group]]></title><link>https://blog.youkuaiyun.com/summerdj/article/details/51549738</link><guid>https://blog.youkuaiyun.com/summerdj/article/details/51549738</guid><author>summerdj</author><pubDate>Tue, 31 May 2016 22:24:04 +0800</pubDate><description><![CDATA[Given a linked list, reverse the nodes of a linked list k at a time and return its modified list.If the number of nodes is not a multiple of k then left-out nodes in the end should remain as it is.You]]></description><category></category></item><item><title><![CDATA[leetcode-24-Swap Nodes in Pairs]]></title><link>https://blog.youkuaiyun.com/summerdj/article/details/51457424</link><guid>https://blog.youkuaiyun.com/summerdj/article/details/51457424</guid><author>summerdj</author><pubDate>Thu, 19 May 2016 21:50:56 +0800</pubDate><description><![CDATA[题目：iven 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.交换链表每两个元素的位置。思路： 
1.出现单个的情况链表不变 
2.链表为空或者只有一个元素，返回head头]]></description><category></category></item><item><title><![CDATA[c语言文件操作总结]]></title><link>https://blog.youkuaiyun.com/summerdj/article/details/51437317</link><guid>https://blog.youkuaiyun.com/summerdj/article/details/51437317</guid><author>summerdj</author><pubDate>Tue, 17 May 2016 16:42:18 +0800</pubDate><description><![CDATA[周末填坑]]></description><category></category></item></channel></rss>