Assessment for Backend Engineer (Growth)-2021 Start - ByteDance Campus Recruitment (ONLINE CODING ROUND)

ByteDance · Question · Posted Mar 2021

Question 1 Reverse the order of words in a given sentence (an array of characters). Input : "Hello World" Output : "World Hello" Question 2 Give a string s, count the number of non-empty (contiguous) substrings that have the same number of 0's and 1's, and all the 0's and all the 1's in these substrings are grouped consecutively. Input : "00110011" Output : 6 Question 3 Given a number A, we want to re-arrange its digits to make the ...

The full answer & interview discussion are available to premium members.

Log in Create a free account