That's a huge leap from O(n²) to O(n), in this example it would likely good to at least specify that it should be strictly less than best known solution (not sure if there are such cases on leet code, I thought they only restrict you to what is known to be solvable)
To be fair, if there's two people in the team and one of them is a junior, I would've expected nothing to be done at all, especially if it's as long as three weeks
I think, I would've left the junior some language or design research, and some questions to ponder about in the meantime, if I were in this situation
In most crafts, and I consider software development one, there's rarely no way to improve. The problem arises if the client or the employer wants you to improve too quick, faster than you could, and sometimes faster than even possible.
But to be fair, sometimes developer doesn't want to improve either
I'm not sure, this is a valid estimate. If they were to replace is-number with its contents, that would mean that the economy is only in HTTP-related overhead.
It maybe will make difference because of building phase, lock-files, package-files, but I am not sure that data-traffic difference is that big
So, every time I use a library to recognize patterns on a picture, to interact with Kafka, do some SSL, or do database mapping, I should hate myself, noted
We did Elastic API integration in Java by creating and maintaining huge half-codegenerated transformer from code to Elasticsearch's JSONs, it was a pain and it was source of more than one error
Dependences should be reviewed and audited to make sure they do what you need and they are worth using. Just making everything in-house gets you nowhere most of the time
I'm not sure it's hateful mocking, really. Also, any JS-related framework could do in place of Angular maybe (but as one not familiar with Angular I can't say if its design is not so atrocious that everyone hates it for this)
Yeah, in fact, I somehow calculated in assumption of
n
being the amount of elements in matrix, notn²
(assuming square matrix)But I am impressed to know that there are serial algorithms that approach
O(n²)
, thank you for sharing that info