reset password
Author Message
LHS
Posts: 26
Posted 22:12 Nov 20, 2018 |

For the inorder iterator do we need to use a list?

I assume that we have to use the given return for next() method.

 

//I set this to return null so that the project builds.  To do: delete return null, uncomment the following line, and make it work correctly

        return list.get(current++);

 

 

bcarter
Posts: 5
Posted 07:42 Nov 21, 2018 |

I was confused by this too.. 

jhurley
Posts: 207
Posted 13:01 Nov 21, 2018 |
LHS wrote:

For the inorder iterator do we need to use a list?

I assume that we have to use the given return for next() method.

 

//I set this to return null so that the project builds.  To do: delete return null, uncomment the following line, and make it work correctly

        return list.get(current++);

 

 

next() should return the next one item in the inorder traversal