add ruby solution for k-difference