By Tom on August 12, 2007
Here are three C++ programs to find the median of a set of numbers. The first is short and simple. The last is fiddly and fast. Simple but not linear (n*log n time): Sort using STL sort (presumably quicksort), then find the middle value: #include <iostream> #include <algorithm> int main() { int A[7] = {23, [...]
Posted in Tech Journal |
By Tom on August 9, 2007
Programming, 9/10 – Aug 2007 This book should really be kept a secret because if everyone read it before a programming interview, all the good jobs would be taken. It’s an excellent refresher to put you back to fresh-out-of-uni programming knowledge level. It covers Programming Problems, Logic Puzzles and Knowledge based problems with a very [...]
Posted in Book Reviews, Tech Journal |
By Tom on August 9, 2007
Programming, 8/10 – Aug 2007 The chapters on algorithms and efficiency (performance, code tuning and space tuning) make this book brilliant. The explanation and benchmarking of the different sorting and searching technique’s (especially quicksort) are almost fundamental reading for anyone that has a programming interview with a top company. Beware, in amongst the pearls there [...]
Posted in Book Reviews, Tech Journal |
By Tom on August 1, 2007
Fantasy, 8/10 – July 2007 I was dreading the possibility of a dark close to this series but I was delighted with the happy fairy tale ending (Harry Potter is a children’s book after all). I’m going to miss Harry, but I’ve decided if I ever have children, I’ll definitely read it to them. Harry [...]
Posted in Book Reviews |