internal static bool smaller(short[] tree, int n, int m, byte[] depth){ short tn2=tree[n*2]; short tm2=tree[m*2]; return (tn2<tm2 || (tn2==tm2 && depth[n] <= depth[m])); }