Postmates OA 经验

avatar地里匿名用户N1BSL
1860
1
拿了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

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
  • 1
1条回复