Suggestions needed for optimizing O(n^2) algorithm Suggestions needed for optimizing O(n^2) algorithm hadoop hadoop