โ† TCS questions
CodingReported in a candidate post, May 2024

Find multiple of y closest to x

Filed under TCS

Given two integers x and y (where y != 0), find and return the multiple of y that is closest to x. If two multiples are equally close to x, return the one with the larger absolute value.

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related TCS questions

Collected from public candidate posts and coding forums. Updated Nov 2026.