原创 [LeetCode]Add Binary

Given two binary strings, return their sum (also a binary string). For example, a = “11” b = “1” Return “100”.

原创 [LeetCode] Guess Number Higher or Lower

We are playing the Guess Game. The game is as follows: I pick a number from 1 to n. You have to guess which number

原创 Sublime text + Latex

下載安裝Sublime Text 3; Package Control是一個控制包的包,可以方便安裝其他包。下載Package Control ,下載後,打開Sublime Text 3,Preferences->Browse

原创 C++ find()

頭文件 #include<algorithm> 函數實現 template<class InputIterator, class T> InputIterator find (InputIterator first, InputI

原创 模板

類模板(Class Template) 函數模板(Function Template) 1.類模板定義: template<class T1,class T2,....> class A{ ... /

原创

自由樹(樹):連通的、無環的無向圖; 森林:可能不連通的無向無環圖; 有根樹:有根的自由樹; 有根樹T中一個結點X的度數等於X的度;從根r到結點x的一條簡單路徑的長度稱爲x的深度;從結點x到葉節點最長的一條簡單路徑上邊的數目,

原创 ubuntu---sogou輸入法設置

先安裝fcitx: sudo apt-get install fcitx 然後點擊System Settings->Language Support ,Language界面中的Keyboard input method sy

原创 [LeetCode]3. Longest Substring Without Repeating Characters

Given a string, find the length of the longest substring without repeating characters. Examples: Given “abcabcb

原创 二叉搜索樹及其C++實現

一棵二叉搜索樹由一棵二叉樹來組織,可以用鏈表數據結構來表示,每個結點除了Key和衛星數據,還包含指針left,right,p,分別指向左子樹,右子樹和雙親。 二叉樹中的key總是滿足二叉搜索樹性質: 設x是二叉搜索樹的一個結點

原创 STL

STL提供了大量的模板類和函數,下面爲三個基本的STL組件: 迭代器 迭代器提供了訪問容器中對象的方法。例如,可以使用一對迭代器指定list或vector中的一定範圍的對象。迭代器就如同一個指針。事實上,C++的指針也是一種

原创 數據庫管理系統--讀書筆記(1)

在database system出現之前,使用file_based system來進行文件處理。 File_based System 缺點: 分離孤立的數據 重複數據 數據相依 不兼容的文件格式,缺乏數據標準性 固定的查詢,缺

原创 [LeetCode]2. Add Two Numbers

題目: You are given two linked lists representing two non-negative numbers. The digits are stored in reverse orde

原创 64位win10下openGL的配置---學前準備

選擇一個編譯環境(這裏選的是vs2015) 下載glut工具包 下載地址:http://www.opengl.org/resources/libraries/glut/glutdlls37beta.zip (注:目前只有

原创 [LeetCode]371. Sum of Two Integers

Calculate the sum of two integers a and b, but you are not allowed to use the operator + and -. Example: Given a =

原创 安卓手機root

下載騰訊電腦管家 打開電腦管家的kingRoot 連接手機,打開usb調試(android 5.0.1) 設置->關於手機->[點擊7次“版本號”,進入開發者模式] 設置->開發者選項->usb調試 使用kingRoot