Tag Archives: Array

Fibonacci and C arrays- the perfect combo

New year upon us and back to the C training. Tonights mission was to output Fibonacci numbers via an array. The Fibonacci sequence is a sequence of numbers where the next number is the sum of the previous 2 numbers. … Continue reading

Posted in C, Perl | Tagged , , | Leave a comment

C Arrays

Here are some C programs from the K&R book with reference to arrays. This resonated with the Perl hashes as this task is nearly always done with a hash, but as C has no hashes, here we go with an … Continue reading

Posted in C | Tagged , , , | Leave a comment

Removing duplicates from a Perl array – really this time

My last post got a bit sidetracked and i didn’t do a simple removal of dupes from an array. As I said last time, hashes cannot have duplicate keys, so the easiest way to do this is to simply create … Continue reading

Posted in Perl | Tagged , , , , | Leave a comment