All Articles

The Trade-offs Every Engineer Should Know Before Their Next Whiteboard Interview

System Design on AWS: The Trade-offs Every Engineer Should Know Before Their Next Whiteboard Interview

Build a RESTful Web Service with Spring Boot, Gradle, and OpenAPI

By the end of this guide you’ll have a working Spring Boot RESTful API, built with Gradle and documented with OpenAPI, and a live Swagger UI page you can show...

Items in Containers: Count Items in Closed Compartments (Code Interview Problem)

This one shows up in online coding assessments under the name Items in Containers, and it’s a trap: the obvious solution passes the examples and then times out on the...

From O(n²) to O(n): Replace Nested Loops with a HashMap in Java

One endpoint in a B2B order system I worked on returned 1,000 orders, and it was slow. The database wasn’t the problem. Two innocent-looking nested loops were. Here’s how one...

Generate a Spring Boot Server from an OpenAPI Spec with Swagger Codegen

You’ve designed your API. Now comes the boring part: writing controllers, models and request mappings that only repeat what the spec already says. Swagger Codegen writes that code for you....

Shopping Options: Count the Ways to Buy Within a Budget (Code Interview Problem)

Four nested loops solve this problem in five minutes, and that’s exactly the trap. With up to 1,000 prices per category, brute force has to check 10¹² combinations. Here’s how...