educative.io

Educative

What's the meaning of Integer.MAX_VALUE in three solutions?

In other questions, we didn’t use Integer.MAX_VALUE in the solutions. But in this question, we use Integer.MAX_VALUE in all three solutions. I was confused of reason of using this. And also in which situation, should we use Integer.MAX_VALUE in dp questions?

Do you guys have any ideas?

Thank you!