Lucid Software Interview Question

Short coding challenges, one longer one.