That was definitely a way to do it. However, I am pretty sure that only works with constraints on the range values, and the way I wanted to solve it was to be sure it could handle any range.
I could be wrong which in that case, I will certainly remember this way lol
Wouldn't you just check
b >= a && b <= c
?That was definitely a way to do it. However, I am pretty sure that only works with constraints on the range values, and the way I wanted to solve it was to be sure it could handle any range.
I could be wrong which in that case, I will certainly remember this way lol
Nope to me lol, you're just right and I am pretty sure that works for any size range not just that but the
Big O is significantly better ahahaha!