News for hackers. Stuff that matters.
Re:Data structures and algorithms interview questions and th... by hedora on Wednesday October 18, 2017 @01:54PM (#15501298)
You said that recursive and iterative computations are fundamentally different. I pointed out a class of recursive and iterative algorithms that are equivalent to each other. That class disproves your statement.

I’m not sure what you’re trying to get at...

Re:Data structures and algorithms interview questions and th... by SomeStupidPoint on Friday October 20, 2017 @07:56PM (#15519895)
I'm actually not sure what you're getting at -- the logic you just presented is "the primes and evens are the same set of numbers because both contain 2".

Assuming you mean the and not a, they're still not the same, as equivalent algorithms need not be identical. Example: 5-3 and 1+1 both compute the result 2, making them equivalent but non-identical algorithms.

There's a way to transform any subtractive recipe for a number into an additive recipe so they're equivalent classes, but addition and subtraction aren't identical as operations.