Ad
  • Custom User Avatar

    thank you very much. I missed the word "decreasing"

  • Custom User Avatar

    g964, could you answer the question please?

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    No, I had not resolve this issue.

  • Custom User Avatar

    Hi!
    Can you help me please?
    I don't understand an example.
    "#Example: names: COLIN,AMANDBA,AMANDAB,CAROL,PauL,JOSEPH weights: [1, 4, 4, 5, 2, 1] n: 4
    The function should return: PauL"
    But:
    C O L I N
    (3+15+12+9+14 + 5) * 1 = 58
    A M A N D B A
    (1+13+1+14+4+2+1 + 7) * 4 = 172
    A M A N D A B
    (1+13+1+14+4+1+2 + 7) * 4 = 172
    C A R O L
    (3+1+18+15+12 + 5) * 5 = 270
    P A U L
    (16+1+21+12 + 4) * 2 = 108
    J O S E P H
    (10+15+19+5+16+8 + 6) * 1 = 79

    So, sorted names:
    Colin, Joseph, Paul, Amandab, Amandba, Carol.
    n = 4.
    So, answer is Amandab!!!!
    Why you wrote that answer is Paul??

  • Custom User Avatar

    Oh Thanks
    I not notice it

  • Custom User Avatar

    hello!
    why?
    smaller [1,2,3] shouldBe [0,0,0]
    why not
    smaller [1,2,3] shouldBe [0,1,2]
    ??
    I didn't get it