Pergunta de entrevista da empresa Meta

Find all indices into an array A such that: * There are three elements (not necessarily distinct) * The three indexed elements sum to 0