Birthday Cake Candles

  • + 2 comments

    Hi,

    Your solution is good but it will take O(nlogn) time due to sorting which can be optimized to O(n)

    Here is the video explanation of my solution in O(n) time -

    https://youtu.be/1gxFE9EfanE

    Any comments and feedback will be appreciated.