Question d’entretien chez Coveo Solutions

Leetcode question with pointers and space time complexity