原创 LintCode-劍指Offer-(140)快速冪

class Solution { public: /* * @param a, b, n: 32bit integers * @return: An integer */ //要用long

原创 LintCode-劍指Offer-(373)奇偶分割數組

class Solution { public: /** * @param nums: a vector of integers * @return: nothing */ void

原创 LintCode-劍指Offer-(371)用遞歸打印數字

class Solution { public: /** * @param n: An integer. * return : An array storing 1 to the largest num

原创 LintCode-劍指Offer-(372)在O(1)時間複雜度刪除鏈表節點

/** * Definition of ListNode * class ListNode { * public: * int val; * ListNode *next; * ListNode

原创 LintCode-劍指Offer-(160)尋找旋轉排序數組中的最小值Ⅱ

class Solution { public: /** * @param num: the rotated sorted array * @return: the minimum number in

原创 LintCode-劍指Offer-(378)將二叉查找樹轉換成雙鏈表

class Solution { public: /** * @param root: The root of tree * @return: the head of doubly list node

原创 LintCode-劍指Offer-(374)螺旋矩陣

class Solution { public: /** * @param matrix a matrix of m x n elements * @return an integer array

原创 常見http狀態碼

常見http狀態碼 成功的狀態碼: 200 – 服務器成功返回網頁 304 – 未修改 失敗的狀態碼: 404 – 請求的網頁不存在 503 – 服務器暫時不可用 500 – 服務器內部錯誤

原创 LintCode-劍指Offer-(54)轉換字符串到整數

class Solution { public: /** * @param str: A string * @return An integer */ int atoi(string str) {

原创 AngularJS-1.啓動流程

整體結構 bindJQuery publishExternalAPI angularInit 應用啓動 自動啓動 手動啓動 整體結構 AngularJS的源碼在整體上,與其它很多庫和框架一樣,是一個自執行函數,其

原创 LintCode-劍指Offer-(88)最近公共祖先

class Solution { public: /** * @param root: The root of the binary search tree. * @param A and B: two nodes

原创 LintCode-劍指Offer-(50)數組剔除元素後的乘積

class Solution { public: /** * @param A: Given an integers array A * @return: A long long array B and B[i]=

原创 LintCode-劍指Offer-(3)統計數字

class Solution { public: /* * param k : As description. * param n : As description. * return: How ma

原创 LintCode-劍指Offer-(112)刪除排序鏈表中的重複元素

class Solution { public: /** * @param head: The first node of linked list. * @return: head node */

原创 LintCode-劍指Offer-(61)搜索區間

class Solution { /** *@param A : an integer sorted array *@param target : an integer to be inserted *r