Spiral Print array

can we use startRow<=endRow instead startRow<endRow in if condition ?

Hey Akshay, yes startRow<endRow is a valid if condition.