Skip to content

Instantly share code, notes, and snippets.

@shahzore-qureshi
Created March 17, 2014 06:52
Show Gist options
  • Select an option

  • Save shahzore-qureshi/9594974 to your computer and use it in GitHub Desktop.

Select an option

Save shahzore-qureshi/9594974 to your computer and use it in GitHub Desktop.
Recursion Example
public double getMaxFlow()
{
double min;
if (inDiameter < outDiameter)
min = inDiameter;
else
min = outDiameter;
if (next == null)
return min;
else
{
double maxFlow = next.getMaxFlow();
if (maxFlow < min)
return maxFlow;
else
return min;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment