TikTok Interview Question

Product of the Last K Numbers