pathTo(vertex) {
        if (!this.hasPathTo(vertex)) return []

        const path = []
        let cur = vertex