LeetCode 1287. Element Appearing More Than 25% In Sorted Array in F#
URL
Code
let findSpecialInteger (arr: int list) : int =
arr
|> List.windowed ((List.length arr / 4) + 1)
|> List.find (fun a -> List.head a = List.last a)
|> List.head