Aptean interview question

Coding question on Triangle Pyramid