🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.sys.next.programmer
1 messages
1 total messages Started by Ken Smith Sat, 09 Jan 1993 22:27
Novice HashTable Question
#2264
Author: Ken Smith
Date: Sat, 09 Jan 1993 22:27
23 lines
1435 bytes
I want to use the HashTable class to implement a symbol table for a
simple expression evaluator that I'm writing, however there seems to
be one crucial feature missing from HashTable (or more likely I just
can't figure it out).

My question:  Given a "value", how does one determine its associated
              "key" in a HashTable?

When using hash tables that I've written in the past, I've found it
useful (actually essential) to be able to quickly lookup a table entry
given *either* its key or its value.

In other words, how come there isn't a "keyForValue" method in addition
to the existing "valueForKey" method?

Thanks in advance,
Ken Smith
--
_______________________________________________________________________
                                                       kenny@netcom.com
-- 
_______________________________________________________________________
                                                       kenny@netcom.com
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads