RE: How to (not) clean JSON file in C#

Search for a command to run...

No comments yet. Be the first to comment.
HackerRank solution on using modulus for big numbers

An implementation of Ultimate Tic Tac Toe using Monte Carlo Tree Search

Disclaimer First and foremost, I want to clarify that I love solving short programming assessments. It's fun and I can improve and refresh my knowledge about data structures and algorithms. I compare it to playing chess. It's entertaining to focus on...

perspective of a software developer

It is not a surprise that I received again at the first interview stage, just for another company, the same puzzle with JSON cleaning. This time I had a clue about how to start and I could provide a solution to it in a reasonable time. I recommend reading first this article.


Take it as a starting point and not as a recommended approach. It is far from a perfect solution, but it works at least for the examples provided. Creating a text parser can be a very complex task and requires a lot of test cases to cover and test. This is the main reason why I didn't like the puzzle: the statement was quite generic and did not have enough test cases so I had to make a lot of assumptions. Garbage in, garbage out, haha.
I hope can help some folks.
If you had to solve the same puzzle for an interview, please let me know about your approach and opinions on it. Cheers!