Intel Corporation interview question

to implement a function with high Z output option