Traverse merged [ ] to find Kth smallest element using Linear search .
for ( int j = 0 ; j < n ; j ++ ) { if ( k <= abs ( merged [ j ] . e - merged [ j ] . s + 1 ) ) return ( merged [ j ] . s + k - 1 ) ; k = k - abs ( merged [ j ] . e - merged [ j ] . s + 1 ) ; } if ( k ) return -1 ; }