4 ms·
Have you tried this? :) https://codefights.com/bots/botasana https://codefights.com/bots/botasana
by Tiks 11y ago
Have you tried this? :) https://codefights.com/bots/botasana https://codefights.com/bots/botasana
- fapjacks 11y agoI like how they slip in "Oh, all you have to do is parse HTML with regex" on the last problem.
- so0k 11y agofor the HTML parsing - I was able to pass all the test cases using a stack (push the tags when they open and pop them as they close). I was doing zero validation as the challenge was to take valid html. (I didn't verify that the proper tag was being closed, I knew I'd get out of bound errors due to this, but it should work for valid html) I was using a string builder to eat the input as I had parsed it... but I got an error on submitting my result - it gave "unexpected termination" even when I had replicated the "unexpected termination" error with a custom test case and caught the error - I still got an unexpected termination error when submitting - sigh - maybe it's related to using C# for the challenge... overall not so hard though...
- dvt 11y agoGod, I really hope they grasp the stupidity of using regular expressions to parse an irregular language. Implementing a very simple HTML parser takes at least a half-dozen man hours; seeing that question honestly makes Asana seem like amateur hour, and I've had to do some pretty stupid shit in my time. Snapchat, for example, had me solve Sudoku (???).
- clentaminator 11y agoI'm assuming it's a reference to http://stackoverflow.com/a/1732454 http://stackoverflow.com/a/1732454
- deleted 11y ago[deleted]