明天就是筆試和面試的日子

2021-06-10 01:20:57 字數 3171 閱讀 1723

01 二分查詢

#include using namespace std;

const int n = 105;

int a[n];

int n;

int b_search(int a, int size, int key)

else l = mid + 1;

}}int main()

02 冒泡排
#include using namespace std;

const int n = 105;

void bubblesort(int *a, int len) }}

}

03 堆排
#include using namespace std;

void heapify(int a, int i, int size)

else large = i;

if(rs <= size && a[rs] > a[large])

if(i != large)

}void buildheap(int a, int size)

}void heapsort(int a, int size)

}int main()

04 插入排
#include using namespace std;

const int n = 105;

int a[n];

void insertsort(int a, int len)

a[j+1] = temp;

}}int main()

05 歸併排
#include #include #define mid(x) (x >> 1)

using namespace std;

const int n = 105;

int a[n];

void merge_sort(int a, int l, int h)

else

}while(i <= m)

while(j <= h)

for(i = l; i <= h; i++)

delete arr;

}int main()

06 快排
#include #include #include #define mid(x) (x >> 1)

using namespace std;

const int n = 105;

void quicksort(int a, int left, int right)

swap(a[left], a[l]);

quicksort(a, left, l-1);

quicksort(a, l+1, right);

}}int main()

07 拓撲排
#include using namespace std;

int main()

08 線段樹 - 單點
#include #define mid(x) (x>>1)

using namespace std;

const int n = 105;

int r[n];

struct node t[4*n];

void maketree(int x, int y, int num)

}void add(int x, int ren, int num)

else

}int sum = 0;

void query(int x, int y, int num)

else

else if(x > m)

else

}}int main()

09 樹狀陣列
#include using namespace std;

const int n = 105;

int c[n];

int n;

int lowbit(int x)

void add(int i, int x)

}int main()

10 字典樹
#include #include using namespace std;

const int n = 105;

const int kind = 26;

struct node

};string s1, s2;

void insert(node* root, string s)

else

i++;

p = p->next[index];

}p->tail = true;

}int main()

return 0;

}

11 kmp
#include #include #include using namespace std;

const int n = 105;

string s;

string t;

int next[n];

void get_next(string t)

else

}}int main()

12 最短路 - 迪傑斯特拉
#include using namespace std;

const int inf = 0x7fffffff;

const int n = 105;

int data[n][n];

int lowc[n];

int vis[n];

int n, m;

void djst(int p)

vis[p] = 1;

for(i = 1; i < n; i++)

}if(c == 1) break;

vis[c] = 1;

for(j = 1; j <= n; j++) }}

cout << lowc[1] << endl;

}int main()

}return 0;

}

騰訊筆試和面試

其實應聘內容也真的很難說清楚,而且我也不知道我所經歷的是不是有代表性,何況我還是找工作的新手 本科也沒找過工作,之前也只是應聘過華為 所以如果下文有什麼疏漏之處,儘管踩我好了 2。一面面試其實也挺難說的,因為這個環節很靈活,也許在面試之前連面試官自己都不知道他自己將要問什麼,呵呵。這裡也只是給出乙個...

深信服的筆試和面試

這次在湖南的深信服筆試地點設在中南大學的立言廳,這點俺可是有點不滿,為什麼不設到我們湖大呢?筆試時有三四百人的樣子,因為當時已經和北京群碩簽約了,而且拿到了華為研發的offer,所以考試並不緊張。筆試的題量非常大,而且很難,就像網上說得,深信服的試題就是考你的程式設計能力,不像其它公司什麼智力,情商...

搜狗桌面研究部筆試和面試

筆試題目 1 include using namespace std char getmemory int main for int i last i m i int main 4.求解最長序列,輸出最長公共序列 include include include using namespace std...