Clearing an array of defined element(s) - page 28

 
Nikolai Semko:
What exactly is the problem?

Shit, is the problem solved correctly, or are there nuances. It's not just time that rules the ball.

 
Алексей Тарабанов:

I don't know how to answer you in Chinese.

You'd better take care of your grandchildren...
 
Алексей Тарабанов:

Shit, is the problem solved correctly, or are there nuances. It's not just time that rules the ball.

Of course there are a lot of nuances. There is no point in solving this problem thoroughly and thoroughly, as it is a purely academic problem and no practical application is visible yet.
 
Nikolai Semko:
You'd better take care of your grandchildren...

Thank you for your answer, not you.

 
Алексей Тарабанов:

Thank you for your answer, not you.

Mind you, I didn't start it. I'm just being defensive.)
You should be careful with the boomerang.
 
Nikolai Semko:
Of course, there are a lot of nuances. There is no point in solving this problem thoroughly and thoroughly, because it is a purely academic problem and there is no practical application yet.

This is a "no-brainer" task. It is the kind of task that makes sense to tackle thoroughly and thoroughly.

 
Алексей Тарабанов:

This is a "no-brainer" task It is the kind of task that makes sense to tackle thoroughly and thoroughly.

So what's the point? Offer your own thorough and thorough solution. I haven't matured to that level yet. I've scribbled all I can.
 

changed the calculation of the amount to CRC32 )

Циклический избыточный код — Википедия
  • ru.wikipedia.org
Понятие циклические коды достаточно широкое[3]. В англоязычной литературе CRC понимается двояко в зависимости от контекста: Cyclic Redundancy Code или Cyclic Redundancy Check[4]. Под первым понятием подразумевают математический феномен циклических кодов, под вторым — конкретное применение этого феномена как хэш-функции. Первые попытки создания...
Files:
 

Forum on trading, automated trading systems and trading strategy testing

Clearing an array of given element(s)

nicholi shen, 2018.11.17 03:58

Sergey Dzyublik:

I would usea HashSetdata structure for value values.
The complexity would be: O(n) + O(m)

For the proposed binary search, the complexity would be: O(n log(m))

1. What library do you use for hash sets?
2.The ones I have seen for MQL are slower than binary search ...


1. I haven't used any library for HashSet.
It's just a theoretical approach to solving the problem.

2.MQL had many questions concerning the implementation. But their task is universality, not maximum speed for primitive types.


Depending on the input parameters of the problem, the values of constants for complexity of algorithms will change.
As a consequence, a slower algorithm in terms of complexity under certain input conditions can produce faster speeds than a faster algorithm in terms of complexity.

 
Nikolai Semko:

The problem with an array of deleted values proved to be more interesting. There is still a lot of room for creativity here.
I have come up with the following option.

Basically, you use a static HashSet data structure with an initial array of data to solve collisions.
But the implementation is just a blink of an eye...

Instead of calling function ("FindValueInSortArray") with 100-500 unnecessary parameters, usually a class is used where these parameters act as fields of the class (gain on passing of parameters, if compiler hasn't thought to make implicit inline).
If there is a need to use a pair of arrays of the same size and with one purpose of use ( int p1[]; int p2[];), usually a structure array is used (index access advantage, less chance of cache miss).