Ad
  • Default User Avatar

    Yeah I am use to using buffer for strings coming from Java so searched docs for it from the get go, and after seeing the solutions look at the cheap oneliner in code to see what it was doing if anything and nope, just uses the string builder instead of bytes but affectivly the same iterative loop on a count. The only heads up thing was that it preemptively grew the size ahead of time so that if you were looping a large number of times it would not have to resize. https://github.com/golang/go/blob/master/src/strings/strings.go#L533-L536

  • Custom User Avatar

    I am a little crestfallen to see that after all that work on crafting my problem and learning how the testing works that someone on the same day copied my idea and rushed out their own version of the problem. [sigh]

  • Custom User Avatar

    "enumerate all pizza sizes and how they relate to each other"

    I get that, but I was thinking that the "name" of the pizza isn't really relavant to the size of the pizza as that's defined by the diameter of the pizza. Even if the best deal is called "Alabaster eclipse", then that doesn't really matter because the size is defined in the object, not by the name. I'll make that clearer in the explanation and provide a test example with unusual names.

    "mention that the pizza objects will not be in a guaranteed order"

    That is a good point. Done.

    "change the order of pizza objects within a basic test"

    Good point. Done.

  • Custom User Avatar

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

  • Custom User Avatar

    I'm stuck on the same problem. The test expectation wants to give a change total of 30, but your result is giving back 40 in change.
    Your issue might be that the state of the coins object goes wrong at some point, but that really depends on how it's implemented...

    A coin is considered invalid if the denomination (the key in the object) is not also a key in the coins object when you first instantiate the object.

  • Custom User Avatar

    Try to avoid the error