<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[Appletable的博客]]></title><description><![CDATA[]]></description><link>https://blog.youkuaiyun.com/Appletable</link><language>zh-cn</language><generator>https://blog.youkuaiyun.com/</generator><copyright><![CDATA[Copyright &copy; Appletable]]></copyright><item><title><![CDATA[记录一下CountDownLatch 和 CyclicBarrier 的使用例子]]></title><link>https://blog.youkuaiyun.com/Appletable/article/details/52244875</link><guid>https://blog.youkuaiyun.com/Appletable/article/details/52244875</guid><author>Appletable</author><pubDate>Thu, 18 Aug 2016 21:02:24 +0800</pubDate><description><![CDATA[之前的面试有被提到过java.util.concurrent中解决并发的问题。
看Thinking in Java 学习一下其中一些构件的使用。
本文记录关于CountDownLatch  和 CyclicBarrier 使用的小例子。
CountDownLatch 典型用法就是将一个程序分成n个相互独立的可解决的任务（锁存器）
public class CountDownLatchDem]]></description><category></category></item><item><title><![CDATA[Animation and Graphics partⅡ Property Animation]]></title><link>https://blog.youkuaiyun.com/Appletable/article/details/51821538</link><guid>https://blog.youkuaiyun.com/Appletable/article/details/51821538</guid><author>Appletable</author><pubDate>Thu, 07 Jul 2016 14:13:17 +0800</pubDate><description><![CDATA[本文是对Android动画API的官方资料的翻译。
原文连接：https://developer.android.com/guide/topics/graphics/prop-animation.html
以下正文开始：
属性动画
属性动画系统是一个强大的框架，几乎可以使任何对象产生动画。你可以随着时间改变任意的对象属性来定义动画效果，不管该属性是否显示在屏幕上。属性动画在指定的时间长度改]]></description><category></category></item><item><title><![CDATA[Animation and Graphics partⅠ Overview]]></title><link>https://blog.youkuaiyun.com/Appletable/article/details/51817898</link><guid>https://blog.youkuaiyun.com/Appletable/article/details/51817898</guid><author>Appletable</author><pubDate>Mon, 04 Jul 2016 15:52:24 +0800</pubDate><description><![CDATA[对Android动画API的官方资料的翻译。
原文链接：https://developer.android.com/guide/topics/graphics/overview.html
以下正文开始：
动画和图形概述
Android提供了很多功能强大的API，将动画应用于 UI 元素和绘制自定义 2D 或者 3D 图形方面。
动画（Animation）
Android提供了两种动画系]]></description><category></category></item><item><title><![CDATA[LeetCode 202. Happy Number & 263. Ugly Number]]></title><link>https://blog.youkuaiyun.com/Appletable/article/details/51817036</link><guid>https://blog.youkuaiyun.com/Appletable/article/details/51817036</guid><author>Appletable</author><pubDate>Sun, 03 Jul 2016 22:01:03 +0800</pubDate><description><![CDATA[202. Happy Number


Write an algorithm to determine if a number is "happy".

A happy number is a number defined by the following process: Starting with any positive integer, replace the number by]]></description><category></category></item><item><title><![CDATA[LeetCode 371. Sum of Two Integers]]></title><link>https://blog.youkuaiyun.com/Appletable/article/details/51788796</link><guid>https://blog.youkuaiyun.com/Appletable/article/details/51788796</guid><author>Appletable</author><pubDate>Thu, 30 Jun 2016 11:46:26 +0800</pubDate><description><![CDATA[Calculate the sum of two integers a and b, but you are not allowed to use the operator + and -.

Example:

Given a = 1 and b = 2, return 3.
分析：不使用“+”“-”等符号来进行加法运算。一般情况下是可以用位运算来解决。
先来看一位二进制加法
1 ]]></description><category></category></item><item><title><![CDATA[LeetCode 141. Linked List Cycle]]></title><link>https://blog.youkuaiyun.com/Appletable/article/details/50867858</link><guid>https://blog.youkuaiyun.com/Appletable/article/details/50867858</guid><author>Appletable</author><pubDate>Sat, 12 Mar 2016 21:51:28 +0800</pubDate><description><![CDATA[Given a linked list, determine if it has a cycle in it.

Follow up:

Can you solve it without using extra space?
分析：可以将结点存入数组中，此方法需要额外的空间，也可以用双指针，快慢指针同时向前跑，如果跑到结尾，就没环，如果被套圈，证明有环。
代码：
/**
 * Def]]></description><category></category></item><item><title><![CDATA[LeetCode 96. Unique Binary Search Trees]]></title><link>https://blog.youkuaiyun.com/Appletable/article/details/50821437</link><guid>https://blog.youkuaiyun.com/Appletable/article/details/50821437</guid><author>Appletable</author><pubDate>Mon, 07 Mar 2016 18:33:22 +0800</pubDate><description><![CDATA[Given n, how many structurally unique BST's (binary search trees) that store values 1...n?

For example,
Given n = 3, there are a total of 5 unique BST's.
   1         3     3      2      1
    \ ]]></description><category></category></item><item><title><![CDATA[LeetCode 278. First Bad Version]]></title><link>https://blog.youkuaiyun.com/Appletable/article/details/50819653</link><guid>https://blog.youkuaiyun.com/Appletable/article/details/50819653</guid><author>Appletable</author><pubDate>Mon, 07 Mar 2016 15:23:14 +0800</pubDate><description><![CDATA[You are a product manager and currently leading a team to develop a new product. Unfortunately, the latest version of your product fails the quality check. Since each version is developed based on the]]></description><category></category></item><item><title><![CDATA[LeetCode 35. Search Insert Position]]></title><link>https://blog.youkuaiyun.com/Appletable/article/details/50817578</link><guid>https://blog.youkuaiyun.com/Appletable/article/details/50817578</guid><author>Appletable</author><pubDate>Mon, 07 Mar 2016 10:42:40 +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.]]></description><category></category></item><item><title><![CDATA[LeetCode 328. Odd Even Linked List]]></title><link>https://blog.youkuaiyun.com/Appletable/article/details/50816984</link><guid>https://blog.youkuaiyun.com/Appletable/article/details/50816984</guid><author>Appletable</author><pubDate>Mon, 07 Mar 2016 09:26:33 +0800</pubDate><description><![CDATA[Given a singly linked list, group all odd nodes together followed by the even nodes. Please note here we are talking about the node number and not the value in the nodes.

You should try to do it in]]></description><category></category></item><item><title><![CDATA[LeetCode 231. Power of Two & 326. Power of Three]]></title><link>https://blog.youkuaiyun.com/Appletable/article/details/50808308</link><guid>https://blog.youkuaiyun.com/Appletable/article/details/50808308</guid><author>Appletable</author><pubDate>Sat, 05 Mar 2016 12:58:53 +0800</pubDate><description><![CDATA[Given an integer, write a function to determine if it is a power of two or three.
分析：判断一个数是否是2的幂（另一题是3的幂）
直观的解决办法就是循环除 2 或者 3 来判断，另外一种不需要循环的方式就是用对数和幂指数的数学方法来运算。
另外，由于数据可以用二进制表示，那么 2 的幂可以通过位运算来判断。
]]></description><category></category></item><item><title><![CDATA[LeetCode 191. Number of 1 Bits]]></title><link>https://blog.youkuaiyun.com/Appletable/article/details/50807540</link><guid>https://blog.youkuaiyun.com/Appletable/article/details/50807540</guid><author>Appletable</author><pubDate>Sat, 05 Mar 2016 10:27:50 +0800</pubDate><description><![CDATA[Write a function that takes an unsigned integer and returns the number of ’1' bits it has (also known as the Hamming
 weight).

For example, the 32-bit integer ’11' has binary representation 000000]]></description><category></category></item><item><title><![CDATA[Java排序算法总结之（五）—— 基数排序]]></title><link>https://blog.youkuaiyun.com/Appletable/article/details/50788343</link><guid>https://blog.youkuaiyun.com/Appletable/article/details/50788343</guid><author>Appletable</author><pubDate>Thu, 03 Mar 2016 14:33:40 +0800</pubDate><description><![CDATA[排序方法可以分为两种：内部排序 和 外部排序

内部排序的方法很多，常用的大致可以分为：

插入排序（直接插入排序、折半插入排序、希尔排序）交换排序（冒泡排序、快速排序）选择排序（简单选择排序、堆排序）归并排序基数排序
基数排序
基本思想：与之前各种排序算法需要比较和移动不同，基数排序不需要比较，只通过关键字分类来完成排序。
比如一个序列有 n 个数据 {R1，R2，R3，…,Rn}]]></description><category></category></item><item><title><![CDATA[Java排序算法总结之（四）——归并排序]]></title><link>https://blog.youkuaiyun.com/Appletable/article/details/50787322</link><guid>https://blog.youkuaiyun.com/Appletable/article/details/50787322</guid><author>Appletable</author><pubDate>Thu, 03 Mar 2016 11:41:59 +0800</pubDate><description><![CDATA[排序方法可以分为两种：内部排序 和 外部排序

内部排序的方法很多，常用的大致可以分为：

插入排序（直接插入排序、折半插入排序、希尔排序）交换排序（冒泡排序、快速排序）选择排序（简单选择排序、堆排序）归并排序基数排序
归并排序：
基本思想：将两个或两个以上的有序表组合成一个新的有序表。
归并的思路很好理解，有下面的示例：
示例：
           
Java代码：
pu]]></description><category></category></item><item><title><![CDATA[Java排序算法总结之（三）——选择排序（简单选择排序、堆排序）]]></title><link>https://blog.youkuaiyun.com/Appletable/article/details/50780665</link><guid>https://blog.youkuaiyun.com/Appletable/article/details/50780665</guid><author>Appletable</author><pubDate>Wed, 02 Mar 2016 15:56:58 +0800</pubDate><description><![CDATA[排序方法可以分为两种：内部排序 和 外部排序

内部排序的方法很多，常用的大致可以分为：

插入排序（直接插入排序、折半插入排序、希尔排序）交换排序（冒泡排序、快速排序）选择排序（简单选择排序、堆排序）归并排序基数排序
选择排序
1.简单选择排序
基本思想：对数列的 n 个元素进行比较，选出最小（或者最大）的元素，与起始位置的值交换，再从余下的数据中找到最小（最大）值，放在已排序部分]]></description><category></category></item><item><title><![CDATA[Java排序算法总结之（二）——基于交换排序（冒泡排序、快速排序）]]></title><link>https://blog.youkuaiyun.com/Appletable/article/details/50775293</link><guid>https://blog.youkuaiyun.com/Appletable/article/details/50775293</guid><author>Appletable</author><pubDate>Tue, 01 Mar 2016 20:10:22 +0800</pubDate><description><![CDATA[交换排序
1.冒泡排序
基本操作：



比较相邻的元素。如果第一个比第二个大，就交换他们两个。对每一对相邻元素作同样的工作，从开始第一对到结尾的最后一对。这步做完后，最后的元素会是最大的数。针对所有的元素重复以上的步骤，除了最后一个。持续每次对越来越少的元素重复上面的步骤，直到没有任何一对数字需要比较。
冒泡排序简介易懂，是入门的程序设计算法之一。

Java代码：
publ]]></description><category></category></item><item><title><![CDATA[Java排序算法总结之（一）——插入排序（直接插入排序、折半插入排序、希尔排序）]]></title><link>https://blog.youkuaiyun.com/Appletable/article/details/50769037</link><guid>https://blog.youkuaiyun.com/Appletable/article/details/50769037</guid><author>Appletable</author><pubDate>Mon, 29 Feb 2016 22:51:21 +0800</pubDate><description><![CDATA[排序方法可以分为两种：内部排序 和 外部排序
内部排序的方法很多，大致可以分为：


插入排序（直接插入排序、折半插入排序、希尔排序）快速排序（基于交换的一种排序方式，最常见的是 冒泡排序）选择排序（简单选择排序、堆排序）归并排序基数排序
一、直接插入排序

基本操作：将一个数据插入到已排好序的有序表中，从而得到一个新的、长度加1的有序表。
代码：
package com.yan]]></description><category></category></item><item><title><![CDATA[LeetCode 235. Lowest Common Ancestor of a Binary Search Tree]]></title><link>https://blog.youkuaiyun.com/Appletable/article/details/50759453</link><guid>https://blog.youkuaiyun.com/Appletable/article/details/50759453</guid><author>Appletable</author><pubDate>Sun, 28 Feb 2016 11:48:30 +0800</pubDate><description><![CDATA[Given a binary search tree (BST), find the lowest common ancestor (LCA) of two given nodes in the BST.

According to the definition of LCA on Wikipedia: “The lowest common ancestor is defined
 betw]]></description><category></category></item><item><title><![CDATA[LeetCode 12. Integer to Roman & 13. Roman to Integer]]></title><link>https://blog.youkuaiyun.com/Appletable/article/details/50754824</link><guid>https://blog.youkuaiyun.com/Appletable/article/details/50754824</guid><author>Appletable</author><pubDate>Sat, 27 Feb 2016 13:21:20 +0800</pubDate><description><![CDATA[罗马数字，数字变换，LeetCode]]></description><category></category></item><item><title><![CDATA[LeetCode 206. Reverse Linked List]]></title><link>https://blog.youkuaiyun.com/Appletable/article/details/50741308</link><guid>https://blog.youkuaiyun.com/Appletable/article/details/50741308</guid><author>Appletable</author><pubDate>Thu, 25 Feb 2016 22:17:03 +0800</pubDate><description><![CDATA[Reverse a singly linked list.

Hint:
A linked list can be reversed either iteratively or recursively. Could you implement both?
分析：单链表翻转问题：迭代和递归两种做法
代码一：递归
/**
 * Definition for singly-linked li]]></description><category></category></item></channel></rss>