Stock Span Question


Getting wrong Output in testcase 4