Tuesday, January 1, 2019

Show case: Check completeness of a binary tree on interviewing.io

January 1, 2018

Introduction


It is my strategy to learn one algorithm to apply in my mock interview as an interviewer on interviewing.io again and again. This way I can full grasp thinking related to tree algorithm. I had mock interview and then the interviewee like to show case the interview. I choose to support his decision.

Show case


The show case is on interviewing.io, complete binary tree.

Talking Narwhal interviewed by Platinum Burrito 12/31/18 at 10:00 PM ~Practice

The algorithm I asked in the second one is Leetcode 958 Check completeness of a binary tree.

The idea is to use queue to do level order traversal, when a null pointer is dequeued, the rest of queue should not include any node with value except null pointers.

My personal experience



I wrote the algorithm first time in weekly contest 115. And then I wrote a comment in my favorite coding blog from Microsoft.


No comments:

Post a Comment