Well, the brute force algorithm will be m * n, where m and n are the sizes of your two arrays.
If you use any tree instead of a linear array, your time falls to m * log2 (n)
Algorithm for this
foreach(key ok in oldkeys)
{
if(!oldKeys.Contains(ok))
{
diff.add(ok);
}
}
foreach(key nk in newkeys)
{
if(!newKeys.Contains(nk))
{
diff.add(nk);
}
}