java - 今天腾讯的移动开发端实习生的线上模拟题。。。
ringa_lee
ringa_lee 2017-04-17 17:32:20
0
4
667

好难,对于我来说。。。
涉及到。。。:

选择题:

  1. TCP/IP 协议

  2. android/IOS

  3. C++(最多)

  4. 数据结构

编程题:

  1. 大整数乘法!(之前用Java写过,加减乘除,但是只记得思路!)

  2. 从一篇英语文章中,统计重复的单词数目!(有思路,但是不够时间!)

  3. JNI !(我只知道这是android中,Java的远程调用C/C++的。。。)

唉~

ringa_lee
ringa_lee

ringa_lee

reply all(4)
迷茫

Thinking of the second programming question (PHP version):

function repeatArray($str){   
    preg_match_all('/\w/',$str,$array);
    $uniqueArray = array_unique($array);
    $repeat = array_diff_assoc($array,$uniqueArray);
    return count($repeat);
}

I haven’t tried it before, any advice is welcome
I feel that the questions in Goose Factory are more exam-oriented, focusing more on basics and thinking skills

黄舟

I just learned that most companies don’t take Android and IOS tests separately. .

Peter_Zhu

The Goose Factory is like this every year, so be bearish.

Peter_Zhu

Programming questions:
1 Multiplication of large numbers, the original question of leetcode, go here to see how the top-voted answer is written
2 Count the number of repeated words.
Two ideas: 1) Use a hash table to count the number of words that appear. C++11 has stl and the template unordered_map is available. The time complexity is O(n), n is the number of words. In fact, if you consider the number of words for each When calculating the hash value of a word, each word must be traversed. If the average length of the word is m, the time complexity of creating the table is O(m*n). The search time complexity is O(1).
2) Open a trie tree, traverse all words, and insert them into the tree. The time complexity of tree building is still O(m*n). Considering that there are conflict detection and secondary detection using hash tables, trie tree building should be Slightly faster. But the search is slightly slower, the time complexity is O(len), len is the length of the word being searched

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!