ByteDance Interview Question

2 easy, 1 medium coding questions