I am having a little confusion in defining the base cases for overlaps, sometimes (s==e) is used while sometimes we use (qs<=s&&qe>=e)
Can you please explain how it is done?
I am having a little confusion in defining the base cases for overlaps, sometimes (s==e) is used while sometimes we use (qs<=s&&qe>=e)
Can you please explain how it is done?
@codeku hey ,s==e is use when we reach leaf node that are array elements itself and (qs<=s&&qe>=e) is use when we are given query range and our node range don’t lie in that query range because qstart is less than node interval start and greatee than end.