common number across arrays three pointer algo