Implement core graph algorithms for graphics | NVIDIA Interview Question