JavaScript implementations of algorithms