注册一亩三分地论坛,查看更多干货!
您需要 登录 才可以下载或查看附件。没有帐号?注册账号 
x
"""
You work in an automated robot factory. Once robots are assembled, they are sent to the shipping center via a series of autonomous delivery carts, each of which moves packages on a one-way route.
Given input that provides the (directed) steps that each cart takes as pairs, write a function that identifies all the start locations, and a collection of all of the possible ending locations for each start location.
In this diagram, starting locations are at the top and destinations are at the bottom - i.e. the graph is directed exclusively downward.
A E uot;, "G"],
["A", "B"],
["A", "C"],
["G", "H"],
["G", "I"],
]
第二题:
input:
all_parts: list of parts, string
required_parts: list of robot and the its required_parts, list of string
output: list of robot could be made from.
|