Motorola Solutions Interview Question

90 min coding task. First is rearranging a string of numbers to provide an integer output. Second is a number machine task.