• + 1 comment

    nice logic. However can you reduce the time complexity a little?