• Custom User Avatar

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

  • Custom User Avatar

    Thank you.

  • Custom User Avatar

    Sort the list first and look at it. You should see a way.

  • Custom User Avatar

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

  • Custom User Avatar

    Sort the list first and look at it. You should see a way. It's very simple.

  • Custom User Avatar

    Coming up with a solution that works on the provided test cases - yes, that seems like a 6 kyu problem. Pretty straightforward.

    But coming up with a solution that does not time out when running whatever tests happen when you submit - that seems much harder than a 6 kyu problem to me. The obvious solutions to the problem are all probably O(2^n) or maybe O(n!) and so they scale horribly, and apparently there are much bigger input arrays being passed to the tests that run when you submit than the ones you are provided with.

    I have the feeling there must be some trick I'm missing here, but even if that's true, this seems like it should not be a 6 kyu kata.

  • Custom User Avatar

    Tips for increasing speed? Right now I am finding all combinations of the initial array and then summing all the items of each combination. I expect finding all the combinations takes too much time but I don't know how I'd do it otherwise without missing anything.

  • Custom User Avatar

    Thanks

  • Custom User Avatar

    Yes, you are missing the "Available since" note in Python docs on comb.

  • Custom User Avatar

    (Python) AttributeError: module 'math' has no attribute 'comb'
    Is there something I'm missing?

  • Custom User Avatar

    A bit unrelated - could the author tell me what he used to make the visualization tool? I've been looking to get into basic visualizations.
    Thanks.

  • Custom User Avatar

    Well maybe do some 8kyus and 7kyu regex. Then, use some sources(Stack Overflow or Geeks for Geeks are both fine). Also, look at different peoples solutions.

  • Custom User Avatar

    Ok I'm very new and I don't under understand regex. I thought I just had to create a function to validate a password based on the requirements. I tried reading the python re page but I didn't quite get it. Could you briefly explain it to me?

  • Custom User Avatar

    You write a regex pattern, like regex = "". Then, using re the author tests if your regex pattern validates the pattern or not. By the way, you don't define a function.

  • Custom User Avatar

    The top of my code says
    regex = ""
    and then I define my function as
    def password(regex)
    How do I get the input the author is meaning to give? The test cases all work in my IDE but I output the same answer (false) for the test cases here.

  • Loading more items...