Gang Of Coders
Home
About Us
Contact Us
All Iterator Solutions on Gang of Coders
Total of 165 Iterator Solutions
In Kotlin, how do you modify the contents of a list while iterating
List
Iterator
Kotlin
Mutable
Is there a C++ iterator that can iterate over a file line by line?
C++
File
Iterator
Newline
Line
Python class accessible by iterator and index
Python
List
Iterator
Java get last element of a collection
Java
Collections
Iterator
What is the relation between Iterable and Iterator?
Scala
Iterator
Why no emplacement iterators in C++11 or C++14?
C++
C++11
Stl
Iterator
C++14
Pair-wise iteration in C# or sliding window enumerator
C#
.Net
Iterator
Ienumerable
Why are std::begin and std::end "not memory safe"?
C++
C++11
Iterator
Std
How to remove constness of const_iterator?
C++
Stl
Iterator
Const Iterator
python arbitrarily incrementing an iterator inside a loop
Python
Iterator
For-each vs Iterator. Which will be the better option
Java
Foreach
Iterator
Yield in a recursive function
Python
Recursion
Iterator
Directory Structure
Yield
Generator functions equivalent in Java
Java
Python
Iterator
Generator
How can I implement the Iterable interface?
Java
Iterator
Can I increment an iterator by just adding a number?
C++
Iterator
UnsupportedOperationException in AbstractList.remove() when operating on ArrayList
Java
List
Iterator
Arraylist
Iterating over key and value of defaultdict dictionaries
Python
Dictionary
Iterator
How get next (previous) element in std::list without incrementing (decrementing) iterator?
C++
List
Iterator
How to correctly implement custom iterators and const_iterators?
C++
Iterator
Const Iterator
How to pick just one item from a generator?
Python
Iterator
Generator
Python 2.x
In Go is it possible to iterate over a custom type?
Go
Iterator
C++ iterators considered harmful?
C++
Iterator
Language Design
Is close() necessary when using iterator on a Python file object
Python
File
Iterator
Is it possible to merge iterators in Java?
Java
Iterator
Iteration
How to iterate through two lists in parallel?
Python
List
For Loop
Iterator
Why use iterators instead of array indices?
C++
For Loop
Stl
Iterator
Containers
Convert Iterator to List
Java
List
Iterator
Fastest way to convert an iterator to a list
Python
Iterator
List Comprehension
How to get a reversed list view on a list in Java?
Java
List
Collections
Iterator
Reverse
Iterate through a C++ Vector using a 'for' loop
C++
Coding Style
For Loop
Iterator
What is the difference between iterator and iterable and how to use them?
Java
Iterator
Iterable
C++ STL Vectors: Get iterator from index?
C++
Stl
Vector
Iterator
Iterating over Typescript Map
Typescript
Iterator
Maps
has_next in Python iterators?
Python
Iterator
Why use non-member begin and end functions in C++11?
C++
C++11
Stl
Iterator
Container Data-Type
Why are Standard iterator ranges [begin, end) instead of [begin, end]?
C++
Stl
Iterator
Standards
What is the reason behind cbegin/cend?
C++
C++11
Iterator
Const Correctness
Const Iterator
Getting number of elements in an iterator in Python
Python
Iterator
How can I iterate over files in a given directory?
Python
Iterator
Directory
Why is Java's Iterator not an Iterable?
Java
Iterator
Iterable
Deleting elements from std::set while iterating
C++
Iterator
Set
Std
C++ Standard-Library
What does iterator->second mean?
C++
Stl
Iterator
Python list iterator behavior and next(iterator)
Python
List
Iterator
Iteration
Ruby: How to iterate over a range, but in set increments?
Ruby
Iterator
Increment
What is the difference between const_iterator and non-const iterator in the C++ STL?
C++
Stl
Iterator
Constants
Can iterators be reset in Python?
Python
Iterator
Generator
Difference between Python's Generators and Iterators
Python
Iterator
Generator
Iterate over object keys in node.js
Javascript
node.js
Iterator
Update row values where certain condition is met in pandas
Python
Pandas
Indexing
Iterator
Mask
Creating my own Iterators
C++
Iterator
Cleanest way to get last item from Python iterator
Python
Python 3.x
Python 2.7
Iterator
what is the difference between const_iterator and iterator?
C++
Stl
Iterator
Const Iterator
Difference between Iterator and Listiterator?
Java
List
Iterator
Set
Listiterator
Calling remove in foreach loop in Java
Java
Loops
Iterator
Foreach
What happens if you call erase() on a map element while iterating from begin to end?
C++
Stl
Iterator
Iterator Loop vs index loop
C++
Loops
C++11
Indexing
Iterator
What does "three dots" in Python mean when indexing what looks like a number?
Python
Numpy
Iterator
How to build a basic iterator?
Python
Object
Iterator
Circular list iterator in Python
Python
List
Iterator
Using map() on an iterator
Javascript
Dictionary
Syntax
Ecmascript 6
Iterator
Iterate over the lines of a string
Python
String
Iterator
Is there an expression for an infinite iterator?
Python
Iterator
Generator
Infinite Loop
How to print a generator expression?
Python
Iterator
Generator
Is if(items != null) superfluous before foreach(T item in items)?
C#
Iterator
Foreach
Iteration
What's the best way to iterate over two or more containers simultaneously
C++
C++11
Iterator
Containers
What's the 'Ruby way' to iterate over two arrays at once
Ruby
Arrays
Iterator
Difference between Java Enumeration and Iterator
Java
Collections
Iterator
Enumeration
Iterating C++ vector from the end to the beginning
C++
Vector
Iterator
Iterate an iterator by chunks (of n) in Python?
Python
Iterator
Iterator invalidation rules for C++ containers
C++
Iterator
C++ Standard-Library
C++ Faq
Scala downwards or decreasing for loop?
Scala
Iterator
Loops
For Loop
One-liner to check whether an iterator yields at least one element?
Python
Iterator
How to navigate through a vector using iterators? (C++)
C++
Iterator
Vector
Why would iterating over a List be faster than indexing through it?
Java
List
Iterator
How to iterate (keys, values) in JavaScript?
Javascript
Dictionary
Object
Iterator
How to get the current loop index when using Iterator?
Java
Iterator
How does zip(*[iter(s)]*n) work in Python?
Python
Iterator
How to convert an Iterator to a Stream?
Java
Iterator
Java 8
How do you iterate over a string by character
String
Iterator
Rust
What is the best way to get the count/length/size of an iterator?
Java
Iterator
If range() is a generator in Python 3.3, why can I not call next() on a range?
Python
Python 3.x
Iterator
Generator
Typeerror
How to read one single line of csv data in Python?
Python
File
Csv
Iterator
Next
Iterate over all pairs of consecutive items in a list
Python
List
Iterator
What exactly are iterator, iterable, and iteration?
Python
Iterator
Iteration
Terminology
Iterable
Can we write our own iterator in Java?
Java
Iterator
How do I write a 'for' loop in Bash?
Bash
For Loop
Iterator
What is the most effective way to get the index of an iterator of an std::vector?
C++
Iterator
Coding Style
Why are Objects not Iterable in JavaScript?
Javascript
Arrays
Iterator
Ecmascript 6
Ecmascript 5
What are fail-safe & fail-fast Iterators in Java
Java
Iterator
Terminology
Is enumerate in python lazy?
Python
Iterator
Generator
Enumerate
ArrayIndexOutOfBoundsException when using the ArrayList's iterator
Java
Arraylist
Iterator
Indexoutofboundsexception
python JSON only get keys in first level
Python
Json
Python 2.7
Iterator
Key
Is it possible to do start iterating from an element other than the first using foreach?
C#
Iterator
Ienumerable
How does RecursiveIteratorIterator work in PHP?
Php
Iterator
Spl
Iterator vs for
Java
For Loop
Iterator
iterating over each character of a String in ruby 1.8.6 (each_char)
Ruby
String
Iterator
How to write a Rust function that takes an iterator?
Function
Iterator
Rust
Get the first item from an iterable that matches a condition
Python
Iterator
Need iterator when using ranged-based for loops
C++
C++11
For Loop
Iterator
JavaScript - Nuances of myArray.forEach vs for loop
Javascript
Arrays
For Loop
Internet Explorer-8
Iterator
When is not a good time to use python generators?
Python
Optimization
Iterator
Generator
"On-line" (iterator) algorithms for estimating statistical median, mode, skewness, kurtosis?
Algorithm
Statistics
Iterator
Median
How to find the index of current object in range-based for loop?
C++
Iterator
Why does next raise a 'StopIteration', but 'for' do a normal return?
Python
Iterator
Generator
Stopiteration
Confused with python lists: are they or are they not iterators?
Python
List
Iterator
What's the shortest way to count the number of items in a generator/iterator?
Python
Iterator
Generator
Iterable
Tuple Unpacking in Map Operations
Scala
Map
Iterator
Tuples
Iterable Unpacking
Adding elements to a collection during iteration
Java
Iterator
Is there a Java equivalent of Python's 'enumerate' function?
Java
Python
Iterator
How to implement Iterator and IntoIterator for a simple struct?
Iterator
Rust
Pass multiple parameters to concurrent.futures.Executor.map?
Python
Concurrency
Iterator
Future
Map Function
Why is there no first(iterable) built-in function in Python?
Python
Iterator
Generator
Why does Java not allow foreach on iterators (only on iterables)?
Java
Syntax
Iterator
Language Design
Iterable
What is the difference between chain and chain.from_iterable in itertools?
Python
Iterator
Itertools
What is the purpose/advantage of using yield return iterators in C#?
C#
Iterator
Yield Return
How to iterate through a list of objects in C++?
C++
For Loop
C++11
Stl
Iterator
How to increment an iterator by 2?
C++
Visual C++
Stl
Iterator
How to iterate a Vec<T> with the indexed position?
For Loop
Rust
Iterator
Is there any built-in way to get the length of an iterable in python?
Python
Iterator
Distinction between iterator and enumerator
C#
.Net
Iterator
Generator
Enumeration
Preparation for std::iterator Being Deprecated
C++
Iterator
Standards
Deprecated
C++17
Vector erase iterator
C++
Vector
Iterator
How to use an iterator?
C++
Pointers
Vector
Iterator
Using Statement
How does the enhanced for statement work for arrays, and how to get an iterator for an array?
Java
Arrays
Iterator
Foreach
How to avoid "ConcurrentModificationException" while removing elements from `ArrayList` while iterating it?
Java
List
Arraylist
Iterator
Enumerate properties on an object
Typescript
Iterator
Why does defining __getitem__ on a class make it iterable in python?
Python
Iterator
Overloading
What happens if you increment an iterator that is equal to the end iterator of an STL container
C++
Stl
Vector
Iterator
What is an iterator's default value?
C++
Stl
Default
Containers
Iterator
Checking if an iterator is valid
C++
Stl
Iterator
Dereference
Does moving a vector invalidate iterators?
C++
Iterator
C++11
iterate vector, remove certain items as I go
C++
Data Structures
Vector
Loops
Iterator
What is the difference between cbegin and begin for vector?
C++
Vector
Stl
Iterator
Returning a pointer to a vector element in c++
C++
Pointers
Containers
Iterator
What's the benefit of std::back_inserter over std::inserter?
C++
Vector
Stl
Iterator
Containers
Pointer to incomplete class type is not allowed
C++
List
Class
Pointers
Iterator
Rails: An elegant way to display a message when there are no elements in database
Ruby on-Rails
Ruby
Loops
Iterator
Modifying list while iterating
Python
List
Iterator
Loops
Sorting a vector in descending order
C++
Sorting
Stl
Vector
Iterator
Is an "infinite" iterator bad design?
Java
Collections
Iterator
Removing item from vector while iterating?
C++
Stl
Iterator
How to implement an STL-style iterator and avoid common pitfalls?
C++
Iterator
Const Iterator
What is most idiomatic way to create an iterator in Go?
Iterator
Go
How can I delete elements of a std::map with an iterator?
C++
Map
Iterator
Stdmap
Using C++ vector::insert() to add to end of vector
C++
Stl
Vector
Iterator
Best way to loop over a python string backwards
Python
String
Optimization
Iterator
Reverse
Python range() and zip() object type
Python
Python 3.x
List
Iterator
Range
What's faster, iterating an STL vector with vector::iterator or with at()?
C++
Performance
Stl
Vector
Iterator
Why can't I iterate twice over the same data?
Python
Iterator
Last key in a std::map
C++
Iterator
Stdmap
How to iterate over a std::map full of strings in C++
C++
Dictionary
Iterator
Std
Stdmap
Performance of traditional for loop vs Iterator/foreach in Java
Java
Map
Iterator
Arraylist
For Loop
Convert iterator to pointer?
C++
Stl
Pointers
Vector
Iterator
Can I convert a reverse iterator to a forward iterator?
C++
Iterator
How can I iterate through a string and also know the index (current position)?
C++
String
Iterator
How to avoid code duplication implementing const and non-const iterators?
C++
Iterator
Constants
Dry
how portable is end iterator decrement?
C++
Stl
Iterator
Portability
Why is "!=" used with iterators instead of "<"?
C++
Stl
Iterator
Comparison Operators
Should custom containers have free begin/end functions?
C++
C++11
Iterator
Containers
Argument Dependent-Lookup
Events vs Streams vs Observables vs Async Iterators
Stream
Iterator
Observable
Dom Events
Ecmascript Next
Iterable objects and array type hinting?
Php
Iterator
Type Hinting
c++11 foreach syntax and custom iterator
C++
Iterator
C++11
How to remove an element of a HashMap whilst streaming (lambda)
Java
Dictionary
Iterator
Java Stream
How do I create a Vec from a range and shuffle it?
Iterator
Immutability
Rust
Mutability
Why is a borrowed range not an iterator, but the range is?
Rust
Reference
Iterator