Algorithms, solution methods, comparison of their performance - page 18

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Why is a perfect solution to a particular problem perceived as mockery? Seriously, I don't understand...
What was your task? Remind it for yourself here publicly please.
You have written some nonsense. Essentially a variant of accessing an array by its index. In reality transaction numbers are random, and your whole example will collapse when you need to solve the real problem.
Wait till you get it right, I'm sure tomorrow.
***
If I were to make sure that data doesn't disappear from an array when its size is changed, ***
Here is a check for dynamic arrays: one-dimensionalarr_dynamic and two-dimensionalarr_dynamic_multi.
As you can see, when the array is increased in size, the previous values remain:
You have written some nonsense. Essentially a variant of accessing an array by its index. In reality transaction numbers are random, and your whole example will collapse when you need to solve a real problem.
You're referring to tickets, I guess. I mean sequential transaction numbers.
You can make a parallel array next to each other to record the tickets.
Or several parallel arrays to record the rest of the data of each order.
Here is a check for dynamic arrays: one-dimensionalarr_dynamic and two-dimensionalarr_dynamic_multi.
As you can see , when the array's size is increased, the previous values remain:
hide it here purely OOP and everything useful
Here is a check for dynamic arrays: one-dimensionalarr_dynamic and two-dimensionalarr_dynamic_multi.
As you can see , if you increase the size of the array, the previous values remain:
I would like to discuss Print and Comment - why no one is paying attention
There is a magic property: Capacity, which by the way is absent in CHashMap for some reason (which is a gross oversight of developers). By specifying it, we bypass re-partitioning. You can specify it in this task, so I don't see any problems.
You can specifyCapacity in CHashMap via constructor.
Why do they have different scaling factors, by the way, is also very strange. It's difficult to rearrange CHashMap than simpler CArrayList.
CHashMap uses CPrimeGenerator for choosing prime numbers.
But unfortunately, the CPrimeGenerator implementation does not meet expectations and contains only the values below:
The average growth factor is on the order of 1.2
What was your task? Remind it for yourself here publicly please.
To find the fastest and most efficient solution for adding megs to an array (list, dictionary...), and retrieving megs from an array by transaction number, when the number of future transactions is unknown.
Find the fastest and most efficient solution for adding megs to an array (list, dictionary...), and retrieving megs from the array, with an unknown number of future transactions.
understandably, there was no question of a ticket
Still, I advise you to start complicating your code with all sorts of stuff like boilerplate functions