Parallel For
seany
seany at uni-bonn.de
Tue Jun 15 07:48:21 UTC 2021
On Tuesday, 15 June 2021 at 07:41:06 UTC, jfondren wrote:
> On Tuesday, 15 June 2021 at 06:39:24 UTC, seany wrote:
>> [...]
>
> add a `writeln(c.length);` in your inner loop and consider
> the output. If you were always pushing to the end of c, then
> only unique numbers should be output. But I see e.g. six
> occurrences of 0, four of 8 ...
>
> [...]
My attempt is to make such huge O(N^4) or O(N^5) algorithms
faster.
Wouldn't all these calculation of unique `i` make the program
slow? I would like to know how to do this properly.
More information about the Digitalmars-d-learn
mailing list