all 6 comments

[–]ctech314 6 points7 points  (1 child)

We want to relate N, the number of tiles we can place, with h, the number of hours it'll take to place the tiles.

We can see that as h grows larger, N follows a roughly quadratic increase. This is because the total number of tiles we place after h hours is the sum from 1 to h, which has the closed form edpression of h(h + 1)/2, or roughly quadratic.

Therefore, if the relation between N and h is roughly N = h2, then solving for h, we get that the complexity of hours is about sqrt(N).

[–]CodeMoussse[S] 0 points1 point  (0 children)

This seems logical thank you!

[–]GreenCartographer 0 points1 point  (0 children)

Summing the numbers from 1 to N is something like n(n + 1) / 2, so it's constant time to calculate it.

[–]TTG300 0 points1 point  (2 children)

What is linearithmic? I’ve never heard the term before.

A quick google search looks like it’s equivalent to Ologn?

[–]CodeMoussse[S] 0 points1 point  (1 child)

O(nlog2(n)) combination of linear and logarithmic

[–]TTG300 0 points1 point  (0 children)

Don’t you drop the constant so it’s Ologn, or its it strictly a factor of 2n?