Contraints - LC Problems

Hello LC Community

While every problem has a constraint and some seems obvious - i am looking for something on the perspective of how these contraints help us solve the problem optimally ( or not ).

2 <= nums.length <= 500
0 <= nums[i] <= 100

or ( some random example )

1 <= A.length = A[0].length <= 20
0 <= A[i][j] <= 1

For Eg: 0 <= nums[i] <= 100 would mean each value in the array wont exceed a max of 100 - but how is thie helpful for the solution ? ( lets say its a problem that has nothing to worry big int conversions ) is it take care of edge cases ?

I think they are there for a reason - which does not jump out obviously .

Appreciate some pointers about how these should be ( or should not be ) considered while coming up with a solution

Comments (0)