# Can anyone solve this problem in 1 hour without seeing it before?

• Can anyone solve this problem in 1 hour without seeing it before?
Can anyone solve this problem in 1 hour without seeing it before?
Can anyone solve this problem in 1 hour without seeing it before?

• If you are asking just about solving it, sure anyone can. Solving the problem in fact is easy. All you have to do is remove one element at a time and try out all the possible ways to do so and pick max. Think of this recursively. However, optimizing it is a different story. I am relatively new to competitive programming. I have been practicing for a while. I can come up with solution pretty fast; most of the time brute force. Optimal solution might require a lot of practice though.

• @biprajiman I think solving it brute force using recursion does not count as solving the problem. In real life, an exponential runtime solution is often not good enough for a problem in P. In this case, the runtime is O(n!)!! That means i give an input with length 60, you have to do the amount of work comparable to the number of particles in the universe. In this case, brute force is almost useless

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.