employer cover photo
employer logo
employer logo

National Instruments

Is this your company?

National Instruments Interview Question

Find the average value of a binary tree of intergers

Interview Answer

Anonymous

Apr 2, 2013

I just did a recursive descent down the tree. The trick is to keep track of sum and count. Be careful of memory leaks if you use arrays. Structs and output parameters make for good solutions