ByteDance interview question

2 coding questions and some generalized tech questions.