3 ms·
That sort of divide and conquer method does not work well for all scenarios, and certainly will not get you the optimal solution for all scenarios. Consider wr
by mrtron 18y ago
That sort of divide and conquer method does not work well for all scenarios, and certainly will not get you the optimal solution for all scenarios.
Consider writing a connection counter for linked in. How many connections do you have, and how many 2nd level connections do you have through those people. If you decide to break this down into smaller problems, you are going about it the wrong way in all likelyhood. An optimal solution will involve a dynamic programming algorithm, which solves the entire problem in a tricky way (a clever hack).