原创 LeetCode 337. House Robber III

337. House Robber III The thief has found himself a new place for his thievery again. There is only one entrance to thi

原创 LeetCode Median of Two Sorted Arrays

題目: Median of Two Sorted Arrays There are two sorted arrays nums1 and nums2 of size m and n respectively. Find the medi

原创

傳說,水精靈愛上了太陽神阿波羅,就算明知道自己始終得不到太陽神的愛,卻依然無法停止對他的思念。於是,水精靈甘願化作向日葵,對着太陽的方向日日凝望。 我擡頭仰望你的天空 雨後卻沒有彩虹 空中瀰漫的你的微笑 依舊讓我心動,好心動 怎麼當年懵懂

原创 LeetCode 動態規劃Climbing Stairs/House Robber/

題目1: Climbing Stairs You are climbing a stair case. It takes n steps to reach to the top. Each time you can either clim

原创 LeetCode Rotate Array

大佬大發慈悲,出了一個超級簡單的題目: Rotate Array Given an array, rotate the array to the right by ksteps, where k is non-negative. Exam

原创 LeetCode Combination Sum

題目 https://leetcode.com/problems/combination-sum/ Given a set of candidate numbers (candidates) (without duplicates) an

原创 LeetCode 3Sum

題目 https://leetcode.com/problems/3sum/ 15. 3Sum Medium 3647399FavoriteShare Given an array nums of n integers, are ther

原创 各類機器學習算法原理及優缺點

一、邏輯迴歸 1.1 原理 將線性迴歸的結果通過sigmod函數映射到0到1之間,如果結果越接近0或者1,說明分類結果的可信度越高,對於線性不可分的數據,可以對非線性函數進行線性加權,得到一個不是超平面的分割面。     在進行分類時,

原创 糾結的凸包算法程序

           很典型的凸包問題。我一開始想繁了,因爲我想如果是個凹多邊形,可能最終的圍牆也可能是凹的,後來想起題中的要求是最小的長度,而凹的圍牆雖然離castle距離精確的等於r,可是長度並不是最小的,只有凸包的長度纔是最小的。因

原创 scikit-learn交叉驗證Cross Validation and Grid Search

引自:http://hisarack.logdown.com/posts/304896-scikit-learn%E5%AF%A6%E4%BD%9C-cross-validation-and-grid-search 實際上在跑驗證時,

原创 windows平臺安裝mysql-5.7.14-winx64

出自: 詳情請參考博文: http://blog.csdn.net/yhl_jxy/article/details/52101441 特別提醒,如果出現 D:\mysql\mysql-5.7.14-winx64\bin>mysqld i

原创 實現兩個大數相乘

#include <iostream> #include <string.h> #define MAX 201 using namespace std; int result[MAX], result1[

原创 凸包算法求凸包點

#include <iostream> #include <math.h> #include <algorithm> using namespace std ; struct Point {int x ;