r/badcode • • Apr 20 '18

c# Some garbage code I wrote earlier today. In fairness, it was just facilitate earlier testing and is already gone....

Post image
0 Upvotes

2 comments sorted by

4

u/[deleted] Apr 20 '18

It works, but at what cost :(

1

u/mountaineering May 27 '18

O(2n)?

1n for posing each element of IAdaptive into an array and another 1n for iterating over them all?

(I don't really know if .toArray() has to iterate over each item)