原创 阿里巴巴面試題總結
1. 假設把整數關鍵碼K散列到N個槽列表,以下哪些散列函數是好的散列函數 A: h(K)=K/N; B: h(K)=1; C: h(K)=K mod
原创 linux 系統調用fork
秒殺linux下系統調用fork()面試題 爲什麼fork執行兩次呢? http://www.itmian4.com/forum.php?mod=viewthread&tid=3248&extra=page%3D2%26filter
原创 partition實現
In Quicksort algorithm implementation, the partition method is the key to make average performanceas O(nlgn). As writt
原创 tcp 基本工作
TCP由RFC793、RFC1122、RFC1323、RFC2001、RFC2018以及RFC2581定義。 (1) TCP概述 a. TCP提供的
原创 求1+2+3+...+n,要求不能使用乘除法,for,while,if,else,switch,case等關鍵字以及條件判斷語句
方法一:利用構造函數和靜態數據成員 #include <iostream> using namespace std; class Temp { public: Temp() { ++N; Sum+=N; } stat
原创 數值的整數次方
#include <iostream> #include <math.h> using namespace std; bool equalzero(double a,double b) { if((a-b<0.0000001)&&
原创 鏈表逆序輸出
#include <iostream> #include <cstdio> #include <stdlib.h> using namespace std; struct ListNode { int m_value; L
原创 循環輸出
#include <iostream> #include <cstdio> using namespace std; void CirPrint( int *number,int n,int m) { if(number==NUL
原创 簡單使用棧實現隊列
#include <iostream> #include <stack> #include <cstdio> using namespace std; stack<int> stack1; stack<int> stack2; void
原创 2013 google校園招聘筆試題
回憶版,難免有錯誤,歡迎指正。同時歡迎大家在評論中討論答案 1、 單項選擇題 1.1如果把傳輸速率定義爲單位時間內傳送的信息量(以字節計算)多少。關於一下幾種典型的數據傳輸速率: 1.使用USB2.0閃存盤,往USB閃
原创 撲克排序
#include <iostream> #include <stdio.h> using namespace std; int IsPairFive(int *number,int length) { if(number==NUL
原创 重建二叉樹
#include<iostream> #include<memory.h> using namespace std; int K,N,M; int pre[1010],in[1010],post[1010],map[1010]; boo
原创 替代空格
#include <iostream> #include <cstdio> #include <cstring> using namespace std; void replaceBlank(char str[],int length);
原创 二分實現
In Quicksort algorithm implementation, the partition method is the key to
原创 linux 啓動過程
linux系統從開機到登陸界面的啓動過程1.開機BIOS自檢2.MBR引導3.grub引導菜單4.加載內核kernel5.啓動init進程6.讀取inittab文件,執行rc.sysinit,rc等腳本7.啓動mingetty,進入系統登