Priority Adjustment

  • 0

    Given an list of letters with priority(1,2,3..), write a function that makes an adjustment to the priority when one or more items in the list has changed.

    Given: A=1,B=2,C=3,D=4,E=5

    Overwrite the priority of B to 5, C to 1, D to2, and make an adjustment to priority of other letters if needed.

    New Priority list will be: A=3, B=5, C=1, D=2, E=4

Log in to reply

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.