DoorDash Phone Screen
Anonymous User
1571

DoorDash wants to map out aisles in supermarkets.

Our sensors give us incomplete information. Use the information to count up all possible arrangements for each aisle. the first array represents the combination of contiguous food items we can have. the second array represents the aisle of food items where F is food item, ? is empty spot where we can add either F (Food) or W (water), and W is water

Ex 1
[1,2] [?,F,?,W,W,?,?] is 1 because of the candidates

So in this example there is only 1 combination resulting array because we already have 1 Food Item at the start and we can add 2 Food items at end.

WFWWWFF

[1,1] [?,F,?,W,W,?,?] is 2 because of the candidates

WFWWWFW
WFWWWWF
Comments (8)