f********3 发帖数: 210 | 1 攒下rp哈。
1st
1. Introduction. (education, experience)
2. Your project
3. Do you have any experience of OOP? Tell me something about OOP
4. What is the advantage of polymorphism?
5. Write a function which returns a bool value. The parameters are two
integers. fun(8, 4) returns 1. Because 8 is 1000 in binary. And 4 returns
the fourth element from right to left. Also, fun(8, 3) returns 0.
6. How to find the first k smallest elements in an array?(i.e. find the
1st, 2nd, 3rd, … kth smallest)
2nd.
1. 一个数组,只有一个数出现奇数次。如果0出现奇数次呢?
2. 一个字符串,找出first unique的character(hash) | c*********t 发帖数: 2921 | 2 对下面的问题有些疑问:
1. 如果0出现奇数次呢?
用xor, 那么0就是这个出现奇次的数,这个跟具体的那个数的值好像没有关系吧。
2.一个字符串,找出first unique的character(hash)
这个题到底问的是什么?能否给个例子? | f********3 发帖数: 210 | 3 1. 是没关系。
2. 比如bbaccadbbe,
a, b, c都不unique,出现多次。
只有d, e才unique。
所以是d
那个hash是我自己写的。
【在 c*********t 的大作中提到】 : 对下面的问题有些疑问: : 1. 如果0出现奇数次呢? : 用xor, 那么0就是这个出现奇次的数,这个跟具体的那个数的值好像没有关系吧。 : 2.一个字符串,找出first unique的character(hash) : 这个题到底问的是什么?能否给个例子?
|
|