TigerGraph interview question

Coding questions: a bit like the one in Leetcode (in the technical round)