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.
A very poorly worded problem indeed. Not only does it give the impression that the first node is going to be the root (which it isn't, according to one of the tests) but it also doesn't specify that it is possible to essentially give an incorrect entry.
For example: node1.node2~name is what we may think are always one of the entries. But node1.node2 can also be an entry. This devolves into error checking. Then it is a "what-if" question and that is certainly not a medium question.
I have no problem programming a XML-like parser as an exercise, but then frame the question properly.
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 →
A very poorly worded problem indeed. Not only does it give the impression that the first node is going to be the root (which it isn't, according to one of the tests) but it also doesn't specify that it is possible to essentially give an incorrect entry.
For example: node1.node2~name is what we may think are always one of the entries. But node1.node2 can also be an entry. This devolves into error checking. Then it is a "what-if" question and that is certainly not a medium question.
I have no problem programming a XML-like parser as an exercise, but then frame the question properly.