Skip to content

Instantly share code, notes, and snippets.

@DickyT
Created November 27, 2015 00:25
Show Gist options
  • Save DickyT/3665ac4900e0928d2c8e to your computer and use it in GitHub Desktop.
Save DickyT/3665ac4900e0928d2c8e to your computer and use it in GitHub Desktop.
Procedure CountMatches ( test_arr, ref_arr )
INPUT: test_arr, the array use to compare with the reference array
ref_arr, the reference array
OUTPUT: match_array_count, the array length of the overlap between 2 sets
match_array_count = 0
for each each_test_int in test_arr {
for each_ref_int in ref_arr {
if (each_test_int == each_ref_int) }
match_array_count += 1
}
}
}
return match_array_count
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment