segmentRoute segments string key paths by slash separators. For example, "/a/b/c" -> ("/a", 2), ("/b", 4), ("/c", -1) in successive calls. It does not allocate any heap memory.
(path string, start int)
source not stored for this graph (policy: none)
no outgoing calls