NewThe Learning module is now liveSee what's new

You have nn holes on the surface of an old table, each hole's position given in an integer array arr. You want to cover all these holes using exactly two boards of the same positive integer length. If a board of length LL is placed at position XX, it will cover any hole whose position is in the range [X,X+L][X, X + L] inclusively.

Test Cases
Input
Output
Expected