Amazon Interview Question

Given array of versions, sort it