Hey this time I had an interview from Altera, which is one of the biggest FPGA company just acquired by Intel. And it seems I've done fairly good job.
The first question is about find the peak element in an array. After I get it done, he asked me to revise it to make it faster. Then he asked me about how to do it without for loop? Of course recursive.
The second question is about stock price. Find the max profit of one day, not hard. The we can do multiple trade each day, how can we maximize? Then it's a BFS question but what a shame we don't have time to talk about it any more.
The third problem is about raining city problem. To calculate the water accumulation of the whole city in two dimension.