Book Version 1.4.8: Divide and conquer solution to buy and sale stock once

#1

Hi,
Has anyone implemented a divide and conquer solution for the ‘buy and sell stock once’ problem discussed on page 1(book version 1.4.8)?
I implemented an algorithm but it results in Stack overflow on the test cases in EPI judge.

I will share the source code, if required.

0 Likes