after iterating through both the loops we should check for success and if s>=k right? if there is a case such that the s becomes less than k at the last box then it fails.
after iterating through both the loops we should check for success and if s>=k right? if there is a case such that the s becomes less than k at the last box then it fails.