Search

【搬运】字节电面

Tiktok
aa@gmail.com

4/18面的,一共两道题,需要run code。
Team: ByteDance Global E-Commerce 1st: print lines by '\n'input = [     "one\n",     "two\nthree\n",     "four",     "five",     "six\nseven",     "eight" ] output = ['one', 'two', 'three', 'fourfivesix', 'seveneight'] 我用python,想先join all再split by '\n',面试官说还是line by line吧。 2nd: addinput: num1 = ['1', '2'], num2 = ['5'] output: 17 num1 = ['-','1','0'], num2 = ['4'] output: -6 -100 <= num <= 100
就先转换成int然后加起来。 面试官比较chill。
祝大家好运。

0
last edit: 15 days ago

Add a comment

欢迎加入

一个为内容创作者和信息共享者打造的全新社区。

永无广告,只为分享信息