Honeywell Interview Question

Gave coding task and ask questions on it.