GoogleFrontend Engineer · Phone ScreenCodemia practiceFormat Google Drive Storage Byte Counts as Human-Readable Sizes
Given a non-negative byte count, return a string like "999 B", "1.5 KB", or "2 GB" using decimal units (powers of 1000), one decimal place at most, trailing ".0" removed, and correct promotion when rounding reaches 1000 of a unit.