Pregunta de entrevista de Booking.com

Delta encoding: given a list of numbers as input, output a delta encoding for the sequence.