Bytedance | Online round | Singapore

Recently, i gave online test for bytedance as a graduate SDE role.

Q1. Find min number of flips to make a binary string with all 1.
flips can be of two operations-
a) Take any two adjacents chars and flip them.
b) Take any three adjacents chars and flip them.

Ex. 1010 - 2 (first convert to 1001 by a) then again convert 1001 to 1111 by a) method)

Test was so tough, I didn't even remember other two questions. Just know the questions name-

Micromouse racing contest and Stargazer

Anybody who gave that test and coded correctly...please help everyone on how to prepare for such coding questions.

Comments (3)