The index `i` is required only for getting the index `idx`, so why not iterate over `del_nodes_idx` list?