显示热门

深色模式

字体大小|

搜索
ADVERTISEMENT
返回
  • 浏览过的版块

1
ADVERTISEMENT
Huaren
等级上校
威望5
贴子4536
魅力6801
注册时间2003-04-14

jjjjj

只看楼主

[参加活动]interview questions I met

1100

9

2005-11-28 13:39:00

updated: I will provide the quesitons I met in the recent interview here. hopefully helpful.


there would be 4 categories:


1. brain teasers


2. programming


3. finance


4. behavior





contribute some brain teasers I met:

1. u couple entered a room with another 8 couples. you shake hands with others. but you won't shake hands with your partner. finally you found the numbers of each person shakeing hands are different except you. how many times did your partner shake then?

2. 1000 coins are put in a bag. all the others are regular coins except one, which has both sides head. you picked one coin from the bag, and tossed 10 times, and found you got 10 heads. what is the probability that the coin you get is a regular coin?

3. there are 37 points in the paper. draw lines between any two points. but the lines can't intersect by each other. how many lines can you draw?

4. (I failed this one

) integrate int(0,2) 2-sqrt(4-x^2)

5. Russian roulette: put 2 bullets into a revolver with capacity of 6 bullets. the 2 bullets are not adjacent to each other. your opponent triggered, no fire. now it is your turn. you can choose to trigger right away, or spin and then trigger. what is your choice? why?


[此贴子已经被作者于2005-12-3 9:57:08编辑过]

Huaren
等级上校
威望5
贴子4536
魅力6801
注册时间2003-04-14

jjjjj

只看楼主

2005-11-28 13:41:00

行业,finance


职位,associate


面试发生的大概年份 2005

Huaren
等级上尉
威望3
贴子2652
魅力4135
注册时间2005-03-28

vivacious

只看他

2005-11-28 15:31:00

哇,脑筋急转弯阿


finance面试还考这些啊?

Huaren
等级大校
威望16
贴子13376
魅力13386
注册时间2005-05-27

Waterleaf

只看他

2005-11-29 01:53:00

Hehe, two of them are from Heard on the Street. Is the answer to No3 107?

Huaren
等级上校
威望5
贴子4536
魅力6801
注册时间2003-04-14

jjjjj

只看楼主

2005-12-03 09:54:00

some programming questions:


1.please declare a class with copy constructor and assignment operator.


2.what is virtual function? how is it implemented? why there is virtual destructor?


3.what is the "A is B" and "A has B"? how to decide when to use which?


4. class B
{
};


class A
{
public:
void f(B const& a)
{
a=10;
}
};
what is that "const" mean? any comments?


5. class foo
{
public:
foo(int i)
{}
};
class Bar:virtual foo
{
public:
Bar()
{}
};
any comments?



6. class X{
public:
X():a(0),b(0){
a=b++;
}
X &operator++(int){
a++;
b++;
return * this;
}
X& operator++(){
a++;
b+=2;
return *this;
}
private:
int a,b;
};



int main(int argc, _TCHAR* argv[])
{
X x;
x++;
(++x)++;
return x;
}
what will be the value of x returned?


7. can friend function access derived class's private member?


8. what if a function throw an expection that is not in its exception list?



[此贴子已经被作者于2005-12-3 10:07:17编辑过]

Huaren
等级上校
威望5
贴子4536
魅力6801
注册时间2003-04-14

jjjjj

只看楼主

2005-12-03 09:59:00

9.

void (__cdecl *signal(  int sig,    void (__cdecl *func ) (int [, int ] )))    (int);

explain


10.


class Complex{


public:


Complex(double real, double imaginary=0):_real(real), _imaginary(imaginary)


{};


void operator+ (Complex other){


_real=_real+other.real;


_imaginary=_imaginary+other._imaginary;


}


void operator<<(ostream os){


os<<"("<<_real<<","<<_imaginary<<")";


}


Complex operator++(){


++_real;


return *this;


}


Complex operator++(int){


Complex temp=*this;


++_real;


return temp;


}


private:


double _real,_imaginary;


}


how many issues can you find out of above code?


[此贴子已经被作者于2005-12-3 12:28:55编辑过]

Huaren
等级上校
威望5
贴子4536
魅力6801
注册时间2003-04-14

jjjjj

只看楼主

2005-12-03 10:00:00

Huaren
等级上校
威望5
贴子4536
魅力6801
注册时间2003-04-14

jjjjj

只看楼主

2005-12-03 10:00:00

Huaren
等级上校
威望5
贴子4536
魅力6801
注册时间2003-04-14

jjjjj

只看楼主

2005-12-03 10:00:00

ADVERTISEMENT
Huaren
等级上校
威望5
贴子4536
魅力6801
注册时间2003-04-14

jjjjj

只看楼主

2005-12-03 10:01:00

初始化编辑器...

到底了