Questions tagged [recursion-schemes]

Recursion schemes are reusable patterns for making recursive calls. They include catamorphisms and anamorphisms. This tag covers both the general concept, and the Haskell library of the same name.

Recursion schemes are reusable patterns for making recursive calls. They include catamorphisms and anamorphisms. This tag covers both the general concept, and the Haskell library of the same name which implements them using higher-order functions and type families.

cf. the recursion-schemes package.

See also

107 questions
-2
votes
2 answers

Non-tail recursive function that returns the last element in list without using reverse?

Im trying to make a non-tail recursive function returns the last element of a list without using reverse, map, iteration, mutation of any sort (built in or user-built). So far I have successfully made a tail-recursive version and a non-tail version…
-5
votes
1 answer

How to convert recursive algorithm to dynamic programming?

I have this algorithm: static int findMaxRec(int[] w, int[] v, int W, int n) { int max = int.MinValue; int res; for (int i = 0; i < n; i++) { if (w[i] <= W) { if (w[i] == W) res = v[i]; //…
vytaute
  • 1,260
  • 4
  • 16
  • 36
1 2 3 4 5 6 7
8