You only need to compare the elements against one key. By that I mean you pseudocode should be along the lines of



enter value
if value is not in array { // call a method that checks...