Pregunta de entrevista de Check Point Software Technologies

Simple coding question. Focus on edge cases.