The Coding Assessment had a 7 day time frame to start. Once started, the time allocated is 90 minutes.
The test was on Hackerrank platform, supporting 19 programming languages including Java, C, Python...
The test consisted of 2 questions:
The question had a list as an input ([3, 6, 10, 1, 4, 6, 5], for example)
You have to design an algorithm that finds the greatest difference between two elements, such that the larger element appears after the smaller element.
In the example above, the output should be 7 (10-3 = 7).
Return -1 if the maximum difference is flat or negative.
Constraints I remember:
1 =< size of array
Given an array like {1,1,3,2,6,4,1,7}, find the longest increasing subsequence. In this case it is 4, {1, 3, 6, 7}.
If there is no increasing subsequence, return 1. E.g. arr = {5,3,1}, return 1.
Personally, I thought the questions were quite easy. There are plenty of solutions available both on LeetCode and elsewhere, although some of the better performing approaches with Dynamic Programming would have been hard to come up with on my own, personally.