Cognex interview question

Hash algorithm to search number of alphabets in a string. prepare const pointer throughly