Code Room
Code reviewHardcr-g298
Subject Quadratic loopsLevel Mid–Senior~20 minCommon in Code quality & review interviewsIndustries Software development

Question

Review this Java method that attaches each order's customer name by matching against a list of customers.

What a strong answer looks like

Separate real bugs from style. Rank issues by severity, point at the root cause rather than the symptom, and suggest a concrete fix — specific and kind.

Talk through your review
Code to reviewjava
List<View> join(List<Order> orders, List<Customer> customers) {    List<View> views = new ArrayList<>();    for (Order o : orders) {        for (Customer c : customers) {            if (c.id() == o.customerId()) {                views.add(new View(o, c.name()));                break;            }        }    }    return views;}
Run or narrate your approach, then ask the coach.