For marking strong components. Pseudo-code PushPostRevDFS(𝑣, 𝑆):1Mark(𝑣)2for all edges 𝑢→𝑣∈𝐸:3if 𝑢 is unmarked:4PushPostRevDFS(𝑢,𝑆)56𝑆.Push(𝑣)LabelOneDFS(𝑣, 𝑟):1𝑣.𝑟𝑜𝑜𝑡←𝑟2for all edges 𝑣→𝑤∈𝐸:3if 𝑤.𝑟𝑜𝑜𝑡=none:4LabelOneDFS(𝑤,𝑟)5KosarajuSharir(𝐺):1𝑆← stack(∅)2for all vertices 𝑣∈𝑉:3Unmark(𝑣)4𝑣.𝑟𝑜𝑜𝑡←none56for all vertices 𝑣∈𝑉:// Phase 17if 𝑣 is unmarked:8PushPostRevDFS(𝑣,𝑆)910while 𝑆 is not empty:// Phase 211𝑣←𝑆.Pop( )12if 𝑣.𝑟𝑜𝑜𝑡=none:13LabelOneDFS(𝑣,𝑣)14 Runtime 𝑂(|𝑉|+|𝐸|)