Scott Logic Ltd

Archive For "Algorithms" Tag

Web Workers Part 3: Creating a Generic Worker

Jonathan Cardy, February 24th, 2011

In the previous post we set up a Web Worker helper function that allowed us to create a worker file, and call it using code like this: $.work({file: ‘primes.js’, args: { from: 1, to: 100000 }}).then(function(data) { //Worker completed successfully console.log(data); }); Now, wouldn’t it be nice if you didn’t even have to write the [...]

Read More


Sorted Lists in Java

Mark Rhodes, December 22nd, 2010

This post goes through an implementation a SortedList in Java which ensures its elements are kept in order and guarantees O(log(n)) run time for all the basic operations: get, contains, remove and add. The source code, javadoc, unit tests and class files for this post are available here: scottlogic-utils-mr-1.4.zip. Sorting is one of the most [...]

Read More

© 2013 Scott Logic Ltd. All Rights Reserved.