Lets suppose that i have this input: a list of list
(def list-of-list-3 (list (list 1 2 3) (list 4 5 6) (list 7 8 9)) )
(map #(reduce * %1) list-of-list3 )
The map-reduce has a O(n^2) complexity in this case?
is map-reduce translated as two nested for ?
So when i run the above example on the clojure REPL, the complexity time seems like O(n).
when i duplicate the input size ( list-of-list-6 (list (list 1 2 3) (list 4 5 6) ( list 7 8 9) (list 8 2 3) (list 9 8 1) (list 7 6 4)) ) the time increase in a linear way, not quadratic.
Can anyone say why ?
thanks in advance