JPMorganChase Interview Question

Two coding challenges via codeview