I have a take home interview problem with a flexible time limit and the solution to the problem is available on leetcode and online. There are several different types of solutions with varying degrees of difficulty.
How should I proceed?
Let the hiring manager and engineer know that there are solutions online and ask how I should proceed
Submit the solution and cite the online solution and blog (where the solution is) while explaining why I thought this was the best solution. Add unit tests and package the code nicely.
Submit a sub-optimal solution that I initially wrote, and also the optimal solution that I found online while citing the online blog.