Constructor for iterator based on integer array representing nodes
Constructor for iterator based on the size