We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
True, I was referring to this when I said that my algorithm definitely requires that all the counts are 0 at the beginning of the cycle (because we'll have reads before any writes). So it's not about computer architecture or compilers at all, it's about the algorithm itself - I'll still have to manually nullify the memory in not-nullifying-by-default language. Luckily in C# newarr opcode really translates to appropriate machine code.
When I was referring to literature, I was saying that most common books/articles used for interview preparation will just skip array initializations when calculating time complexity, which I believe now is pretty superficial. I'd like to see a book that is not like that.
As for hashtables, now I see I didn't pay attention you were talking about worst time. Thanks.
Divisible Sum Pairs
You are viewing a single comment's thread. Return to all comments →
you cannot guarantee that all the elements are 0
True, I was referring to this when I said that my algorithm definitely requires that all the counts are 0 at the beginning of the cycle (because we'll have reads before any writes). So it's not about computer architecture or compilers at all, it's about the algorithm itself - I'll still have to manually nullify the memory in not-nullifying-by-default language. Luckily in C# newarr opcode really translates to appropriate machine code.
When I was referring to literature, I was saying that most common books/articles used for interview preparation will just skip array initializations when calculating time complexity, which I believe now is pretty superficial. I'd like to see a book that is not like that.
As for hashtables, now I see I didn't pay attention you were talking about worst time. Thanks.