Message from C, C++ discussions

November 2019

— O(n) and O(1) resp


Linear time means O(n), means if you have 100000 elements versus 10000 elements, it can be 10 times slower, but no more than that
constant space means O(1), means the space should be the same for 1, 10 or 100000 elements

— Moore's voting algorithm

— Ohh ok

— Can send me the code for that

— Google it

— Why code? Part of those challenges is to make it on your own.

— I have completed already in my way boy

— Also his answer isnt complete, as the initial answer wants it for ANY occurence, not just a single item.

Message permanent page

— "boy" lol. A bit more respect may be in order.

— It's actually correctly giving the output ...But timecomplexity is high.O(n^2)

— That... i dont think that comes even close.