If we have input of size $N=13$, which represents array that has 13 element. We need in general $O(N\log{N})$ memory to store all intervals. We see that number of intervals we need in terms of power of $2^p$ is 3, so intervals is $p=3$.
Problem: I am not sure though why the space we need to store intervals then is $O(13\times 3)$ please?