Quick Overview

Scale ingredient strings by multiplying each leading integer quantity by a serving count while preserving unit, multiword name, and input order. Split only enough fields to isolate the quantity and unit, return a new list, and handle zero servings exactly.

Scale Ingredient Quantities

Company: Upstart

Role: Software Engineer

Category: Coding & Algorithms

Difficulty: easy

Interview Round: Online Assessment

Overview: Scale ingredient strings by multiplying each leading integer quantity by a serving count while preserving unit, multiword name, and input order. Split only enough fields to isolate the quantity and unit, return a new list, and handle zero servings exactly.

Read the full Upstart Software Engineer interview experience this question came from

Loading…