Skip to main content
3 of 6
added 11 characters in body
Luis Mendo
  • 105.3k
  • 9
  • 135
  • 372

#MATL, 13 bytes

ttn:2/k)>~4L)

Try it online! Or verify all test cases at once.

An array is truthy if it is non-empty and all its entries are nonzero, or is falsy otherwise. Here are some examples.

###Explanation

t     % Take input implicitly. Duplicate
tn:   % Duplicate and generate range [1 2 ...n] where n is input size
2/k   % Divide by 2 and round down
)     % Index into input. Gives array of parents, except for the first entry
>~    % True for entries of the input that don't exceed those in the array of parents
4L)   % Discard first entry
Luis Mendo
  • 105.3k
  • 9
  • 135
  • 372