+ 1

What are some of the good examples of nested for loops?Also please suggest the way to handle it better during coding??

I find the multiple nested for loops very challenging to deal with ,please give some typical example of dealing with it

18th Jun 2019, 2:12 AM
Akash Raj
Akash Raj - avatar
2 Respostas
+ 2
Nested loops are mostly used in handling 2D arrays.
18th Jun 2019, 2:17 AM
Deepak Kumar
Deepak Kumar - avatar
+ 2
I had only a couple hours to get a enormous data table made and out to production. I got a raw ungrouped data stream. Fastest and ugliest way to do it was loop through the data once to create a 6 layer deep set of arrays doing multiple groupings and then have 6 nested for loops to build the interactive tables. Was ugly but it works. Nested for loops can be a pain to read and keep track of so it is important to use variable names that have meaning on the loop they are iterating over.
18th Jun 2019, 3:43 AM
Adam
Adam - avatar