Saturday, August 9, 2014

Google 面试题目

1 设计一个数据结构和函数用来从一个普通表格生成pivot table
2 设计一个火车和车站系统,以文件读入,给出两个站点,输出能够从A走到B的所有火车
3 设计一套服务器能够帮助产品分析员搜索,分析和操作fraud account
4 设计一个HashMap的基本结构(member variable),一个把字母间有多个空格的字符串规范成只有一个空格的字符串


Bloomridge
写一个排序算法,设计一个测试
Hired
在一个连续(可正可负)数组里查出连续加和最大的子串

Facebook:
11221121 排序(两个元素)
11221132132 排序(三个元素)
1111122222333334477777找出target的出现次数

Evernote:
向一个链表的某个index 插元素
Node insert(Node head, int index, Node data)
注意在电话里合理有序地解释算法!

Google PQA 准备:
Knowledge of the products / how to abuse / solution

ads: adwords, adsense (adspam)
google wallet (now we can also send money with gmail)
    money laundering / scam
    identity stealth (unauthorized transactions)
    phishing / spoofing
    use google wallet to sell illegal / unauthorized things
    security problem with third party applications that connects to google wallet

    product quality / user experience
webmaster guideline
    Avoid the following techniques:
google places (My business)
    malicious or incorrect labeling (a competitor labeling a shop as closed)
    malicious or fake review
    bad / malicious information (wrong phone number connecting to a porn audio)
    
google webstore / appstore
    copyright
    abuse google trademark or fake info for branding
    poor quality / illegal content
    misleading information

search quality evaluation
   language models (the ability to handle phrases, synonyms, diacritics, spelling mistakes, and so on), query models (it's not just the language, it's how people use it today), time models (some queries are best answered with a 30-minutes old page, and some are better answered with a page that stood the test of time), and personalized models (not all people want the same thing).

solution:
instant operation (freeze / close the account)
automatic dettect (according to some signals or suspicious behaviors)
    like wire transfer, direct bank transfer
check user identity before any transaction or other critical operation (like PIN verification, or phone / email / question verification for suspicious behavior)
24/7 customer service
educating customers for awareness of those behaviors
collect information from google users (report spams, report suspicious email)

药罐问题
n叉树,根部flood子树,每次每个节点可以flood其中一个子节点,求可能最优化的时间
interpreter pattern 用树存储逆波兰式
背包问题,knp

head first design pattern
tree, string, recursionl

FB面试题目
Arch:设计一个new stories update框架
设计一个dictotionary,实现出input 和 lookup,实现有通配符的词的lookup
从一个String里提取包含所有出现过的字母的最短substring
把一个array中所有的非零数字提前
把一个多分支树用多行string和表达出来, |_表示连接符
找出两个string里面相同的字母,转换成string输出

No comments:

Post a Comment