Re: Data Retrieval/Insertion Data Structure

From: John Harrison (john_andronicus_at_hotmail.com)
Date: 07/02/04


Date: Fri, 2 Jul 2004 09:15:52 +0100


"narasimha" <nmurar02@mailcity.com> wrote in message
news:477db146.0407010854.5273186a@posting.google.com...
> Hello,
>
> I have a data record with two fields...<value, date>. I have more
> than a million of these records. As I add more records into this set,
> I want a data structure that would be efficient enough to find
> duplicate records with the same value, and earliest possible date. It
> should be efficient to insert the records into the data structure. Is
> there any database structure that I can get help with ??
>

The obvious structure would be std::map. But I think you are going to have
trouble fitting 1000000+ records into any data structure.

john



Relevant Pages

  • Re: growing array in Matlab? (new code)
    ... > Dear Loren and John, ... > This is a feature of Matlab that is new to me and is very neat! ... > function) may provide a workaround better than global variables to ... people could just look at the global data structure and see what is ...
    (comp.soft-sys.matlab)
  • Re: Need suggestion on data structure
    ... "John" wrote: ... Could anyone suggest me a data structure for it. ... What is the map going to be used for ... David F ...
    (comp.lang.cpp)
  • Re: circular reference where sumif and vlookup overlap
    ... "mining north" wrote: ... "John C" wrote: ... The cells that are creating the problems, initially, are the following cells: ... more closely at your data structure. ...
    (microsoft.public.excel.worksheet.functions)
  • Re: If vector contains only different elements
    ... >> However if you want a more efficient method, ... >> data structure such as multiset, or sort your vector first and compare ... You get a quicker result when you do find a duplicate. ...
    (comp.lang.cpp)
  • Re: Hash table in C++? STL?
    ... > Hi John, ... > Can you point me to the documentation where I can find the map and ... > hash_map data structure? ...
    (comp.lang.cpp)