Google L3 Problem
3020

Given a binary tree (values are unique), and a vector of nums
e.g.

      0
    /   \
  1      2 
/   \
3   4

determine the nums is good or bad

good: the nums position is sorted according to the inorder sequence
bad: the nums position is not sorted according to the inorder sequence
e.g.
inorder of the tree = 3 1 4 0 2
[1 4 2] -> good
[3 1 0] -> good
[3 4 1] -> bad because 4 is after 1 in inorder traversal sequence

I kinda feel that I've seen the same problem in leetcode, anyone knows?

Comments (13)