As I understand it, many evolutionist will say that evolution cannot, nor is within the scope of evolution, to explain the origin of the first DNA. So I would say evolution does not explain it.
Algorithms are intelligently designed and always, when looked at closely, infused with intelligence with an end in site, or at least a defined goal.
“First DNA” , “at least a defined goal.” - It’s called theistic evolution, and my personal views are not far from it. http://en.wikipedia.org/wiki/Theistic_evolution