Created
February 2, 2015 02:22
-
-
Save kalda341/1815d07cb4c1d012f0a8 to your computer and use it in GitHub Desktop.
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
def find_min(head): | |
if head.get_next: | |
next_min = head.get_next() | |
return head.value if head.value < next_min else next_min | |
return head.value |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment