原创 華爲軟件精英挑戰賽【德州撲克】心得體會

       這是華爲舉辦的一個軟件競賽,華爲提供一個德州撲克臺桌的server,我們要根據牌型等因素,給出出牌的策略,類似模擬牌手的程序。從知道挑戰的題目到提交最終版本的程序中間只有一個月的時間,剛看到這個題目一點頭緒沒有,看了論文有用

原创 Different Ways to Add Parentheses

Given a string of numbers and operators, return all possible results from computing all the different possible ways t

原创 使用 Isotonic Regression 校準分類器

21 December 2015 1. 引言 對有監督機器學習問題,通常的訓練流程包括這樣幾步:先建立起模型,然後在訓練集上訓練模型,如果有超參數,還需要在驗證集上應用交叉驗證以確定超參數,總之最終會得到一個模型。在這樣的流程下,不斷

原创 面向稀有事件的 Logistic Regression 模型校準

引言 對分類問題的研究大部分是在樣本分佈均衡的情況下開展的。比如對二分類,一般研究的是正樣本和負樣本的數量相當(比如各佔50%)或者相差不是那麼大(比如一類樣本佔30%,另一類樣本佔70%)。但在實際應用時,經常會碰到樣本傾斜問題,對

原创 2015校招求職之路

2015.10.23日把三方寄出,今年的求職之旅基本宣告結束了,回想這段求職的旅程也算圓滿了,自己心儀公司都經歷了面試,也經歷過霸面了,最後的結果還算圓滿,拿到了 華爲,中興,遠景能源,大衆點評,瑞晟微電子的offer,我的這幾個offe

原创 Invert Binary Tree

Invert a binary tree. 4 / \ 2 7 / \ / \ 1 3 6 9 to 4 / \ 7 2 / \ / \ 9 6

原创 走出校門,工作4個月的工作感想

        今年五月份正式踏入社會,結束了將近二十年的學習生涯,在踏入工作崗位的一段時間裏,沒有任何不適應,反而獲得了單純快樂,擺脫了在校園中的種種煩惱。        時間過的飛快,工作後的時間更是眨眼即逝。四個月的時間裏,雖然很累

原创 String to Integer (atoi)

Implement atoi to convert a string to an integer. Hint: Carefully consider all possible input cases. If you want a c

原创 Add and Search Word - Data structure design

Design a data structure that supports the following two operations: void addWord(word) bool search(word) search(wor

原创 egit插件提交項目到github無需每次輸入URL的方法

用eclipse的插件egit,向github push的時候,每次關閉並重新打開eclipse都要重新輸入url和用戶名,非常麻煩,在網上搜搜索了一通,在github羣裏問了一通,都沒有較好的辦法,這裏又一個較爲簡單的方法 step1:

原创 3Sum Closest

Given an array S of n integers, find three integers in S such that the sum is closest to a given number, target. Retu

原创 Minimum Size Subarray Sum

Given an array of n positive integers and a positive integer s, find the minimal length of a subarray of which the su

原创 3Sum

Given an array S of n integers, are there elements a, b, c in S such that a + b + c = 0? Find all unique triplets in

原创 c++中字節對齊問題

三個基本原則 1.struct或者union或者class裏,每個成員的對齊開始位必須是成員自己的大小的整數倍; 2.每個結構體的大小必須是結構體內最大成員的整數倍,(第二個補齊方式) 3.結構體a內的結構體b的開始位必須是b裏的最大成

原创 兩個棧實現隊列

stack1與stack2 1.push的時候一直push到stack1中 2.pop的時候,檢測stack2是否爲空,當爲空時,stack1中的元素push到stack2中,當stack2中不爲空時,直接pop stack2 以下爲實現