Applied Intuition Interview Question

Write a code for 3d demension