Stacks and its functions

line no 13 , they checked if the stack’s peek is greater than arr[i] but initially our stack should be empty . so how could they compare them. and in theory portion. sir said we will push a elemnt in stack first i.e. 2 but in code he didnt.

so , i wanted to know how could they compare a empty stack with arry without pushing any element initially