We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3ec3122 commit b677cefCopy full SHA for b677cef
challenges/easy/find-missing-number/solutions/fdb86/main.fs
@@ -0,0 +1,14 @@
1
+module FindMissingNumber =
2
+
3
+ let findMissing values=
4
+ let minList, maxList = (List.min values, List.max values)
5
+ let newValues = [ minList .. maxList ]
6
+ let missing = List.sum newValues - List.sum values
7
+ missing
8
9
10
11
+ let origList = [230; 222; 220; 224; 229; 221; 225; 223; 228; 226]
12
13
14
+ printfn $"The missing number is: {findMissing origList}"
0 commit comments