← Questions

Unit conversion ratio queries with modular answers

0
AppleCodingLast asked Sep 2026

A coding interview question asked in Apple's technical phone screen, last asked Sep 2026. It tests graphs, union-find and modular arithmetic.

There are n units, numbered 0 to n - 1, that fall into independent families: units in one family convert into each other, units in different families never do. Each conversion [source, target, factor] says one unit of source equals factor…

Sign in to unlock this question

The full prompt, the worked answer and your own canvas or code with the AI tutor. New accounts get 5 credits: each one unlocks a question for good.

Where it's asked

  • Apple · Technical phone screen · Last asked Sep 2026

What it tests

graphs · union-find · modular arithmetic

Your code and the AI tutor open when you unlock this question.