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

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

原创 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 displ

原创 Linux 的啓動流程

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

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

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

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

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

原创 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”的時候,鍵盤與CPU都是

原创 LeetCode - 58. Length of Last Word

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

原创 LeetCode - 268. Missing Number

題目:Given an array containingndistinct numbers taken from0, 1, 2, ..., n, find the one that is missing from the array.思路與

原创 LeetCode - 242. Valid Anagram

題目:Given two stringssandt, write a function to determine iftis an anagram ofs.For example,s= "anagram",t= "nagaram", ret

原创 LeetCode - 350. Intersection of Two Arrays II

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

原创 LeetCode - 136. Single Number

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

原创 LeeyCode - 167. Two Sum II - Input array is sorted

題目:Given an array of integers that is alreadysorted in ascending order, find two numbers such that they add up to a spec

原创 LeetCode - 35. Search Insert Position

題目:Given a sorted array and a target value, return the index if the target is found. If not, return the index where it w

原创 LeetCode - 141. Linked List Cycle

題目:Given a linked list, determine if it has a cycle in it.思路與步驟:採用“快慢指針”查檢查鏈表是否含有環。讓一個指針一次走一步,另一個一次走兩步,如果鏈表中含有環,快指針會再次和慢