How do I increase the algorithm performance for longer array of numbers?

后端 未结 2 424
傲寒
傲寒 2021-01-29 07:05

Thanks for looking.

Count how many numbers are less than 4 in an ordered array of numbers.

How do I increase the algorithm performance for longer array

2条回答
  •  广开言路
    2021-01-29 07:24

    A good approach for a problem like this is to split your array in smaller parts and with the help of a ThreadPool (see https://msdn.microsoft.com/en-us/library/3dasc8as(v=vs.80).aspx) increase the calculation speed.

提交回复
热议问题