peek() throws exception if stack is empty
return length, p+1