原创 c++ 容器用法總結 轉載。

C++中的容器大致可以分爲兩個大類:順序容器和關聯容器。順序容器中有包含有順序容器適配器。 順序容器:將單一類型元素聚集起來成爲容器,然後根據位置來存儲和訪問這些元素。主要有vector、list、deque(雙端隊列)。順序容器適

原创 LeetCode Count and say

The count-and-say sequence is the sequence of integers beginning as follows:1, 11, 21, 1211, 111221, ... 1 is read of

原创 LeetCode Merge Intervals

Given a collection of intervals, merge all overlapping intervals. For example, Given [1,3],[2,6],[8,10],[15,18], retu

原创 簡單實用 利用反射機制寫的JAVA數據庫訪問控制框架

javaweb中當bean層的屬性值超多的時候寫dao層太痛苦,但是也沒有用框架,就自己用了反射機制寫了個簡單的框架  項目中用到最後應該沒有什麼bug了 不過有一點就是bean的實體類中主鍵id必須是第一個聲明的才行= =、 使用的時

原创 LeetCode PathSum

Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along

原创 LeetCode Decode Way

A message containing letters from A-Z is being encoded to numbers using the following mapping: 'A' -> 1 'B' -> 2 ...