Count pairs in an array with xor less than K
Given an array of N elements count no. of pairs having XOR less than K. How to solve this problem??