I was reading the book algorithms by Robert Sedgewick and I came across chapter 1.3 about ADTs and I have a few questions.
Are all ADT's in java iterable?
Does that mean we have to implement an iterator each time we implement an ADT?
If so, do I make a separate API for the iterator? Because in page 141 he made a interface just for the Iterator.
I was talking to a friend and he said "An instance of an ADT can be modified (i.e. elements added/deleted/or modified) when iterated" isn't this wrong because in a bag elements cannot be removed?