Re: Optimizing basic operations

new topic     » goto parent     » topic index » view thread      » older message » newer message
jaygade said...

Let me see if I understand your problem so far:

  1. Receive a data structure containing an evaluation and two lists of 25 integers. The evaluation is the result of some calculation.
  2. Add the data to a list, keeping the list sorted by the value of evaluation as the data are received sequentially.
  3. The list can grow to a very large size.

It would be better to say that the list could grow to a very large size. The minimum size is the top 100 + 1. The maximum would be the top 100 + n, where n is limited by memory. After sorting 100 + 1 or 100 + n, then create the new top 100.

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu