Pergunta de entrevista da empresa TigerGraph

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