InterviewBit Problems   AMORTIZED1 : Solved