I have algorithm with for
loops, that looks like:
for(A : collection) {
for (B : A.collection) {
for (C : B.collection) {
do something with C instance
}
}
}
What is the best way to optimize the performance of this nested for loops?
For example use LinkedHashMap
?
Thank you.