in line:- if(abs(left.height-right.height)<=1
why do you use abs?
Why do you use abs?
hello @priya_Jain
to keep the difference non negative we have used abs.
it will return absolute value.
ex->
abs(-2) is 2
in line:- if(abs(left.height-right.height)<=1
why do you use abs?
hello @priya_Jain
to keep the difference non negative we have used abs.
it will return absolute value.
ex->
abs(-2) is 2