Marlabs Interview Question

patching based