totally both have different meanings.
in my opinion, sometimes ‘可以了’means ' ok,that, is all', for instance : 可以了,你可以走了 (that is all, you can go),but it also another meanings.
'算了' means 'forget it '
like this kind of words you really should pay attention on the situation,not just only the simple words.:)