Beijing, China interview questions | Glassdoor

Interview questions in Beijing, China

Microsoft Interviews in Beijing /  HQ: Redmond, WA

41 Interviews in Beijing (of 8,422)

3.2 Average

VIPKID Interviews in Beijing /  HQ: San Francisco

41 Interviews in Beijing (of 413)

3.0 Average

Baidu Interviews in Beijing /  HQ: Sunnyvale, CH

39 Interviews in Beijing (of 119)

2.9 Average

Interview Questions in Beijing

Sort: RelevancePopular Date

Rand(7) from Rand(5)

7 Answers

The simple solution is to implement RandBin() using Rand5(). int RandBin() { }

Sorry this UI posts without warning int RandBin() { int rand5Res = Rand5(); return rand5Res < 2 ? 0 : rand5Res < 4 ? 1 : RandBin(); } And then use RandBin() to implement Rand7; int Rand7() { int rand = RandBin() << 2 | RandBin() << 1 | RandBin(); return rand < 7 ? rand : Rand7(); }

int rand7() { while(1) { int n = ((rand5()%2)*4 + (rand5()%2)*2 + (rand5()%2)*1); if(n == 0) continue; return n; } } The rand5()%2 will generate 0 and 1 with equal probability and we need 3 bits since we are going from 000 upto 111. So we call this function thrice for each bit position.

Given a set of strings. Check if a new string is equal to any of them. Here equal means the letters are the same, like abbc=bacb

4 Answers

Give an idea to show how to rearrange the array a1, a2, ..., an, b1, b2, ... bn into a1, b1, a2, b2, ..., an, bn with O(n) computation time cost and O(1) extra memory cost.

3 Answers

Implement Fibonacci in log_n time

2 Answers

The student cards are 7 digit numbers, from 0000000 to 9999999. If they are not in order and I would like to make it in-order. I will give you 6 helpers, how will you help me to solve this problem and the complexity of solving this problem.

2 Answers

how do you know about marketing? do you have any experience of marketing?

2 Answers

No special questions.

1 Answer

The questions are not so much tough, basically general question, the most important thing you have do is to convince recruiter that you could transfer previous skills to new role or position.

1 Answer

How to evaluate a company? What is the company you analyzed?

1 Answer

What impact do console game sales have on mobile game sales.

1 Answer
110 of 1,871 Interview Questions