Why n^4 will not work in this problem

in video it was said that n^4 will not work but n<=10 so it should work right ?

@aryan_007
This question can be asked for bigger constraints as well where the n^4 approach will fail.

If my answer is able to resolve your query, please mark the doubt as resolved.