F# (.NET Core), 117 115 114 111111 108 bytes
115 114 bytes
Another solution with countBy
this time:
let u x=x|>Seq.countBy id|>Seq.filter(fun a->snd a=1)|>Seq.map fst|>set
let f x y=Set.intersect(u x)(u y)|>Seq.max
117 111 bytes
let u x=x|>Seq.filter(fun a->x|>Seq.filter((=)a)|>Seq.length=1)|>set
let f x y=Set.intersect(u x)(u y)|>Seq.max
100% F#! Any help is welcome!
6 byte won thanks to prefix notation!
108 bytes
let f a b=Set.intersect(set a)(set b)|>Seq.filter(fun x->a@b|>Seq.filter(fun y->y=x)|>Seq.length<3)|>Seq.max
@
is the concat function! Thank you @Ayb4btu for this algorithm.