visited [ ] array to make nodes visited src is starting node for DFS traversal prev_len is sum of cable length till current node max_len is pointer which stores the maximum length of cable value after DFS traversal
def DFS ( graph , src , prev_len , max_len , visited ) : NEW_LINE