- 3
- 0
- 约6.75千字
- 约 39页
- 2016-12-04 发布于江苏
- 举报
2004-03 L.Chen Chapter 3 DATA REPRESENTATION(2) 3.4.4 A Chain Iterator Class(遍历器类) An iterator permits you to examine the elements of a data structure one at a time. Suppose for a moment that Output( ) is not a member function of Chain and that is not overloaded for this class. A Chain Iterator Class int len = x.length( ); for ( int i=1; i=len; i++) { x.find(i,x); Cout x ‘‘ ;} the complexity of this code is Θ ( n2), the Output() is Θ( n) An iterator records the current position and advance one position right each time. 3.4.5 Circular List Representation Circular List 3.4.6 Compa
原创力文档

文档评论(0)