Maxiumum rectangle of 1s doubt

My code’s showing runtime error could you pls tell me why?

hello @nidhigupta847
in left and right vector u should push index instead of value at that index .
correct it