list - Which data structure can store OIDs -
i store snmp oids in data structure allows me search in it. binary tree or linked list not correct?
the data structure must support 1 parent node many child nodes.
snmp oids organized in hierarchical n-ary tree structure. therefore, using linked list not let search specific oid fast (you have loop beginning of list matched oid, 1 one). binary structure work, mapping n-ary tree binary tree need lines of code.
i suggest use data structure library, instead of doing job yourself. depending on language programming in, may find different implementations of same key/value store , search api. instance, java, find many implementations of same map interface: based on hash tables, based on trees, based on linked-lists, etc. performance needs, , because of oid tree structure, should avoid linked-lists. others have pros , cons.
Comments
Post a Comment