About 8,450,000 results
Open links in new tab
  1. What are iterator, iterable, and iteration? - Stack Overflow

    Iterator: Iterator are the object which call next method and transverse through the sequence. On calling the next method it returns the object that it traversed currently.

  2. java - What is the difference between iterator and iterable and …

    Jul 28, 2011 · Iterator is class that manages iteration over an Iterable. It maintains a state of where we are in the current iteration, and knows what the next element is and how to get it.

  3. How to correctly implement custom iterators and const_iterators?

    Aug 27, 2010 · The reverse iterator is work for nothing, since the standard library provides a reverse-iterator adapter. And you failed to make the iterator type assignable from the const …

  4. Reset list iterator to first element of the list - Stack Overflow

    Over and over again and after many moves of the iterator, I need to "reset" the position of the iterator. I want to ask how I can "reset" my iterator to the first element.

  5. Difference between Python's Generators and Iterators

    What is the difference between iterators and generators? Some examples for when you would use each case would be helpful.

  6. Which is more efficient, a for-each loop, or an iterator?

    Iterator is an interface in the Java Collections framework that provides methods to traverse or iterate over a collection. Both iterator and for loop acts similar when your motive is to just …

  7. How to navigate through a vector using iterators? (C++)

    The goal is to access the "nth" element of a vector of strings instead of the [] operator or the "at" method. From what I understand, iterators can be used to navigate through containers, but I've ...

  8. python - How to build a basic iterator? - Stack Overflow

    Iterator objects in python conform to the iterator protocol, which basically means they provide two methods: __iter__() and __next__(). The __iter__ returns the iterator object and is implicitly …

  9. What does the "yield" keyword do in Python? - Stack Overflow

    Oct 24, 2008 · An iterable returns an iterator upon calling the iter () on the iterable, and an iterator doesn't always have to store its values in memory, depending on the implementation of the …

  10. Iterate through a C++ Vector using a 'for' loop - Stack Overflow

    Oct 3, 2012 · I am new to the C++ language. I have been starting to use vectors, and have noticed that in all of the code I see to iterate though a vector via indices, the first parameter of …