ByteDance interview question

mostly algorithm questions, you can use any programming languages you like