Cloud4C interview question

Write pseudo code for graph