由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
JobHunting版 - p家新鲜电面面经summer intern
相关主题
有没有人面过citrix?顺便也求网上面试经验palindrome partioning II
M家一道题leetcode的N queens II
non-pp, reg,ca,继续没有消息数独那2个题
哎,收到据信valid sudoku一问
EAD card (OPT) 已经寄出来了,但是为什么没有tracking number?Google第一轮面经
这个check whether a binary tree is a BST or notSudoku
刚面完ebay,说打算招300个G家onsite面经
leetcode 一道题 valid palindromen queens II ,, 時間复杂度是多少?thank
相关话题的讨论汇总
话题: nextcolumn话题: nextrow话题: direction话题: column话题: int
进入JobHunting版参与讨论
1 (共1页)
l**********i
发帖数: 84
1
面了1小时15分,前几题感觉不错,结果被问到tcp vs udp的时候根本不知道是啥玩意
儿,估计是悲催了。哎,题目如下:
1.Can you talk a little about yourself first?
2.Why do you choose p?
3.Difference between linkedlist and array
4.In what condition do you use tree structure? How do you keep them balanced?
5.TCP protocol vs UDP protocol (have no idea)
6.How do you implement a hash table?
following up question:
Data structure; size; hashfunction; linkedlist vs hashtable in dealing with
collision
7.coding
print spiral matrix
Given a matrix of m x n elements (m rows, n columns), return all elements of
the matrix in spiral order.
For example,
Given the following matrix:
[
[ 1, 2, 3 ],
[ 4, 5, 6 ],
[ 7, 8, 9 ]
]
You should return [1,2,3,6,9,8,7,4,5].
coding题目挺简单的,听完题马上想到思路。我先说了一下思路,对方说可以。然后让
我说说代码的结构。我不知道该怎么答,就码了几个变量并解释他们是干什么的。感觉
对方似乎不是很满意。在写代码的时候面试官总是让我停下来解释怎么回事。根本没时
间检查bug。最后我用个例子,放到代码里一行一行地解释怎么回事,讲了半天对方才
肯定我的code会work.讲完后我试探地说“i'm sure you probably have other
solutions", 面试官说是。
面完后搜了下才知道是leetcode上的题,面试官估计是有更优解。
-----------------------------
上spiral matrix的代码,请码友们多多批评指教~
//java
public void printSpiral(int[][] numbers) {
int direction =0;//if 0 go right, if 1 go down, if 2 go left, if 3 go up


int row=0, column=0;
while(numbers[row][column]!=Integer.MIN_VALUE){
System.out.print(numbers[row][column]);
numbers[row][column]=Integer.MIN_VALUE;
int nextrow=nextrow(direction, row);
int nextcolumn=nextcolumn(direction, column);
if (!isValid(numbers, nextrow, nextcolumn)) {

nextrow=nextrow(direction, row);
nextcolumn=nextcolumn(direction, column);
if (!isValid(numbers, nextrow, nextcolumn)) break;
}
row = nextrow;
column=nextcolumn;

}
}
int nextrow(int direction, int row){
if (direction==0){//moving left
return row;
}
else if (direction==1){//moving down
return row+1;
}
else if (direction==2){//moving right
return row;
}
else {//moving up
return row-1;
}
}
int nextcolumn(int direction, int column){
if (direction==0){//moving left
return column+1;
}
else if (direction==1){//moving down
return column;
}
else if (direction==2){//moving right
return column-1;
}
else {//moving up
return column;
}
}
boolean isValid(int [][]numbers, int nextrow, int nextcolumn){
return (nextrow<0||
nextrow>numbers.length-1||
nextcolumn<0||nextcolumn>numbers[0].length||
numbers[nextrow][nextcolumn]==Integer.MIN_VALUE)?false: true;
}
j*****n
发帖数: 1545
2
你啥专业的?
l**********i
发帖数: 84
3
半路出家,cs

【在 j*****n 的大作中提到】
: 你啥专业的?
g**4
发帖数: 863
4
bless!
第5题introduction to computer networking里会讲到,不知道应该算正常
请问p是paypal吗?

balanced?
with

【在 l**********i 的大作中提到】
: 面了1小时15分,前几题感觉不错,结果被问到tcp vs udp的时候根本不知道是啥玩意
: 儿,估计是悲催了。哎,题目如下:
: 1.Can you talk a little about yourself first?
: 2.Why do you choose p?
: 3.Difference between linkedlist and array
: 4.In what condition do you use tree structure? How do you keep them balanced?
: 5.TCP protocol vs UDP protocol (have no idea)
: 6.How do you implement a hash table?
: following up question:
: Data structure; size; hashfunction; linkedlist vs hashtable in dealing with

l**********i
发帖数: 84
5
恩是的。最近学networking已经知道了。多么痛的领悟啊

【在 g**4 的大作中提到】
: bless!
: 第5题introduction to computer networking里会讲到,不知道应该算正常
: 请问p是paypal吗?
:
: balanced?
: with

m********l
发帖数: 791
6
基本上udp/tcp 不了解的就是半路出家的了。。我也不了解 因为我也是半路出家 LOL

【在 l**********i 的大作中提到】
: 半路出家,cs
l**********a
发帖数: 181
7
mark
1 (共1页)
进入JobHunting版参与讨论
相关主题
n queens II ,, 時間复杂度是多少?thankEAD card (OPT) 已经寄出来了,但是为什么没有tracking number?
继续发个snapchat面经题这个check whether a binary tree is a BST or not
求教Valid Sudoku刚面完ebay,说打算招300个
问个sql问题leetcode 一道题 valid palindrome
有没有人面过citrix?顺便也求网上面试经验palindrome partioning II
M家一道题leetcode的N queens II
non-pp, reg,ca,继续没有消息数独那2个题
哎,收到据信valid sudoku一问
相关话题的讨论汇总
话题: nextcolumn话题: nextrow话题: direction话题: column话题: int