A1: fix subset trailing space.
A1: fix bug in Deque iterator. + test