Roblox Interview Question

Some dynamic programming question and a sliding door problem