Lazard interview question

Leetcode medium question, ML and transformers