get all words ( say from a database);
Filter all 4 letter words, convert to upper case & fill an array (say about 10000 elements)
- the above could be done by Len function for Strings

Get the Ascii value of each letter and deduct 64 (or the number which makes the value 1 for A, 2 For B and so on) and add the 4 Ascii values in a loop and check whether the value = 20
If so put that to another array

Srinika