HubSpot·Software Engineer·Onsite - Coding / Algorithms
- Given a JSON endpoint that returns a numeric value or a simple arithmetic operation (add, subtract, multiply, divide) on two numbers, write a program that fetches the data and computes the result. No nesting involved.
- Extend the solution to handle nested arithmetic operations in the JSON, for example 1 plus the result of 1 plus 2 represented as nested JSON objects.
- Deserialize the raw JSON string directly into a Java object with appropriate getters and setters, rather than manually extracting fields.
- Further extend the calculator to support variable references (like x, y, z) that can be stored and looked up during evaluation.
“I knew Jackson going in but had only just picked it up, so there was definitely some nerves around whether I actually knew it well enough.”