title: Sorting an integer array which contains a range of elements k
body: <p>I am looking for a solution where we have a range of elements k say [1-4] in an integer array say [1,2,1,3,4,2,1,3,2,3,1,4,2] like this and they need to be sorted with a minimum time complexity in Core Java.</p>
  
  <p>Can someone please help me solve this with minimum time complexity.</p>