Finding the Maximum Element
Iterative and recursive way of finding the maximum among all the node's data.
Iterative Method :
Recursive Method :
Time and Space Complexity :
Time complexity : O(n) Space complexity : O(n)
Contributed by Nitin Ranganath
Last updated