Tuesday, February 6, 2018

Float numbers and operators

Feb. 6, 2018

Introduction


It is the algorithm I like to use in anonymous interview. I used it four times, and I started to think about more on the algorithm.

Brute force solution


Here is the brute force solution. This algorithm is really challenging and the peer complained to me on Feb. 5, 2018 that I should lead the interviewee to the optimal solution, otherwise it is waste of the time. The algorithm is for interview of principle lead or programmer, not even for senior.

There are a few issues to handle besides using recursive function, flat preference, max and min used to reduce the numbers from four to two, and also using memoization or dynamic programming will lead to optimal solution.

I will continue to use the algorithm and see if there is a super talent interviewee, and I can learn from the experience how to write the optimal solution.


No comments:

Post a Comment