Avalara Technologies 的 FTE SDE 面试经验 |在校园
第 1 轮:hackerrank 线上轮
- 4 个问题 (50+100+100+150)
- 2小时
问题 1:[简单 - 50]
There are books in a shelf, Either type of X or Y, Your mom wants to make sure before your birthday party, shelf is arranged. All the X type of books should be on left, and all the books of type Y should be on right. There is a time cost associated with each swap, output if it is possible to arrange them before the party starts.
问题 2:[中 - 100]
You have been given A and B in range. Find the product of all numbers in the range.
1<=A<=100,000 and A<=B<=100,000
You need to return the answer as a string in the form of, “C x 10^D”
If C has more than 10 digits, then output C as 12345…12345 x 10^D
Example 1:
7 7
Output:
49 x 10^0
Example 2:
1 17
Output:
355687…28096 x 10^3
问题 3:[中 - 100]
You have been given an array, which represents height of light towers. For every tower, it’s range is (A*B % 1000000007) where :
A = (Buildings visible on left side + Buildings visible on right side)
B = position of light tower in the array (1…N) [1 based indexing]
Now,
You have to return the position of lighthouse which has maximum range. If two have same range, return the one with minimum B (leftmost).
问题 4:[中 - 150]
https://www.spoj.com/problems/WITTYBOY/