Beta

Coping with NP-Hardness #2: Max Weight Independent Set of a Tree

Description
Loading description...
Algorithms
  • Please sign in or sign up to leave a comment.
  • Voile Avatar

    This comment has been hidden.

    • ALowVerus Avatar

      Now deepcopying inputs prior to administrating tests, so mutation doesn't affect validation. Ty for callout.

      Issue marked resolved by ALowVerus 16 months ago
  • user9644768 Avatar

    Hey,

    It is not clear from the description and sample tests that the boss->employee dictionary might not contain all company members, but the dictionary doesn't include all the members in the full test suite. You might want to fix that or mention the same in the description.
    (A quick way to check replace all s.get(j, []) by s[j] in my solution)

    Other than that, this problem when done on trees has a linear time algorithm, so this doesn't fit in the NP-Hard series.

    (I raised this as a suggestion couple of months ago, now I think that this is a small issue :D (quite easy to fix though))

  • Danelaw Avatar

    Hi, I had a solution and it got "You have passed all of the tests! :) ". Although, when I pushed 'attempt' it said

    '''...Exception("The baseline algorithm found a result with {} total fun, LESS than your proposed {} fun. This should NEVER happen. Please contact the test administrator, something is wrong with the tests.".format(base_fun, proposed_fun)) Exception: The baseline algorithm found a result with [3, 4, 4, 5, 0, 3] total fun, LESS than your proposed [5, 3, 4, 5] fun. This should NEVER happen. Please contact the test administrator, something is wrong with the tests.'''

    Shell I send my code to you somehow or public here? Sorry, I am completely new...

    Thx

  • ChristianECooper Avatar

    Hi, I'm seeing random tests failing but not actually indicating what the expected answer is, I'm just seeing 'Value is not what was expected'.