The reverse of a directed graph $G=(V, E)$ is another directed graph $G^{R}=\left(V, E^{R}\right)$ on the same vertex set, but with all edges reversed; that is, $E^{R}=\{(v, u):(u, v) \in E\}$
Give a linear-time algorithm for computing the reverse of a graph in adjacency list format.