React reconciles lists by matching keys. Implement solve(prev, next)
that returns operations to transform prev into next:
{ type: 'keep', key } — node exists in both.{ type: 'remove', key } — in prev only.{ type: 'add', key } — in next only.Order: removes first (in prev order), then keeps and adds (in next order).
Sample tests