Posts

Showing posts from June, 2017

Minimum Absolute Difference in BST (by LeetCode) and AMP!!!

Image
Hello my dears,   It has been a while since I've posted something here, so here we go. Today we'll be landing on LeetCode territory again, and we'll deal with Binary Search Trees and In-Order Traversal. But first, some news: Bing has shipped AMP (Accelerated Mobile Pages) on m.bing.com. Yeahhh! We had done this work before on the Bing iOS and Android native apps, but now we're rolling it out to the browser (m.bing.com), so whenever you search for any query that triggers a News article, sure enough you shall see the famous AMP icon there, and the pages will load much faster than the non-AMP ones. Very cool project done by my team: Now back to LeetCode. The problem in question is this:  https://leetcode.com/problems/minimum-absolute-difference-in-bst/#/description , or copied/pasted here: Given a binary search tree with non-negative values, find the minimum  absolute difference  between values of any two nodes. Example: Input: 1 \ 3 / 2