Kardium interview question

LC Easy Question, implement class function