Function StackComparisionsis MaxCheck the given value less than or equal to max_value Output return boolean valuePreviousis LengthNextis Min