Keep in mind that ++ is O(n) so if you try to build up a non trivial list by adding elements to the end, one at a time, it is most likely not the right way.
Keep in mind that ++ is O(n) so if you try to build up a non trivial list by adding elements to the end, one at a time, it is most likely not the right way.