原创 [Leetcode] 118. Pascal's Triangle
Given numRows, generate the first numRows of Pascal's triangle. For example, given numRows = 5, Return [ [1],
原创 [Leetcode] 106. Construct Binary Tree from Inorder and Postorder Traversal
Given inorder and postorder traversal of a tree, construct the binary tree. /** * Definition for binary tree * public
原创 numpy和scipy介紹
轉載於http://reverland.org/python/2012/08/24/scipy/#scipynumpymatplotlib SciPy入門指南(譯) Published at 24 August 2012
原创 NumPy的詳細教程
先決條件 在閱讀這個教程之前,你多少需要知道點python。如果你想從新回憶下,請看看Python Tutorial. 如果你想要運行教程中的示例,你至少需要在你的電腦上安裝了以下一些軟件: PythonNumPy 這些是可能對你有
原创 [Leetcode] 142. Linked List II
Given a linked list, return the node where the cycle begins. If there is no cycle, return null. Follow up: Can you s
原创 [Leetcode] 131. Palindrome Partitioning
Given a string s, partition s such that every substring of the partition is a palindrome. Return all possible palind
原创 [Leetcode] 140. Work Break II
Given a string s and a dictionary of words dict, add spaces in s to construct a sentence where each word is a valid
原创 [Leetcode] 136. Single Number
Given an array of integers, every element appears twice except for one. Find that single one. Note: Your algorithm sh
原创 [Leetcode] 139. Work Break
Given a string s and a dictionary of words dict, determine if s can be segmented into a space-separated sequence of o
原创 [Leetcode] 132. Palindrome Partitioning II
Given a string s, partition s such that every substring of the partition is a palindrome. Return the minimum cuts ne
原创 [Leetcode] 127. Word Ladder
Given two words (start and end), and a dictionary, find the length of shortest transformation sequence from start to
原创 [Leetcode] 141. Linked List Cycle
Given a linked list, determine if it has a cycle in it. Follow up: Can you solve it without using extra space? /**
原创 [Leetcode] 130. Surrounded Region
Given a 2D board containing 'X' and 'O', capture all regions surrounded by 'X'. A region is captured by flipping al
原创 [Leetcode] 137. Single Number II
Given an array of integers, every element appears three times except for one. Find that single one. Note: Your algor
原创 [Leetcode] 138. Copy List with Random Pointer
A linked list is given such that each node contains an additional random pointer which could point to any node in the