algorithm homework related