Leetcode System Verilog Logical Operators In Ruby