Using D3.js to visually represent different algorithms