We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
I also didn't use Regex. To parse tag names, attributes and values I used find and string construction with iterators. I stored result in simple C++ map.
For example:
map["tag1.tag2~name"] = "Name1"
Then I do simple query. No need for tree.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Attribute Parser
You are viewing a single comment's thread. Return to all comments →
I also didn't use Regex. To parse tag names, attributes and values I used find and string construction with iterators. I stored result in simple C++ map. For example: map["tag1.tag2~name"] = "Name1" Then I do simple query. No need for tree.