原创 Missing Number
原題: Given an array containing n distinct numbers taken from 0, 1, 2, …, n, find the one that is missing from the array
原创 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 fin
原创 Best Time to Buy and Sell Stock III
原題: Say you have an array for which the ith element is the price of a given stock on day i. Design an algorithm to fin
原创 House Robber
原題: You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stas
原创 House Robber II
原題: Note: This is an extension of House Robber. After robbing those houses on that street, the thief has found himself
原创 Machine Learning Foundations(NTU) 第一次作業
Machine Learning Foundations(NTU) 第一次作業 PLA DATA: https://d396qusza40orc.cloudfront.net/ntumlone%2Fhw1%2Fhw1_15_train.d
原创 Binary Tree Right Side View
原題: Given a binary tree, imagine yourself standing on the right side of it, return the values of the nodes you can see
原创 String to Integer (atoi)
原題: Implement atoi to convert a string to an integer. Hint: Carefully consider all possible input cases. If you want a
原创 Invert Binary Tree
原題: Invert a binary tree. 4 / \ 2 7 / \ / \ 1 3 6 9 to 4 / \ 7 2 / \ / \
原创 在Mac OS 10.11上安裝python, pyqt
1.首先安裝homebrew,通過在終端中執行如下的命令: ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go/install)" 2.接着安裝python bre
原创 First Bad Version
原題: You are a product manager and currently leading a team to develop a new product. Unfortunately, the latest version
原创 Majority Element II
原題: Given an integer array of size n, find all elements that appear more than ⌊ n/3 ⌋ times. The algorithm should run
原创 機器學習基石第四次作業代碼
花了一個多月總算把《機器學習基石》這門公開課學習完了,作業也做完了,老師講的很棒,學到了不少東西:). Q13 Q14 Q15 Q16 Q17 Q18 Q19 Q20 import sys import urllib2 i
原创 Reverse Nodes in k-Group
原題: Given a linked list, reverse the nodes of a linked list k at a time and return its modified list. If the number of
原创 修復 mac os 升級後導致的xcrun: error:
最近升級MAC OS 10.11以後,git莫名其妙的不能用了。當Git clone 一個開源項目時,提示如下錯誤: xcrun: error: invalid active developer path (/Library/Devel