void reset(int targetSize) {
      // compute the target tree size. This is a power of 2 minus one, like 15 or 31.
      int treeCapacity = Integer.highestOneBit(targetSize) * 2 - 1;
      leavesToSkip = treeCapacity - targetSize;
      size = 0;
      leavesSkipped = 0;
      stack = null;
    }
This stack is a singly linked list, linked by the 'parent' field.
lottie/src/main/java/com/airbnb/lottie/parser/moshi/LinkedHashTreeMap.java