<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>MinicitY</title>
    <description>A Blog City</description>
    <link>https://MinicitY.github.io/</link>
    <atom:link href="https://MinicitY.github.io/feed.xml" rel="self" type="application/rss+xml"/>
    <pubDate>Tue, 28 Aug 2018 17:26:42 +0000</pubDate>
    <lastBuildDate>Tue, 28 Aug 2018 17:26:42 +0000</lastBuildDate>
    <generator>Jekyll v3.7.3.1</generator>
    
      <item>
        <title>算导注解目录</title>
        <description>突然就想鸽掉算导了。虽然知识点+题目可能也就完成了50%到60%的样子，不过其实作者也在Quora上说过，8小时工作制下完整读完这本书要一年……想来能在暑假两个多月写这么多东西已经是很不错的了。写算导的初衷，无非就是想给自己找点事情做而已。马上要开学了，难以再心无旁骛，于是就先这样吧。

</description>
        <pubDate>Wed, 29 Aug 2018 00:00:00 +0000</pubDate>
        <link>https://MinicitY.github.io/2018/08/29/IntroductionToAlgorithm-16/</link>
        <guid isPermaLink="true">https://MinicitY.github.io/2018/08/29/IntroductionToAlgorithm-16/</guid>
        
        
        <category>Algorithm</category>
        
      </item>
    
      <item>
        <title>HDFS概念和MapReduce原理</title>
        <description>&lt;ul id=&quot;markdown-toc&quot;&gt;
  &lt;li&gt;&lt;a href=&quot;#hdfs&quot; id=&quot;markdown-toc-hdfs&quot;&gt;&lt;strong&gt;HDFS&lt;/strong&gt;&lt;/a&gt;    &lt;ul&gt;
      &lt;li&gt;&lt;a href=&quot;#基本概念&quot; id=&quot;markdown-toc-基本概念&quot;&gt;基本概念&lt;/a&gt;&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

HDFS是Hadoop的文件系统，MapReduce是Hadoop并行计算框架。

&lt;h2 id=&quot;hdfs&quot;&gt;&lt;strong&gt;HDFS&lt;/strong&gt;&lt;/h2&gt;

&lt;h4 id=&quot;基本概念&quot;&gt;基本概念&lt;/h4&gt;

HDFS是Hadoop的分布式文件系统，全名为Hadoop Distributed File System。它有以下三个基本概念：

&lt;ul&gt;
  &lt;li&gt;Block（块）&lt;/li&gt;
  &lt;li&gt;NameNode&lt;/li&gt;
  &lt;li&gt;DataNode&lt;/li&gt;
&lt;/ul&gt;

&lt;strong&gt;块&lt;/strong&gt;是默认大小为64MB的逻辑单元。HDFS里面的文件被分成相同大小的数据块来进行存储和管理。当然，文件的备份和查找也是基于数据块进行处理的。

&lt;strong&gt;NameNode&lt;/strong&gt;是管理节点（直译名字节点）。它存放着文件与数据块（Block）的映射表，也存放着数据块与数据节点（DataNode）的映射表。这俩被统称为文件元数据。

&lt;strong&gt;DataNode&lt;/strong&gt;是工作节点（也就是数据节点），用来存放数据块。比如下图中，每个工作节点就存放了三个数据块。

</description>
        <pubDate>Sat, 04 Aug 2018 00:00:00 +0000</pubDate>
        <link>https://MinicitY.github.io/2018/08/04/RecordOfBigData(Hadoop-1-)/</link>
        <guid isPermaLink="true">https://MinicitY.github.io/2018/08/04/RecordOfBigData(Hadoop-1-)/</guid>
        
        <category>MapReduce</category>
        
        <category>HDFS</category>
        
        <category>Hadoop</category>
        
        
        <category>Big_Data</category>
        
      </item>
    
      <item>
        <title>算导注解Chapter[15]</title>
        <description>&lt;ul id=&quot;markdown-toc&quot;&gt;
  &lt;li&gt;&lt;a href=&quot;#preview&quot; id=&quot;markdown-toc-preview&quot;&gt;&lt;strong&gt;Preview&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;preview&quot;&gt;&lt;strong&gt;Preview&lt;/strong&gt;&lt;/h2&gt;

&lt;strong&gt;动态规划&lt;/strong&gt;方法是一种对具有交叠子问题的问题进行求解的技术。如果不同的子问题拥有公共的子子问题，那么分治算法的递归里有可能会反复地求解一个公共的子子问题。不得不承认，DP(dynamic program)大概是本书唯一能够抗衡分治法的存在了。尽管这本书没有提到Warshall和Ford，没有背包问题也没有小机器人，剩下的文字依然皓如繁星。愿天堂没有DP。

先修知识：

&lt;strong&gt;钢条切割问题&lt;/strong&gt;指的是，将一条长钢条切割成几条短钢条出售，求解售价最大化问题。其中不同长度的钢条的价格不同，甚至也会出现根本不切割而利益最大的情形。也可以概括为，利用手上限额的资源，合理分配以达到利益最大化的问题。

&lt;strong&gt;最长公共子序列问题&lt;/strong&gt;指的是，求解两个序列的最长的相同子序列。子序列所含元素在序列中的位置下标应该是严格递增的。例如，Z={B,C,D,B}是X={A,B,C,B,D,A,B}的子序列，此时位置下标为{1,2,4,6}。

</description>
        <pubDate>Fri, 03 Aug 2018 00:00:00 +0000</pubDate>
        <link>https://MinicitY.github.io/2018/08/03/IntroductionToAlgorithm-15/</link>
        <guid isPermaLink="true">https://MinicitY.github.io/2018/08/03/IntroductionToAlgorithm-15/</guid>
        
        <category>动态规划</category>
        
        <category>LCS</category>
        
        
        <category>Algorithm</category>
        
      </item>
    
      <item>
        <title>LeetCode初级算法-字符串（下）</title>
        <description>&lt;ul id=&quot;markdown-toc&quot;&gt;
  &lt;li&gt;&lt;a href=&quot;#验证回文字符串&quot; id=&quot;markdown-toc-验证回文字符串&quot;&gt;&lt;strong&gt;验证回文字符串&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;验证回文字符串&quot;&gt;&lt;strong&gt;验证回文字符串&lt;/strong&gt;&lt;/h2&gt;

&lt;blockquote&gt;
  Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases.

  Note: For the purpose of this problem, we define empty string as valid palindrome.

  Example 1:

  Input: “A man, a plan, a canal: Panama”
Output: true

  Example 2:

  Input: “race a car”
Output: false
&lt;/blockquote&gt;

easy one. 字符串练手。

</description>
        <pubDate>Wed, 01 Aug 2018 00:00:00 +0000</pubDate>
        <link>https://MinicitY.github.io/2018/08/01/LeetCodeComments-4/</link>
        <guid isPermaLink="true">https://MinicitY.github.io/2018/08/01/LeetCodeComments-4/</guid>
        
        <category>字符串</category>
        
        
        <category>LeetCode</category>
        
      </item>
    
      <item>
        <title>算导注解Chapter[12&amp;13&amp;14]</title>
        <description>&lt;ul id=&quot;markdown-toc&quot;&gt;
  &lt;li&gt;&lt;a href=&quot;#preview&quot; id=&quot;markdown-toc-preview&quot;&gt;&lt;strong&gt;Preview&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;preview&quot;&gt;&lt;strong&gt;Preview&lt;/strong&gt;&lt;/h2&gt;

先修知识：

一棵树不存在回路。其中除了根结点以外所有的结点都有父结点（或者说父结点为NIL），除了叶子以外所有的结点都有子结点（或者说子结点为NIL）。二叉树描述的是包含叶子和根在内的所有结点，都最多只有两个子结点（或者子树）的树结构。二叉树体系内最重要的一种叫做二叉搜索树（又叫二叉查找树），再往下分，二叉搜索树又包括平衡二叉查找树（AVL树）和红黑树等等。

&lt;hr /&gt;

扩张数据结构一般要走下列四个步骤：

&lt;ol&gt;
  &lt;li&gt;选择一种基础数据结构&lt;/li&gt;
  &lt;li&gt;确定基础数据结构中要维护的附加信息&lt;/li&gt;
  &lt;li&gt;检验基础数据结构上的基本修改操作能否维护附加信息&lt;/li&gt;
  &lt;li&gt;设计一些新操作&lt;/li&gt;
&lt;/ol&gt;

举个例子，选取一个完全二叉树。我要维护的是结点的关键字逐层往上递减这个性质，因此修改内部代码之后，再设计一个新操作EXTRACT-MIN，就能把这个完全二叉树扩张成为一个最小堆了。

&lt;hr /&gt;

</description>
        <pubDate>Sat, 28 Jul 2018 00:00:00 +0000</pubDate>
        <link>https://MinicitY.github.io/2018/07/28/IntroductionToAlgorithm-12&13&14/</link>
        <guid isPermaLink="true">https://MinicitY.github.io/2018/07/28/IntroductionToAlgorithm-12&13&14/</guid>
        
        <category>二叉搜索树</category>
        
        <category>红黑树</category>
        
        <category>AVL树</category>
        
        
        <category>Data_Structure</category>
        
      </item>
    
      <item>
        <title>算导注解Chapter[10&amp;11]</title>
        <description>&lt;ul id=&quot;markdown-toc&quot;&gt;
  &lt;li&gt;&lt;a href=&quot;#preview&quot; id=&quot;markdown-toc-preview&quot;&gt;&lt;strong&gt;Preview&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;preview&quot;&gt;&lt;strong&gt;Preview&lt;/strong&gt;&lt;/h2&gt;

忙完实习后，终于有时间更新了……这一讲会讨论一些基本的数据结构和散列表。比起算法而言，数据结构应该更通用也更实用些，毕竟小项目可以只招一些API战士，而增删改查 (CRUD boy) 是绝对离不开数据结构的。书上的诸如「指针和对象的实现」就跳过了，我只用 java 和 python 。

keywords: &lt;code class=&quot;highlighter-rouge&quot;&gt;基本数据结构&lt;/code&gt; &lt;code class=&quot;highlighter-rouge&quot;&gt;散列技术（函数）&lt;/code&gt;

</description>
        <pubDate>Mon, 23 Jul 2018 00:00:00 +0000</pubDate>
        <link>https://MinicitY.github.io/2018/07/23/IntroductionToAlgorithm-10&11/</link>
        <guid isPermaLink="true">https://MinicitY.github.io/2018/07/23/IntroductionToAlgorithm-10&11/</guid>
        
        <category>栈</category>
        
        <category>队列</category>
        
        <category>链表</category>
        
        <category>散列表</category>
        
        
        <category>Data_Structure</category>
        
      </item>
    
      <item>
        <title>LeetCode初级算法-字符串（上）</title>
        <description>&lt;ul id=&quot;markdown-toc&quot;&gt;
  &lt;li&gt;&lt;a href=&quot;#颠倒整数&quot; id=&quot;markdown-toc-颠倒整数&quot;&gt;&lt;strong&gt;颠倒整数&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;颠倒整数&quot;&gt;&lt;strong&gt;颠倒整数&lt;/strong&gt;&lt;/h2&gt;

&lt;blockquote&gt;
  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 within the 32-bit signed integer range: [−231,  231 − 1]. For the purpose of this problem, assume that your function returns 0 when the reversed integer overflows.
&lt;/blockquote&gt;

利用取余数的性质。

</description>
        <pubDate>Fri, 20 Jul 2018 00:00:00 +0000</pubDate>
        <link>https://MinicitY.github.io/2018/07/20/LeetCodeComments-3/</link>
        <guid isPermaLink="true">https://MinicitY.github.io/2018/07/20/LeetCodeComments-3/</guid>
        
        <category>字符串</category>
        
        
        <category>LeetCode</category>
        
      </item>
    
      <item>
        <title>Arduino记录[2]</title>
        <description>&lt;ul id=&quot;markdown-toc&quot;&gt;
  &lt;li&gt;&lt;a href=&quot;#日型管控制&quot; id=&quot;markdown-toc-日型管控制&quot;&gt;&lt;strong&gt;日型管控制&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;日型管控制&quot;&gt;&lt;strong&gt;日型管控制&lt;/strong&gt;&lt;/h2&gt;

展示如图。生成各种随机数，并有一个按钮来暂停以实现随机取数的功能。

&lt;img src=&quot;https://raw.githubusercontent.com/MinicitY/MyImg/master/dice.gif&quot; alt=&quot;&quot; /&gt;

</description>
        <pubDate>Mon, 16 Jul 2018 00:00:00 +0000</pubDate>
        <link>https://MinicitY.github.io/2018/07/16/Arduino-2/</link>
        <guid isPermaLink="true">https://MinicitY.github.io/2018/07/16/Arduino-2/</guid>
        
        <category>Arduino</category>
        
        
        <category>单片机</category>
        
      </item>
    
      <item>
        <title>Arduino记录[1]</title>
        <description>&lt;ul id=&quot;markdown-toc&quot;&gt;
  &lt;li&gt;&lt;a href=&quot;#外部控制&quot; id=&quot;markdown-toc-外部控制&quot;&gt;&lt;strong&gt;外部控制&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;外部控制&quot;&gt;&lt;strong&gt;外部控制&lt;/strong&gt;&lt;/h2&gt;

高中物理有提到过控制电路的几个方法：光敏电阻、压感电阻、按钮、旋转器等等。Arduino也比较类似。

&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;const int analogPin = A0;//the analog input pin attach to
const int ledPin = 9;//the led attach to
int inputValue = 0;//variable to store the value coming from sensor
int outputValue = 0;//variable to store the output value

void setup()
{
}

void loop()
{
inputValue = analogRead(analogPin);//read the value from the sensor
outputValue = map(inputValue,0,1023,0,255);//Convert from 0-1023 proportional to the number of a number of from 0 to 255
analogWrite(ledPin,outputValue);//turn the led on depend on the output value
}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

</description>
        <pubDate>Thu, 12 Jul 2018 00:00:00 +0000</pubDate>
        <link>https://MinicitY.github.io/2018/07/12/Arduino-1/</link>
        <guid isPermaLink="true">https://MinicitY.github.io/2018/07/12/Arduino-1/</guid>
        
        <category>Arduino</category>
        
        
        <category>单片机</category>
        
      </item>
    
      <item>
        <title>Arduino记录[0]</title>
        <description>&lt;ul id=&quot;markdown-toc&quot;&gt;
  &lt;li&gt;&lt;a href=&quot;#arduino简介&quot; id=&quot;markdown-toc-arduino简介&quot;&gt;&lt;strong&gt;Arduino简介&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;arduino简介&quot;&gt;&lt;strong&gt;Arduino简介&lt;/strong&gt;&lt;/h2&gt;

Arduino是一款便捷灵活、方便上手的开源电子原型平台。包含硬件（各种型号的Arduino板）和软件（Arduino IDE)。本质上，Arduino板是一块控制器，并且需要Arduino语言来操控。为了简化编程过程，语言界面甚至连主函数都不需要（似乎库用的是cpp文件）。

&lt;img src=&quot;https://raw.githubusercontent.com/MinicitY/MyImg/master/UNO%E6%9D%BF.jpg&quot; alt=&quot;&quot; /&gt;

</description>
        <pubDate>Thu, 12 Jul 2018 00:00:00 +0000</pubDate>
        <link>https://MinicitY.github.io/2018/07/12/Arduino-0/</link>
        <guid isPermaLink="true">https://MinicitY.github.io/2018/07/12/Arduino-0/</guid>
        
        <category>Arduino</category>
        
        
        <category>单片机</category>
        
      </item>
    
  </channel>
</rss>
