the square depth of the number in polynomial time

Posting this answer so the question doesn’t stay open. Seems to be a mistake by the teacher and not possible.

The problem was probably supposed to only allow elimination of first or last digit, in which case the problem can be solved in O(d^2) using dynamic programming.

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top