Created
March 17, 2014 06:52
-
-
Save shahzore-qureshi/9594974 to your computer and use it in GitHub Desktop.
Recursion Example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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