โ† Arista Networks questions
CodingReported in a candidate post, Aug 2021

Last Stone Weight simulation

Filed under Arista Networks

The question

Given weights of stones, repeatedly collide the two heaviest stones. If equal, both disintegrate; if unequal, the lighter is destroyed and the heavier is reduced by the lighter's weight. Return the weight of the last remaining stone, or 0 if none remain.

No write-up yet. Related questions below have one.

Related Arista Networks questions

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