We then take a number of actions. First, we remove the node with the lowest…