If stack becomes empty , then no element is greater on left side . Else top of stack is previous greater .
if ( s . Count == 0 ) Console . Write ( " - 1 , ▁ " ) ; else Console . Write ( s . Peek ( ) + " , ▁ " ) ; s . Push ( arr [ i ] ) ; } }