注册一亩三分地论坛,查看更多干货!
您需要 登录 才可以下载或查看附件。没有帐号?注册账号
x
拿了Postmates的OA, 但是因为签证原因直接不continue了
总共四题,一共两个小时,题目简单。一道题从看题到写完到pass所有test case差不多20分钟就ok了
1. given a positive integer, return the difference between product of all digit and sum of all digit. .и
2.given pattern p, a binary string, and a string s, which contains only lowercase english letter. Return the total number of substring of s that match the pattern p if and only if for each 0 in p, the corresponding letter in s is a vowel, and for each 1 in p, the corresponding letter in s is a consonance
.google и
3. given two string s1, s2, determine if two string are similar. Two string is considered as similar if they can be obtained from the other string through following operation 1) swapping any 2 symbols in string. 2) swap the occurrances of any two symbols (题目里直接给了hint告诉你思路是什么样)
4. Given two integer array a, b, and query, which is an array of queries. There are two types of queries. 1) query is of the form [0, i, x], you need to update b[i] to the value of x, 2) if query is of form [1, x], find the total number of pairs of indices i and j such that a[i] + b[j] = x. Perform all given queries and return an array of the result of all the queries of the second type.
第一次发帖,找工作也因为签证原因不顺利, 提前谢谢大家,希望有帮助~
|