Facebook Interview Report
- 2of 2 votes
AnswersIn Docker, building an image has dependencies. An image can only be built once
- ajay.raj August 27, 2017 in United States
its dependency is built (If the dependency is from outside, then the image can
be built immediately).
Sometimes, engineers make mistakes by forming a cycle dependency of local images.
In this case, ignore the cycle and all the images depending on this cycle.
Input is vector of pair of images (image, its dependency).
Output the order of images to be built in order.
##Example:
```
Example 1:
{{"master", "ubuntu"}, {"numpy", "master"}, {"tensorflow", "numpy"}}
Output: master, numpy, tensorflow
Example 2:
{{"python", "numpy"}, {"numpy", "python"}, {"tensorflow", "ubuntu"}}
Output: tensorflow
Example 3:
{{"b", "c"}, {"c", "d"}, {"a", "b"}, {"d", "e"}, {"e","c"}, {"f", "g"}}
Ouput: f| Report Duplicate | Flag | PURGE
Facebook SDE1 - 0of 0 votes
AnswersThere are n servers, reboot time is S0, S1..Sn-1
- ajay.raj August 27, 2017 in United States
There are m tasks, the completion of the time required are T0, T1… Tm-1
How to assign tasks to each server makes the total time the shortest| Report Duplicate | Flag | PURGE
Facebook SDE1