原创 平衡二叉樹的實現

轉載自http://www.cppblog.com/cxiaojia/archive/2012/08/20/187776.html 但是由於原文的代碼有錯,評論區很多人表示代碼有誤,跑不通 我自己手打了一遍,並進行了完善,自己測試插入

原创 Jump Game II

Given an array of non-negative integers, you are initially positioned at the first index of the array. Each element in

原创 nginx + tomcat 簡單配置

1、首先是nginx和Tomcat的安裝 自己下載安裝或者centos系統yum install 都可以安裝兩者,安裝完可以使用whereis查找位置。值得注意的是install的tomcat在webapps裏面沒有ROOT文件夾以及初

原创 C++string類常用函數

C++string類常用函數 轉載自http://www.cppblog.com/lmlf001/archive/2006/04/19/5883.html string類的構造函數: string(const char *s);

原创 刷leetcode過程中記錄難度題,自己做法及最優做法

leetcode 41. First Missing Positive Given an unsorted integer array, find the first missing positive integer. For exam

原创 leetcode沒做出來看答案的題

暴露出一個很嚴重的問題就是對stl的應用並不是非常得熟練 49. Group Anagrams Given an array of strings, group anagrams together. For example, give

原创 leetcode上面難度hard題

N-Queens N皇后問題,輸出全部解判斷函數bool isvalid(int row,int col,int N,vector<int> &record)//判斷是否能夠放置 { for(int i=0;i<N;i++)