Algorithm analysis