原创 C語言基礎 之 switch-case語句

一直記不住switch語句的語法格式,特作此筆記: 一般形式: switch (表達式) {       case 常量表達式1:             語句1;              break;      case 常量表

原创 Linux系統文件系統的結構層次詳解

轉自 http://soft.chinabyte.com/os/142/12315142.shtml Linux系統文件系統的結構層次詳解 發佈時間:2012-04-20 00:00:00 來源:中國IT實驗室 作者:佚名 關鍵

原创 LeetCode - 14. Longest Common Prefix

題目: Write a function to find the longest common prefix string amongst an array of strings. 思路: C程序實現: char* longestComm

原创 分佈式基礎學習【一】 —— 分佈式文件系統

轉自 http://blog.csdn.net/heyutao007/article/details/5468390         所謂分佈式,在這裏,很狹義的指代以Google的三駕馬車,GFS、Map/Reduce、BigTa

原创 LeetCode - 6. ZigZag Conversion

題目: The string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows like this: (you may want to d

原创 Linux 的啓動流程

轉自 http://www.ruanyifeng.com/blog/2013/08/linux_boot_process.html 作者: 阮一峯 日期: 2013年8月17日 半年前,我寫了《計算機是如何啓動的?》,探討B

原创 分佈式基礎學習【二】 —— 分佈式計算系統(Map/Reduce)

轉自 http://blog.csdn.net/heyutao007/article/details/5468395 二. 分佈式計算(Map/Reduce) 分佈式式計算,同樣是一個寬泛的概念,在這裏,它狹義的指代,按Google

原创 Leetcode - 8.String to Integer (atoi)

題目: Implement atoi to convert a string to an integer.   思路與步驟: 1. 判斷字符串是否爲控字符串; 2. 去掉開頭的空格; 3. 判斷開始位是否有正負; 4. 轉換,同時注意ov

原创 LeetCode - 345. Reverse Vowels of a String

題目: Write a function that takes a string as input and reverse only the vowels of a string. 思路與步驟: 1. 找出源字符串中的元音字母; 2. 爲

原创 操作系統的抽象與虛擬化

轉自http://my.oschina.net/websec/blog/490958 爲什麼需要操作系統? 說抽象之前得先知道CPU以及鍵盤、鼠標是之間是工作的。CPU最終狀態只能進行加減,當我們輸入一個簡單的字符“A”的時候,鍵盤與CP

原创 LeetCode - 58. Length of Last Word

題目: Given a string s consists of upper/lower-case alphabets and empty space characters ' ', return the length of last

原创 LeetCode - 268. Missing Number

題目: Given an array containing n distinct numbers taken from 0, 1, 2, ..., n, find the one that is missing from the arra

原创 LeetCode - 242. Valid Anagram

題目: Given two strings s and t, write a function to determine if t is an anagram of s. For example,s = "anagram", t =

原创 LeetCode - 350. Intersection of Two Arrays II

題目: Given two arrays, write a function to compute their intersection. Example: Given nums1 = [1, 2, 2, 1], nums2 = [2,

原创 LeetCode - 136. Single Number

題目: Given an array of integers, every element appears twice except for one. Find that single one. Note: Your algorithm