Algorithm · Karat · Medium
A factory uses delivery carts that travel on one-way tracks. You are given the cart steps as directed moves, each going from one location to another. Find every location where a cart route can start. For each of those starting locations, list all the locations where a cart beginning there could end up. Follow-ups A second part of the question is about assembling robots. You are given a list of the parts that are available, and you must determine which robots can be fully…