• ###### mungadungacommented on "Round by 0.5 steps" kata

to be honest, this should've been 8kyu

• ###### ejini战神commented on "Toothpick Sequence" kata

nope ~~ I refer to the official one ~~

• ###### iwtgacommented on "Toothpick Sequence" kata

Lol, did you write a script?

• ###### ejini战神created a suggestion for "Toothpick Sequence" kata

Python new test framework should be used with 3.8 enabled

• ###### ilya_plotnikovcommented on "Recaman Sequence" kata

7 kyu that's timing out isn't really 7 kyu is it?

• ###### user8436785commented on "Toothpick Sequence" kata

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

• ###### WestwardLand968commented on "Round by 0.5 steps" kata

Ranks cannot be changed, but I totally agree, it's a bit too easy for a 6 kyu. A small bit of math would do the trick well.

• ###### FArekkusucommented on "All Inclusive?" python solution

do you mean something different from the worst case or what?

Yeah, I messed it up. I calculated the repeated string concatenation as `T(n) = n^2` as in the worst case, but comparisons as `T(n) = 1` as in "more realistic" scenario (i.e. you're unlikely to deal with GigaByte-sized strings, and the constant factor is so low, the `O(n)` comparsion can be negligible). This particular solution is indeed `O(n^3)`

What is `n`?

In the worst scenario all the inputs' sizes are inifinitely big, so both the string and the list will be `n`, no?

• ###### Unnamedcommented on "All Inclusive?" python solution

while it could be O(len(s)) by using a set

With hashing a newly created string - yes.

So the final algorithm is O(len(s) ** 2 * len(l))

Looks correct to me for the worst case.

O(len(l)) for creating the set

Only if the hashes are already calculated and cached; otherwise `len(l[i])` has to be somewhere as well.

This solution is `O(n^2)`

What is `n`? And do you mean something different from the worst case or what? Arbitrary strings can't be compared in O(1).

• ###### FArekkusucommented on "All Inclusive?" python solution

So the final algorithm is O(len(s) ** 2 * len(l)) instead of the O(max(len(l), len(s) ** 2))

That's not how `O` works, and your reasoning is wrong too. This solution is `O(n^2)`, and there's no asymptotically better algorithm for this task.

• ###### Haksellcommented on "All Inclusive?" python solution

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

• ###### shoark7commented on "Right Truncatable Harshad numbers" python solution

I'm enlightened. Thank you very much.

• ###### alexaskcommented on "Primefinder" kumite

didn't know they had python back then!

• ###### dasocacreated a suggestion for "Round by 0.5 steps" kata

This is too easy for 6 kyu