Leetcode System Verilog Interview Question