Effective way to memoize a combination of two numbers?

I'm working on an algorithm to count the number of ways to build 100 cents given an infinite amount of pennies, dime...

All paths of a tree?

How could one go on about listing all paths within a tree using recursion? I call this in the shell: t = Tree(1) t...

Creating Pascal's Triangle using Python Recursion?

I'm working on a homework assignment that asks me to create a Pascal Triangle using a recursive function. Below is w...

Computing integer powers with a recursive divide-and-conquer algorithm?

I have implemented a recursive function to find m^n (m raised to the power n). Now I want to implement the same fun...

Python Quicksort Runtime Error: Maximum Recursion Depth Exceeded in cmp?

I'm writing a program that will read a text file containing 5,163 names. (text file can be seen here) Then I want t...

Understanding recurrence for running time?

I'm doing the exercises in Introduction to Algorithm by CLRS. This is not graded homework or anything, I'm just tryi...

Conversion of recursive C function into ARM assembly??

For a homework assignment, I've been given a recursive C function to count integer partitions that I need to convert...

Multiplication function with recursion in Python?

I need to write the function mult( n, m ) that should output the product of the two integers n and m. I am limited t...

How to recursively make a list of lists in SML/NJ?

I'm brand new to SML/NJ and I'm trying to make a recursive function that makes a listOfLists. Ex: listOf([1,2,3...

What is the maximum recursion depth in Python, and how to increase it??

I have this tail recursive function here: def recursive_function(n, sum): if n < 1: return sum e...

How to delete the last element from an array??

Now I'm working with the recursive backtracking,my assignment is to find the longest path in the maze,the mass is pr...

Recursive method for Pascal's Triangle for Java?

I have written a method to evaluate a Pascal Triangle of n rows. However when I test the method I receive the error...

jQuery ajax “too much recursion”?

I have an procedure that runs throught 5 consecutive steps, and in my page, I'm calling an ajax method for each of t...

Concatenating strings in OCaml?

I'm writing a recursive OCaml function that concatenates strings in a string list joined by a separator without plac...

How to Reverse a List??

What is the function to a list in Scheme? It needs to be able to handle nested lists. So that if you do something l...