Batch Dynamic Algorithms for Two Graph Problems