Verkada interview question

Codesignal questions regarding DS and algorithm