Distribute Bonuses | Data Structures & Algorithms

Поділитися
Вставка
  • Опубліковано 27 жов 2020
  • Join Jomaclass for full-length videos like this: joma.tech/dsa

КОМЕНТАРІ • 5

  • @peytonboles6101
    @peytonboles6101 3 роки тому +5

    Are we assuming that the person on the far left is not compared to the person on the far right?

  • @0AsherRoth0
    @0AsherRoth0 3 роки тому +1

    hi Joma, could we might avoid to go throught the entire array twice in this way?
    def getBonuses(performance):
    bonus = len(performance) * [1]
    for i in range(len(performance)-1):
    if performance[i] > performance[i+1]:
    bonus[i] += 1
    elif performance[i] < performance[i+1]:
    bonus[i+1] += 1
    return bonus

  • @crazyprogrammer1261
    @crazyprogrammer1261 3 роки тому +2

    Joma can u make a video on how to get started as a competitive programmer

  • @thecscontent5110
    @thecscontent5110 3 роки тому

    I also do videos about programming!😁🎬💻