用三种不同的方法解[483 Smallest Good Base](https://leetcode.com/contest/leetcode-weekly-contest-16b/problems/smallest-good-base/). For an integer n, we call k>=2 a good base of n, if all digits of n base k are 1. Now given a string representing n, you should return the smallest good base of n in string format.
一道有意思的题目, 用到了异或运算的一个小特性. [LeetCode 421 Maximum XOR of Two Numbers in an Array](https://leetcode.com/problems/maximum-xor-of-two-numbers-in-an-array/). Given a non-empty array of numbers, a0, a1, a2, … , an-1, where 0 ≤ ai < 231. Find the maximum result of ai XOR aj, where 0 ≤ i, j < n. Could you do this in O(n) runtime?
[LeetCode 4 Median of Two Sorted Arrays](https://leetcode.com/problems/median-of-two-sorted-arrays/). There are two sorted arrays nums1 and nums2 of size m and n respectively.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+n)). LeetCode 中第一道Hard难度的题目, 做了好几遍, 还是不能bug-free一遍过.
You have a row of balls on the table, colored red(R), yellow(Y), blue(B), green(G), and white(W). You also have several balls in your hand. Each time, you may choose a ball in your hand, and insert it into the row (including the leftmost place and rightmost place). Then, if there is a group of 3 or more balls in the same color touching, remove these balls. Keep doing this until no more balls can be removed. Find the minimal balls you have to insert to remove all the balls on the table.
While reading the article in [GeeksForGeeks about the Floyd-Warshall Algorithm](http://www.geeksforgeeks.org/dynamic-programming-set-16-floyd-warshall-algorithm/), I got little confused about the correctness of this algorithm, wondering why it works. After spending some time understanding it and search the proof about this algorithm, now I understand why the `k` loop should be the out-est loop in the algorithm. Here is some explanation for this algorithm where [GeeksForGeeks about the Floyd-Warshall Algorithm](http://www.geeksforgeeks.org/dynamic-programming-set-16-floyd-warshall-algorithm/) didn't explain well.