Shield AI interview question

A leetcode style coding question