Infosys Interview Question

Describe why we need to use graphs for complex algorithms.