Created
April 14, 2016 22:09
-
-
Save pjrt/39b002e86514e6581b0269ad7181f912 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
findLowest :: [Int] -> [Int] -> Int | |
findLowest as bs = findLowest' (sort as) (sort bs) | |
where | |
findLowest' _ [] = -1 | |
findLowest' [] _ = -1 | |
findLowest' (a:ta) (b:tb) | |
| a == b = a | |
| b < a = findLowest' (a:ta) (tb) | |
| otherwise = findLowest' ta (b:tb) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment