> In Java I just create an array with a certain size and when it's full I 
> create another one with double the size and copy the elements to it.

Of course you can do exactly the same with Nim: You can create a seq of some 
initial size, fill in elements, create a larger one and copy elements over. So 
you learn creating seqs and copying elements. Not very interesting and useful. 
Have you read tutorial part 1 and 2? Then you already know much of Nim, and you 
can decide yourself which exercises are really interesting. (For Nim's seq 
implementation -- I assume that one is very low level, optimized for speed and 
interacting with the OS for allocating memory, so may be not easy 
understandable for beginners. And it may be hidden in the compiler code, 
because seq's are internal data structures.)

And for the Sedgewick book, I think chapter 2 about sorting is more 
interesting. Comparing performance of quicksort vs. mergesort is some fun, and 
comparing recursive vs. non recursive code.

Reply via email to