Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
An Array v's A Dictionary
#5
Hi Terry, was actually on the internet searching multiple examples of arrays and Dictionary was commented as being in C++

You know b+, when I first read the word Dictionary and did a little read up on it, it seemed to be just a 2 dimensional array exactly like you have laid out in your code. It would appear, as DSMAN has described its' inner workings, has a superior "constant-time lookup, insert and delete. I'm imagining this would suggest a 2 dimensional array would have a serial lookup (ie if I want to find an entry it would go through the stored data one item at a time until it finds the search item) whereas the same Dictionary is more like a random access (ie it goes directly to the search item)

I like the order I get with a 2 dim array to build a data base but seems the Dictionary approach would be great to maintain a data base. I haven't worked with linked lists or hash tables (old dog new trickisim) but I have seen examples of them on this forum (or maybe the old forum).

Thanks for the info guys
Reply


Messages In This Thread
An Array v's A Dictionary - by Dimster - 10-07-2024, 07:18 PM
RE: An Array v's A Dictionary - by bplus - 10-07-2024, 08:03 PM
RE: An Array v's A Dictionary - by TerryRitchie - 10-07-2024, 08:23 PM
RE: An Array v's A Dictionary - by DSMan195276 - 10-08-2024, 02:27 AM
RE: An Array v's A Dictionary - by Dimster - 10-08-2024, 10:26 AM
RE: An Array v's A Dictionary - by DSMan195276 - 10-08-2024, 12:52 PM
RE: An Array v's A Dictionary - by Dimster - 10-08-2024, 02:22 PM
RE: An Array v's A Dictionary - by Dimster - 10-08-2024, 02:46 PM
RE: An Array v's A Dictionary - by Kernelpanic - 10-08-2024, 04:31 PM
RE: An Array v's A Dictionary - by bplus - 10-08-2024, 05:10 PM
RE: An Array v's A Dictionary - by TempodiBasic - 10-08-2024, 06:59 PM



Users browsing this thread: 1 Guest(s)