basic algorithms visualized in javascript