Ad
  • Custom User Avatar

    dam it.. I was thinking I'm one test away from to compleating this kata..

  • Custom User Avatar

    I'd say no, because if you need the optimizations here, that means you're not using the best approach (otherwise you made "performances-wise mistakes" in the way you coded it, I guess). Moreover, the number of random tests would be adjusted to match the original translation, if it were to be a C translation, I guess.

    cheers

    edit: wow... I just saw your solution: sounds like you did it the hard way. ;) Congrats, because it's a nightmare to complete it that way! (I know it: I did the same... XD )

  • Custom User Avatar

    ok, then I have my idea about the cause: I bet you're using a dict on which you're iterating somewhere, and that the order of the iteration is important to your algo: for 3.6+, the dict are retaining the insertion order of the keys, when iterating over them or their properties (values/items...). That's officially documented for 3.7+ only but the feature is already present in 3.6. In older version, the order is not guaranteed during iterations.

    right?

  • Custom User Avatar

    sound so, yes... :/ Unfortunately, not knowing your code and, more over, not knowing the differences between 3.7.3 and lower 3.x, I have no clue about the cause. Did you try in 3.6 already?

  • Default User Avatar

    He solved the hackcodewars kata

  • Default User Avatar

    For cheating.

  • Custom User Avatar
  • Custom User Avatar

    Hi,

    Thx.

    The idea behind this was actually for tie breaking the positions that are at equal manhattan distance during the search. But the present implementation isn't doing it correctly. Did you take a look at the last fork I did of this solution? It's the correct implementation and I explained succinctly the changes I did and why.

    I guess your fork does approximately the same. I'll try to investigate further with that later (if I don't forget about it... x/ )

  • Custom User Avatar

    Happy coding 🖖

  • Default User Avatar

    Does anyone know what the approximate amounts are by kata compared to your overall level? Seems to be 10% if it's one above your kyu level, 5% if it's the same, and 2.5% for one lower approximately. But I'm fairly curious about the more precise numbers, as well as the amounts for going more than one lower. It could very well follow that same pattern and keep reducing by half, but an official source would be great!

  • Custom User Avatar

    no because solving any kata always gives you some amount of progress. It's just that reaching the next level only using katas ranked lower than your current level can take ages (you could become 1kyu solving only yellow katas, that would just require thausends of them)

  • Default User Avatar

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