原创 145. Binary Tree Postorder Traversal

Given a binary tree, return the postorder traversal of its nodes' values. Example: Input: [1,null,2,3] 1 \

原创 143. Reorder List

Given a singly linked list L: L0→L1→…→Ln-1→Ln, reorder it to: L0→Ln→L1→Ln-1→L2→Ln-2→… You may not modify the values in

原创 logistic迴歸的多分類任務實現------鳶尾花數據(DATA MINING HOMEWORK)

鳶尾花問題: http://archive.ics.uci.edu/ml/machine-learning-databases/iris/iris.data 對於以上給出的數據集,用模型進行訓練,得到良好的分類器,分類模型。(要求用線性迴

原创 131. Palindrome Partitioning

Given a string s, partition s such that every substring of the partition is a palindrome. Return all possible palindrom

原创 167. Two Sum II - Input array is sorted

Given an array of integers that is already sorted in ascending order, find two numbers such that they add up to a speci

原创 129. Sum Root to Leaf Numbers

Given a binary tree containing digits from 0-9 only, each root-to-leaf path could represent a number. An example is the

原创 142. Linked List Cycle II

Given a linked list, return the node where the cycle begins. If there is no cycle, return null. To represent a cycle in

原创 141. Linked List Cycle

Given a linked list, determine if it has a cycle in it. To represent a cycle in the given linked list, we use an intege

原创 136. Single Number

Given a non-empty array of integers, every element appears twice except for one. Find that single one. Note: Your algor

原创 121. Best Time to Buy and Sell Stock

Say you have an array for which the ith element is the price of a given stock on day i. If you were only permitted to c

原创 120. Triangle

Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row b

原创 125. Valid Palindrome

Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases. Note: For

原创 122. Best Time to Buy and Sell Stock II

Say you have an array for which the ith element is the price of a given stock on day i. Design an algorithm to find the

原创 119. Pascal's Triangle II

Given a non-negative index k where k ≤ 33, return the kth index row of the Pascal's triangle. Note that the row index s

原创 118. Pascal's Triangle

Given a non-negative integer numRows, generate the first numRows of Pascal's triangle. In Pascal's triangle, each numb