由买买提看人间百态

topics

全部话题 - 话题: lookup
首页 上页 1 2 3 4 5 6 7 8 9 10 下页 末页 (共10页)
w*n
发帖数: 5041
1
来自主题: GiftCard版 - LNT GC FAQ
LNT: Linens 'n Things, 家居用品店, 与BBB(Bed Bath and Beyond)类似
1. 19 digit card # and 4 digit PIN #
2. Check balance:
800-799-6247
http://cardbalance.storedvalue.com/lookup.shtml?Host=lnt.com
3. Expiration:
不过期(至少卡背面完全没有说明)
4. Online purchase:
不限张数, 但必须一张一张地apply, 可以与coupon合用
5. Instore:
不限张数, 也就没必要combine了;
coupon如果忘记带, 可以下次去店里的时候拿receipt 退20%
*6. local pick-up的时候, 最好带齐使用的所有GC; 否则店方有可能以GC fraud为名
拒绝让你提货(即使有order confirmation和pick-up notification也一样; 他们的系
统是要求输入使用的所有GC&CC的后几位, 大部分情况下, 没带的话, manager会帮
l********d
发帖数: 62
2
来自主题: Gowest版 - [转载] Re: help
【 以下文字转载自 JobHunting 讨论区 】
【 原文由 PoorEastman 所发表 】
www.msn.com -> white pages -> reverse # lookup
w******i
发帖数: 1476
3
来自主题: JobHunting版 - 一个很全SAS Interview Q. List [ZT]
SAS Interview Questions from http://www.sconsig.com/
Very Basic
What SAS statements would you code to read an external raw data file to a DATA
step?
How do you read in the variables that you need?
Are you familiar with special input delimiters? How are they used?
If reading a variable length file with fixed input, how would you prevent SAS
from reading the next record if the last variable didn't have a value?
What is the difference between an informat and a format? Name three informats
or format... 阅读全帖
G******i
发帖数: 5226
4
来自主题: JobHunting版 - [合集] 我想我FAIL掉了. 题目好难.
☆─────────────────────────────────────☆
LindaLiao (梅影清吟) 于 (Fri Nov 2 18:20:42 2007) 提到:
SDET 第2轮电话面试
感觉好差. 我想我一定出局了....
好难受, 题目好难. 1个小时写不出来. :(
☆─────────────────────────────────────☆
csdfg (谁是东方郭) 于 (Fri Nov 2 18:21:46 2007) 提到:
什么题目?

☆─────────────────────────────────────☆
LindaLiao (梅影清吟) 于 (Fri Nov 2 18:23:25 2007) 提到:
给你一个800的电话号码, 比如:
1 800 RENTCAR
让你输出 1 800 7XXX-XXX
☆─────────────────────────────────────☆
camping (Nature) 于 (Fri Nov 2 18:25:07 2007) 提到:
搞个lookup
s*******n
发帖数: 46
5
来自主题: JobHunting版 - MS Onsite
我大概是failed了, 不过还是贴一下经历给大家参考一下
见的第一个人是个senior SDE lead,在MS 10年了, 印度人, 扯了一下闲话以后出题
,给你电话号码, 打印单词。很简单的题目, 但是乐极生悲,开始写的时候居然写成
了permutation。写完了他说你那个select array是干吗的, 我还说用来permute的啊
, 突然想起来,这个电话号码是给定的。。。当时就直冒冷汗。不过白板上擦掉code
还是很容易的,所以马上就改对了。然后他就问了一下如果不是英语的电话,上面如果
是其他语言的字符, 而且没有规律你怎么办(因为我写了一个numtochar的函数给你数
字和choice返回字符),我说一共就10个number,可以见一个table lookup,也不会开
销太大。然后他说ok就结束了。
第二个是个俄罗斯女的,多SDE 7年 (个人感觉是死在这个人手上了)。长的其实还蛮
pp的(汗)。一开始扯我做的一个project扯了半天。然后出题,说有个很大的数据库
,用tree做index。给你任一一个node,你如何马上找出这个node所有的descenden
r*******d
发帖数: 117
6
现在版上的文章好像已经以H1申请为主了,不知道多少人还对面经感兴趣。不过想想还
是写一下好,要不自己过几天可能就忘光了,呵呵。
申请工作:Software Developer,Mobile Application组
问题问的很多很杂,基本上不难。不过后来想想,也没有全都答对。大概包括:
* 为什么对Amazon感兴趣。
* 自己最近的Project。
* 说出自己会的编程语言并打分(1-5)。
* 有没有开发Mobile application的经验。
* 几个常见Data structure的Lookup操作的时间复杂度。
* HTTP post和get的区别。
* Design Pattern: Singleton, Factory, Lazy initialization。
* Multi-threaded programming, deadlock之类。
* 对Unix环境是否熟悉,几个常见命令,ls, ps之类。
* Reflection的概念,Java reflection,C++里面是不是有reflection。
* 如何实现Garbage Collection。Refe
w******1
发帖数: 520
7
来自主题: JobHunting版 - Bitmap是怎么回事啊?
On Memory Management of Tree-bitmap
Algorithm for IP Address Lookup
http://www.academypublisher.com/proc/iscsct09/papers/iscsct09p418.pdf
y**i
发帖数: 1112
8
来自主题: JobHunting版 - 问一道题
能不能这样,每一位的进制不一样,根据输入的数字从一个lookup table可以查到。
c*********u
发帖数: 361
9
来自主题: JobHunting版 - 一个关于hash table的interview question
基本概念,不过问得比较细,觉得比较有参考价值。(这里语言用的是Java)
1. What is a hash table?
2. What does Java do when it creates a hash table?(details, size, load facto
r, etc)
3. How is the hash table implemented to ensure constant lookup time?
4. How is each element of the hash table implemented?
4. Say you have a hash table of size 10 and load factor of 0.5, what ha
ppens when you insert a 6th element? Why?
c*********u
发帖数: 361
10
来自主题: JobHunting版 - 一个关于hash table的interview question
The hash table will double its size (this is my guess). A key point here is
that it has to allocate 20 new blocks of memory to ensure the constant
lookup property.
H*X
发帖数: 281
11
嗯,因为循环一开始是0个,偶数,然后每次循环运行一次,就是不停地奇数偶数转换
,所以就不用算总数了。
这道题就是计算parity bit,如果不想一位一位计算,可以用lookup table,或者用一些
magic number
f*********5
发帖数: 576
12
来自主题: JobHunting版 - 关于trie和binary search tree的疑问。
lookup for BST is O(lgn)
but pay attention now u want to compare a word each time,
you need to compare the target word with the word in current node
u need to compare each letter of the word...
s****n
发帖数: 150
13
来自主题: JobHunting版 - amazon 电面面经
把这两天我的两个amazon的电面题总结下,有些东西没记全,只能记得什么写些什么了。
1. why amazon ? 这题感觉被考几率很大,必须准备的题目
2. 谈了下简历中的project
3. stack 与 queue的区别
4. HashTable 和 Binary Search Tree(BST)的区别,他们的lookup,insert的time
complexity. 之后针对 HashTable 和 BST 分别做了展开:要从电话本中列出一定范围
的人名
(比如某个姓的),要用哪个数据结构?hash。 还谈了些别的应用情境,我记不大清
了。
5. process 和 thread的区别
6. 什么是deadlock ,有什么方法避免deadlock
7. 什么是context-switch
8. OS 中 schedule process有什么方法
9. 喜欢哪种编程语言 ? python。 那你觉得python有哪些地方你不是很满意的 ?
10. coding, coding完后根据程序问相应的time complexity 和 test的问题:
(1)输入一个整数
p********7
发帖数: 549
14
来自主题: JobHunting版 - amazon 电面面经
4. HashTable 和 Binary Search Tree(BST)的区别,他们的lookup,insert的time
complexity. 之后针对 HashTable 和 BST 分别做了展开:要从电话本中列出一定范围
的人名
(比如某个姓的),要用哪个数据结构?hash。 还谈了些别的应用情境,我记不大清
了。
电话号码典型用trie啊。
谢谢面经
a*******n
发帖数: 64
15
来自主题: JobHunting版 - 分享一下bloomberg的电面
只说一下在版上不常看到的题吧
1, what will be problems when combining c and c++ code?
2, read BST lookup code
2.1, what if every node has more than 2 children, how to declare the node?
2.2, what if some node also has a pointer to the root or his parent?
3, a linked list, each node has an interger number, count all the "1"s of
all
the numbers? say, 311, there are 2 "1"s
对于bloomberg一定要表示你清楚这个职位干什么的,你非常有兴趣
c**********e
发帖数: 2007
16
来自主题: JobHunting版 - C++ Q21: size of virtual table
#include
class A {
public: virtual ~A() {}
};
class B : public A {
public:
virtual void f() {}
};
Referring to the sample code above, on a typical platform that uses virtual
tables to implement virtual function lookup, what do you expect "sizeof(B)"
to be?
a) 4
b) sizeof(void *)
c) 2*sizeof(void *)
x****k
发帖数: 2932
17
来自主题: JobHunting版 - 这道题好像有点难
char badd(int x, int y, int & carry) 可以用lookup table实现。
可以将a和b中较短的一个先copy到c中,高位补0,然后再循环相加,这样可以节省一个
循环。
f*******h
发帖数: 53
18
来自主题: JobHunting版 - 攒人品,twitter二面面经
No, he didn't mention that. That should be a lookup data structure. It's not the purpose of this interview question I guess.

at
c********t
发帖数: 5706
19
来自主题: JobHunting版 - 攒人品,twitter二面面经
pick an position and corresponding entry in the hash table??
hashtable不是只有用key lookup吗?能用index吗?

position
n******n
发帖数: 49
20
来自主题: JobHunting版 - google on campus 面试多久出结果+面经
对的就是挨个网里塞,但是hash_set c++中insert/lookup amortized下来都是o(1),普
通set是红黑树实现,o(lgn),所以普通set慢一点。

set
V*****i
发帖数: 92
21
来自主题: JobHunting版 - 问两道google题
There is no need to pass Dictionary and lookup table, use global variable or
use class. My solution as follows:
#include
#include
#include
#include
using namespace std;
// T(n) = \sum_{i=1}^{n-1} (T(i) * H(i+1))
const int MAXSIZE = 100;
class find_str {
private:
set dict;
int lookup_table[MAXSIZE];
public:
find_str(set &d) {
dict = d;
for (int i=0; i ... 阅读全帖
V*****i
发帖数: 92
22
One should use a lookup table to check duplicates
My code is like this:
void find_permutations(string s, int i, int n) {
if (i >= n) {
cout << s << endl;
} else {
bool ch[256];
for (int j=0; j<256; j++) ch[j] = false;
for (int j=i; j if (!ch[s[j]]) {
ch[s[j]] = true;
swap(s[i], s[j]);
find_permutations(s, i+1, n);
swap(s[i], s[j]);
}
}
}
}
U... 阅读全帖
J******8
发帖数: 132
23
来自主题: JobHunting版 - Facebook phone screen
Not hard at all. But I focused on how to do wildcard matching, missed the
point to do linear lookup in dictionary in that case (binary search not
applicable any more).
j*****u
发帖数: 1133
24
来自主题: JobHunting版 - Facebook phone screen
did he ask to use additional space to speed up lookup? ( is the source must
be an array)
otherwise the O(n) match is not interesting at all.
n***k
发帖数: 2780
25
thanks for your response.
Yes, I guess Trie might be the right solution. however, how can we use Trie
to solve wildcards for lookups?
for example, "com.yahoo.*" should match all nodes like these:
"com.yahoo"
"com.yahoo.finance"
"com.yahoo.sports"
...
E***n
发帖数: 166
26
来自主题: JobHunting版 - 微软on-site面经(Intern)
一共见了5个人,题目都是常见题,
1.recuiter,非技术问题
2.把二叉树所有同层的节点连接起来,让左边的指向下一个,以此类推,每层最后一个
指向null
3.一个数组,剔除重复的数字
4.设计一个2人游戏,每个人有8 x 8的面板,每个人在面板上有几艘军舰,每个军舰是
面板上的一个横条或竖条,每个人一次可以向对方某个位置射击,知道击沉所有军舰。
每个人看不见对手的面板设计。设计所有的class,实现isHit(), isSunk()
5.聊了过去的research, 设计一个dictionary,实现insert, lookup 2个函数,我基本
就是设计了一个hashtable
g*********s
发帖数: 1782
27
来自主题: JobHunting版 - Google及其它面经 (长,慎入)

0~255 is for 1 byte. 64bit = 8byte.
unsigned char tab[256];
an int64 need 8 times of table lookup.
J******8
发帖数: 132
28
来自主题: JobHunting版 - Apple Onsite?
All hard algorithm questions. don't care about what you did before:
Ask for blessing....
===================================
1) Find missing number
A file contains 2^40 32-bit integers,
Given 15MB memory. Which which number is missing.
2) Target coins
Given a list of coins such as 25, 10, 5, 1
find the minimum number of coins for a target value such as 95.
3) Extended dictionary lookup
boolean arewords(char *words)
For example:
catdog, catsdog: both return TRUE
catzdog: return FALSE
4... 阅读全帖
c***2
发帖数: 838
29
来自主题: JobHunting版 - Extended dictionary lookup
boolean arewords(char *words)
For example:
catdog, catsdog: both return TRUE
catzdog: return FALSE
y******5
发帖数: 43
30
来自主题: JobHunting版 - Extended dictionary lookup
不知道理解得是否准确:从左至右扫描words,如果始终找不到一个分割,使得左右两
边都在dictionary中,那么return false. 复杂度取决于dictionary的实现。
x*********n
发帖数: 418
31
来自主题: JobHunting版 - amazon intern 3电
题目就两道
1.给几个字符,如果要lookup和list用什么数据结构,如果不停的有random字符进来用
什么,如
果。。。他一直在变要求,然后就在hash,map , bst,tire 里面打转。。
2.coding,输入ip,return number array
准备的面筋。。三次电,一道都没碰上啊。。
j***y
发帖数: 2074
32
来自主题: JobHunting版 - 问个anagram的题目啊
在看Hacking_a_Google_Interview_Handout_2.pdf,里面提到:
Classic Question #6: Data structure for anagrams
Given an English word in the form of a string, how can you quickly find all
valid anagrams for that string (all valid rearrangements of the letters that form
valid English words)? You are allowed to pre‐compute whatever you want to and
store whatever you optionally pre‐compute on disk.
Answer: We want to use a hash table! If your interviewer really hates hash tables (which they sometimes do for some... 阅读全帖
A*****i
发帖数: 3587
33
来自主题: JobHunting版 - 攒RP发A家第一轮电面
天生一些口吃啊~~~伤不起啊,念代码都念不明白,好赖最后对方懂了……唉……
1.介绍以前做过的project和最有挑战的部分。
2.IP地址多少字节……多少bits,为什么。。。。
3.从一段文章中将每个word的出现次数统计出来,每个word用空格隔开。
第一题纯走过程。
第二题因为说第一题的时候提到在project里面用trie来做IP lookup,所以就问IP了,
感觉他们问
问题真是随机啊
第三题,说了两种方法,第一种用两个string类型的vector,逐位比较,问我时间复杂
度,显然
O(n*n),问我能不能优化一下,我说第二种用hash table, 让我念代码, 又问hash
table的大小
应该如何确定,用什么来做为hash table, 映射过程如何,又让优化,这次真优化不出
来了,只说时
间复杂度是O(n),然后让自己问问题,随便问了两个就完了
整个过程确实是他不断提要求不断提醒的过程……要是最后一次优化能解决就好了,估
计悬了唉……
c******t
发帖数: 391
34
来自主题: JobHunting版 - 攒RP发A家第一轮电面
请教一下,电面里面如果要用到hash table的话,coding时是不是也要求实现hash
table,而不能用STL里面的?STL里面是基于tree的,所以不能实现O(1)的
lookup和insert
y*****2
发帖数: 294
35
来自主题: JobHunting版 - lookup table是干嘛用的?
有这个数据结构吧?
s***o
发帖数: 6934
36
来自主题: JobHunting版 - lookup table是干嘛用的?
这是个logical的概念吧,实现起来可以用很多不同data structure
m**q
发帖数: 189
37
来自主题: JobHunting版 - 电面不好,求bless。这题怎么答?
把A的所有行放到trie中,遍历B时对每一行去lookup trie?
w**n
发帖数: 122
38
来自主题: JobHunting版 - 贡献一道电面题
电面,写code,前面还问了些其它的东西,最后写程序这个题,还剩大概20分钟吧
设计一个hash table的类,写出数据结构, members
里面插入和搜索两个function要具体实现一下
假设hash function已经有了,不用自己写
要考虑collision怎么解决
给出了函数头
void insert(const Key& k, const Value& v);
Value& lookup(const Key& k);
c****p
发帖数: 6474
39
来自主题: JobHunting版 - 请教两道CS题
第二题做个类似于accumulative sum的数组就可以了吧。。
S[n] = x0 + x1 + ... + xn
建S[n]是O(n),而且是一遍lookup。
Cb(t) = S[t] - S[t-2];
Ca(t)应该类似。

for
and then the least significant digits. For example, {254, 257, 322} →{322,
254, 257}→{322, 257, 254}. What is the complexity of radix sort? In what
settings would radix sort be
s*****y
发帖数: 897
40
来自主题: JobHunting版 - 问个1337网页上面的经典题
Construct Binary Tree From Inorder and Preorder/Postorder Traversal
const int MAX = 256;
// a fast lookup for inorder's element -> index
// binary tree's element must be in the range of [0, MAX-1]
int mapIndex[MAX];
void mapToIndices(int inorder[], int n) {
for (int i = 0; i < n; i++) {
assert(0 <= inorder[i] && inorder[i] <= MAX-1);
mapIndex[inorder[i]] = i;
}
}
// precondition: mapToIndices must be called before entry
Node *buildInorderPreorder(int in[], int pre[], int n, int offse... 阅读全帖
s****e
发帖数: 139
41
来自主题: JobHunting版 - 问10个老题
10.
Build a array A'[i] = max(A[0...i]) take O(n) to build it
Lookup for max is O(logn) (binary search)
S**I
发帖数: 15689
42
来自主题: JobHunting版 - 问道关于快速找bucket的面试题
If all elements are integers, then the hash table size is the same as
summation of size of all buckets. If number of buckets is small and the
input array is huge, then lookup is O(1).
S**I
发帖数: 15689
43
来自主题: JobHunting版 - amazon的interview该准备啥?
Sent by Amazon recruiter:
Thank you for the interest in Amazon.com and taking the time to speak with
us about some of the exciting opportunities that we have available. We've
put this document together to help give you an idea of what types of
knowledge we expect some level of familiarity with.
Preparing for Your Interview
At Amazon.com we're looking for talented engineers that can apply the
knowledge that they've learned in school and in industry to solving some of
the world's most complicated ... 阅读全帖
B*******1
发帖数: 2454
44
来自主题: JobHunting版 - google电面杯具,贡献题目
a -> ba->nba
假设ba,nba都是valid,你的trie每次都从头lookup?
B*******1
发帖数: 2454
45
来自主题: JobHunting版 - google电面杯具,贡献题目
a -> ba->nba
假设ba,nba都是valid,你的trie每次都从头lookup?
D*******e
发帖数: 151
46
来自主题: JobHunting版 - 我的面经回馈本版
本人CS Fresh PhD,一般学校,专业机器学习.本人实在是不牛,受益于本版,在此攒人品.
申了Microsoft, Google, LinkedIn, Twitter,eBay,都拿到onsite.去湾区只有三
天,只好放弃T.G家开始说过了hiring committee,但拖到三周多后告诉我挂了.由于过于
自信,本以为会签了,导致没有申到今年的H1B.因此对G家充满怨念.拿到M,L,E的OFFER.
思量之后签了M,RSDEII.
先说我的感想:
1)别老想着做题,起决定作用的还是基本功,思维能力,和状态.我有些朋友横扫各大
公司的,他们都不屑于搜面试题来做.而且总有做不到的题,面试时候的发挥很重要;
2)尽管如此,尽量多的去做些题.重复率还是蛮高的;
3)找工作是不确定性蛮大的事情,保持好的心态,自信.
Twitter:
1) Find the median on N machines;
2) Stream sampling;
3) How to evaluate a classification al... 阅读全帖
j********t
发帖数: 97
47
来自主题: JobHunting版 - Bloomberg面经(onsite)
我被问过两种case
1)按人名查找电话号码。
使用trie的话,lookup time O(n),n是名字长度和电话号码数无关。
如果用ordered map,也就是balanced BST的话,look up time log(N),N是电话号码数。
hashmap的话,不容易traverse alphabetically.
2)按号码显示人名
这个是不是可以用楼主讲的array based solution。10位号码的话,要很大的space。

又问了电话号码的问题,具体说是在弱手机上实现全名查找以及顺序浏览。说了
hashmap和trie。他们说太复杂了,我才说出他们想要的是linkedlist或者array based
的solution。
w**z
发帖数: 8232
48
来自主题: JobHunting版 - 请教一个新鲜算法面试题
Two ways.
1)better way,
entrySet
public Set> entrySet()
get iterator of the entry set
2)less efficient
keySet
public Set keySet()
get iterator of key set, and do lookup on the hashmap.
i**********e
发帖数: 1145
49
来自主题: JobHunting版 - 问个MS面试题
赞同。
总共就只有 2^9=512 种状态,直接 table lookup。

one
.
R******9
发帖数: 267
50
来自主题: JobHunting版 - 问个MS面试题
是这个思路。。我面MS embedding组时有人出这个题目,interviewer解释说是table
lookup.
首页 上页 1 2 3 4 5 6 7 8 9 10 下页 末页 (共10页)