<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[L_Realoo的博客]]></title><description><![CDATA[]]></description><link>https://blog.youkuaiyun.com/L_Realoo</link><language>zh-cn</language><generator>https://blog.youkuaiyun.com/</generator><copyright><![CDATA[Copyright &copy; L_Realoo]]></copyright><item><title><![CDATA[期末项目：Capacitated Facility Location Problem]]></title><link>https://blog.youkuaiyun.com/L_Realoo/article/details/85421162</link><guid>https://blog.youkuaiyun.com/L_Realoo/article/details/85421162</guid><author>L_Realoo</author><pubDate>Mon, 31 Dec 2018 00:09:03 +0800</pubDate><description><![CDATA[题目


代码
import random
import math
import datetime
import os
import time

INSTANCE_NUMBER = 71
LOOP_LENGTH = 1000
MAX_TEMPERATURE = 100
MIN_TEMPERATURE = 0.5
ATTENUATION_QUOTIENT = 0.9

MAX_NUM = 10000...]]></description><category></category></item><item><title><![CDATA[LeetCode 算法学习(14)]]></title><link>https://blog.youkuaiyun.com/L_Realoo/article/details/85338407</link><guid>https://blog.youkuaiyun.com/L_Realoo/article/details/85338407</guid><author>L_Realoo</author><pubDate>Sat, 29 Dec 2018 14:31:43 +0800</pubDate><description><![CDATA[题目描述

Given an array of non-negative integers, you are initially positioned at the first index of the array.
Each element in the array represents your maximum jump length at that position.
Determine i...]]></description><category></category></item><item><title><![CDATA[LeetCode 算法学习(13)]]></title><link>https://blog.youkuaiyun.com/L_Realoo/article/details/85337827</link><guid>https://blog.youkuaiyun.com/L_Realoo/article/details/85337827</guid><author>L_Realoo</author><pubDate>Sat, 29 Dec 2018 13:59:54 +0800</pubDate><description><![CDATA[题目描述

Given a binary tree, return the inorder traversal of its nodes’ values.

题目大意
对二叉树进行中序遍历。
思路分析
这里我使用非递归的写法，关键在于处理好入栈时机和出栈时机。当栈顶元素没有左子树时出栈，p转向其右子树继续遍历。
关键代码
    vector&amp;lt;int&amp;gt; inorderTraversal...]]></description><category></category></item><item><title><![CDATA[LeeCode 算法学习(12)]]></title><link>https://blog.youkuaiyun.com/L_Realoo/article/details/85303256</link><guid>https://blog.youkuaiyun.com/L_Realoo/article/details/85303256</guid><author>L_Realoo</author><pubDate>Thu, 27 Dec 2018 20:06:16 +0800</pubDate><description><![CDATA[题目描述

Validate Binary Search Tree
Given a binary tree, determine if it is a valid binary search tree (BST).
Assume a BST is defined as follows:
The left subtree of a node contains only nodes with keys...]]></description><category></category></item><item><title><![CDATA[LeetCode 算法学习(11)]]></title><link>https://blog.youkuaiyun.com/L_Realoo/article/details/85299141</link><guid>https://blog.youkuaiyun.com/L_Realoo/article/details/85299141</guid><author>L_Realoo</author><pubDate>Thu, 27 Dec 2018 18:58:36 +0800</pubDate><description><![CDATA[题目描述

Construct Binary Tree from Preorder and Inorder Traversal
Given preorder and inorder traversal of a tree, construct the binary tree.
Note:
You may assume that duplicates do not exist in the tree...]]></description><category></category></item><item><title><![CDATA[LeetCode算法学习(10)]]></title><link>https://blog.youkuaiyun.com/L_Realoo/article/details/85270706</link><guid>https://blog.youkuaiyun.com/L_Realoo/article/details/85270706</guid><author>L_Realoo</author><pubDate>Wed, 26 Dec 2018 23:58:39 +0800</pubDate><description><![CDATA[题目描述

Swap Nodes in Pairs
Given a linked list, swap every two adjacent nodes and return its head.

Example:
Given 1-&amp;gt;2-&amp;gt;3-&amp;gt;4, you should return the list as 2-&amp;gt;1-&amp;gt;4-&amp;gt;3.

Note:
Your al...]]></description><category></category></item><item><title><![CDATA[LeetCode算法学习(9)]]></title><link>https://blog.youkuaiyun.com/L_Realoo/article/details/85270471</link><guid>https://blog.youkuaiyun.com/L_Realoo/article/details/85270471</guid><author>L_Realoo</author><pubDate>Wed, 26 Dec 2018 23:22:30 +0800</pubDate><description><![CDATA[题目描述

Merge Two Sorted Lists
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.

Example:
Input: 1-&amp;gt;2-&amp;gt;...]]></description><category></category></item><item><title><![CDATA[LeetCode算法学习(8)]]></title><link>https://blog.youkuaiyun.com/L_Realoo/article/details/85270262</link><guid>https://blog.youkuaiyun.com/L_Realoo/article/details/85270262</guid><author>L_Realoo</author><pubDate>Wed, 26 Dec 2018 22:57:00 +0800</pubDate><description><![CDATA[题目描述

Valid Parentheses
Given a string containing just the characters ‘(’, ‘)’, ‘{’, ‘}’, ‘[’ and ‘]’, determine if the input string is valid.
An input string is valid if:
1.Open brackets must be clos...]]></description><category></category></item><item><title><![CDATA[LeetCode 算法学习(7)]]></title><link>https://blog.youkuaiyun.com/L_Realoo/article/details/85270054</link><guid>https://blog.youkuaiyun.com/L_Realoo/article/details/85270054</guid><author>L_Realoo</author><pubDate>Wed, 26 Dec 2018 22:36:15 +0800</pubDate><description><![CDATA[题目描述

Remove Nth Node From End of List
Given a linked list, remove the n-th node from the end of list and return its head.

Example:
Given linked list: 1-&amp;gt;2-&amp;gt;3-&amp;gt;4-&amp;gt;5, and n = 2.
After remo...]]></description><category></category></item><item><title><![CDATA[LeetCode 算法学习(6)]]></title><link>https://blog.youkuaiyun.com/L_Realoo/article/details/85269006</link><guid>https://blog.youkuaiyun.com/L_Realoo/article/details/85269006</guid><author>L_Realoo</author><pubDate>Wed, 26 Dec 2018 21:19:20 +0800</pubDate><description><![CDATA[题目描述

Container With Most Water
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 a...]]></description><category></category></item><item><title><![CDATA[LeetCode 算法学习(5)]]></title><link>https://blog.youkuaiyun.com/L_Realoo/article/details/85266891</link><guid>https://blog.youkuaiyun.com/L_Realoo/article/details/85266891</guid><author>L_Realoo</author><pubDate>Wed, 26 Dec 2018 18:32:01 +0800</pubDate><description><![CDATA[题目描述

String to Integer (atoi)
Implement atoi which converts a string to an integer.
The function first discards as many whitespace characters as necessary until the first non-whitespace character is ...]]></description><category></category></item><item><title><![CDATA[LeetCode 算法学习(4)]]></title><link>https://blog.youkuaiyun.com/L_Realoo/article/details/85266327</link><guid>https://blog.youkuaiyun.com/L_Realoo/article/details/85266327</guid><author>L_Realoo</author><pubDate>Wed, 26 Dec 2018 17:56:13 +0800</pubDate><description><![CDATA[題目描述

Reverse Integer
Given a 32-bit signed integer, reverse digits of an integer.

Example 1:
Input: 123
Output: 321

Note:
Assume we are dealing with an environment which could only store integers w...]]></description><category></category></item><item><title><![CDATA[LeetCode 算法学习(3)]]></title><link>https://blog.youkuaiyun.com/L_Realoo/article/details/85263969</link><guid>https://blog.youkuaiyun.com/L_Realoo/article/details/85263969</guid><author>L_Realoo</author><pubDate>Wed, 26 Dec 2018 16:09:58 +0800</pubDate><description><![CDATA[算法描述

Median of Two Sorted Arrays
There are two sorted arrays nums1 and nums2 of size m and n respectively.
Find the median of the two sorted arrays. The overall run time complexity should be O(log (m...]]></description><category></category></item><item><title><![CDATA[LeetCode 算法学习(2)]]></title><link>https://blog.youkuaiyun.com/L_Realoo/article/details/85254962</link><guid>https://blog.youkuaiyun.com/L_Realoo/article/details/85254962</guid><author>L_Realoo</author><pubDate>Tue, 25 Dec 2018 22:05:46 +0800</pubDate><description><![CDATA[题目描述

Longest Substring Without Repeating Characters
Given a string, find the length of the longest substring without repeating characters.
Example 1:

Input: “abcabcbb”
Output: 3
Explanation: The ans...]]></description><category></category></item><item><title><![CDATA[LeetCode 算法学习(1)]]></title><link>https://blog.youkuaiyun.com/L_Realoo/article/details/85251032</link><guid>https://blog.youkuaiyun.com/L_Realoo/article/details/85251032</guid><author>L_Realoo</author><pubDate>Tue, 25 Dec 2018 17:06:34 +0800</pubDate><description><![CDATA[题目描述

Add Two Numbers
You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the tw...]]></description><category></category></item></channel></rss>