亚洲福利精品久久久久91|中文字幕乱码视频网|在线播放国产精品一区二区|亚洲成AV人片女在线观看

<thead id="tzpj5"></thead>
  • <cite id="tzpj5"><listing id="tzpj5"></listing></cite>
    <strike id="tzpj5"><option id="tzpj5"><td id="tzpj5"></td></option></strike>

    屆小米公司校園招聘筆試題和面試題答案

    思而思學(xué)網(wǎng)
    一,填空題

    1. 兩個(gè)人一個(gè)速度為a,一個(gè)速度為b,相向而行,在距離為s的時(shí)候,A放出鴿子,速度為c,鴿子飛到B后,會(huì)返回A,遇到A后再返回B。在這期間鴿子飛行的路程

    2. (he)的平方 = she。 h,e,s 各代表什么

    3. 運(yùn)算 93 & -8

    4. 將無序數(shù)組構(gòu)建成最大堆,最差的時(shí)候,復(fù)雜度是

    5. int p = &n;

    p 的值是

    A. p 的值 B. p的地址 C. n的值 D. n的地址

    6. 一個(gè)完全二叉樹有770節(jié)點(diǎn),那么葉子個(gè)數(shù)為

    7. 有一個(gè)數(shù)組a[1...100, 1...65] 有100行 65列。

    按行優(yōu)先,如果數(shù)組基地址是 10000,每個(gè)元素2各存儲(chǔ)單元,問a[56, 22]的地址是

    8. 寫出一下程序結(jié)果

    #include

    #include

    using namespace std;

    class B

    {

    public:

    B()

    {

    cout<<"B is constructing"<

    s = "B";

    }

    void f(){

    cout<

    }

    private:

    string s;

    };

    class D:public B{

    public:

    D():B(){

    cout<<"D is constructing"<

    s = "D";

    }

    void f(){

    cout<

    }

    private:

    string s;

    };

    int main(){

    B b = new D();

    b->f();

    ((D)b)->f();

    b;

    }

    二, 編程題

    1. 數(shù)組乘積輸入: 一個(gè)長度為n的整數(shù)數(shù)組input 輸出: 一個(gè)長度為n的數(shù)組result,滿足result[i] = input數(shù)組中,除了input[i] 之外的所有數(shù)的乘積,不用考慮溢出例如 input {2, 3, 4, 5} output: {60, 40, 30, 24}

    2, 異形數(shù)長度為n的數(shù)組里面,除了3個(gè)數(shù)字,其他都出現(xiàn)2次,寫出程序找出任意一個(gè)數(shù)。例如 1 3 7 9 5 5 9 4 3 6 1 7 輸出 4/5/6

    3. 朋友圈假如已知有n個(gè)人和m對(duì)好友關(guān)系,如果兩個(gè)人是直接或者間接有好友關(guān)系,則認(rèn)為他們屬于同一個(gè)朋友圈。寫程序判斷里面有多少朋友圈。例如 n = 5, m = 3 r = {(1,2), (2, 3), (4, 5)} 1 2 3 是一個(gè)朋友圈, 4 5 是一個(gè)朋友圈。所以輸出是2.

    熱門推薦

    最新文章