java - Data Structure to store given data, search and remove operation should be efficient -


i working on project in java.

in project, first url web using jsoup.

now performance reason, have store

[ tag name, tag id, tag class name ] 

in container, , known tag id either null or unique.

example,

["a", "fullsitelink", ""] ["div", "", "mob-footer"] ["div", "", "clear"] ["br", "", ""] ["ul", "", "mob-footer-links"] 

so please tell me data structure stores these information every tag, , can search, remove tag in efficient way.

help me. in advance.

so please tell me data structure stores these information every tag, , can search, remove tag in efficient way.

i use hashmap. 1 of efficient data structures quick insertion, lookup, , removal.

if isn't suited intend search style, a binary tree flexible data structure o(log n) search, insertion, , removal.


Comments

Popular posts from this blog

Delphi XE2 Indy10 udp client-server interchange using SendBuffer-ReceiveBuffer -

Qt ActiveX WMI QAxBase::dynamicCallHelper: ItemIndex(int): No such property in -

Enable autocomplete or intellisense in Atom editor for PHP -