原创 【leetcode】455. Assign Cookies【E】

Assume you are an awesome parent and want to give your children some cookies. But, you should give each child at mos

原创 【leetcode】463. Island Perimeter【E】

You are given a map in form of a two-dimensional integer grid where 1 represents land and 0 represents water. Grid ce

原创 【leetcode】453. Minimum Moves to Equal Array Elements【E】

Given a non-empty integer array of size n, find the minimum number of moves required to make all array elements equal,

原创 【leetcode】462. Minimum Moves to Equal Array Elements II【M】

Given a non-empty integer array, find the minimum number of moves required to make all array elements equal, where a

原创 【LeetCode】504. Base 7【E】【94】

Given an integer, return its base 7 string representation. Example 1: Input: 100 Output: "202" Example 2: Input:

原创 【LeetCode】515. Find Largest Value in Each Tree Row【E】【87】

You need to find the largest value in each row of a binary tree. Example: Input: 1 / \

原创 【LeetCode】492. Construct the Rectangle【E】【73】

For a web developer, it is very important to know how to design a web page's size. So, given a specific rectangular w

原创 103. Binary Tree Zigzag Level Order Traversal【M】

Given a binary tree, return the zigzag level order traversal of its nodes' values. (ie, from left to right, then righ

原创 【LeetCode】496. Next Greater Element I【E】【94】

You are given two arrays (without duplicates) nums1 and nums2 where nums1’s elements are subset of nums2. Find al

原创 【LeetCode】508. Most Frequent Subtree Sum【M】【40】

Given the root of a tree, you are asked to find the most frequent subtree sum. The subtree sum of a node is defined as

原创 【LeetCode】520. Detect Capital【E】【83】

Given a word, you need to judge whether the usage of capitals in it is right or not. We define the usage of capitals

原创 【LeetCode】526. Beautiful Arrangement【M】【35】【回溯】

Suppose you have N integers from 1 to N. We define a beautiful arrangement as an array that is constructed by these 

原创 【LeetCode】126. Word Ladder II【H】

Given two words (beginWord and endWord), and a dictionary's word list, find all shortest transformation sequence(s) fr

原创 【LeetCode】537. Complex Number Multiplication【M】

Given two strings representing two complex numbers. You need to return a string representing their multiplication. No

原创 學習tensorflow之mac上安裝tensorflow

背景 聽說谷歌的第二代機器學習的框架 tensorflow 開源了,我也心血來潮去探探大牛的產品.怎奈安裝就折騰了一天,現在整理出來備忘.  tensorflow官方網站給出的安裝步驟很簡單: # Only CPU-version