请问空调出风口叶片的方向应该冲窗户还是冲房间内部# Living
g*u
1 楼
刚面的amazon,下面是第一轮的面经。
应该是位india guy. 英语说的很清楚,没有什么理解问题。
题目很少,但是没问 why amazon, regex expression的问题。
下面是问的问题:
1.看到简历里面写了 C++和 Java,列出2者的区别,至少3个,并加以解释比较。
2. 关于OOD的继承的概念问题:
class a;
class b extends class a;
Is there any problem in the following codeand why?
a A =new b();
b B=new a();
3.基于上面的问题,问了下面这个问题关于虚函数调用的问题
class a with public function foo();
class b extends class a, and overide function foo();
we have:
a A=new b();
A->foo();
which function get called? from class a or class b?
which function get called if we write in c++? noticing that by default the
function in c++ is not virtual, but in Java it is virtual.
4.寻找2个link list的intersection,并且返回该点
two solutions:
(1)using the unordered_set, firstly we visit the firstlinked list, and put
all the nodes into the set; then vist the second linked list, first check
if the nodes already in the set, if yes,then this node is the intersection
node; if not we will advance the pointer until we reach the end of the
second linked list.
应该是位india guy. 英语说的很清楚,没有什么理解问题。
题目很少,但是没问 why amazon, regex expression的问题。
下面是问的问题:
1.看到简历里面写了 C++和 Java,列出2者的区别,至少3个,并加以解释比较。
2. 关于OOD的继承的概念问题:
class a;
class b extends class a;
Is there any problem in the following codeand why?
a A =new b();
b B=new a();
3.基于上面的问题,问了下面这个问题关于虚函数调用的问题
class a with public function foo();
class b extends class a, and overide function foo();
we have:
a A=new b();
A->foo();
which function get called? from class a or class b?
which function get called if we write in c++? noticing that by default the
function in c++ is not virtual, but in Java it is virtual.
4.寻找2个link list的intersection,并且返回该点
two solutions:
(1)using the unordered_set, firstly we visit the firstlinked list, and put
all the nodes into the set; then vist the second linked list, first check
if the nodes already in the set, if yes,then this node is the intersection
node; if not we will advance the pointer until we reach the end of the
second linked list.