As per the graph visualization the code must iterate b-a times starting from a+1 to b , but according to the given code in step execution the code is iterating b-a+1 times starting from a to b
let a=3,b=5
then in first iteration
and in second iteration
and there is no another iteration which is to be happened according to the code
As per the graph visualization the code must iterate b-a times starting from a+1 to b , but according to the given code in step execution the code is iterating b-a+1 times starting from a to b
let a=3,b=5
then in first iteration
and in second iteration
and there is no another iteration which is to be happened according to the code