Roblox Interview Question

Two easy string based problem, one similar to leetcode text-justification