# Maximum of Minimum Pairwise Difference in a Subsequence
## Problem Statement
Given an integer array $a$ of size $n$ and an integer $k$, your task is to find a subsequence of $a$ consisting of exactly $k$ elements. Among all such subsequences, you need to select one where the minimum absolute difference between any two distinct elements in that subsequence is maximized. Return this largest possible minimum absolute difference.
Formally, let $S = \{s_1, s_2, \ldots, s_k\}$ be a subsequence of $a$ of size $k$. We are interested in the value $D_S = \min_{1 \le i < j \le k} |s_i - s_j|$. Your goal is to find $\max_{S} D_S$.
## Input Format
- The first line contains two integers $n$ and $k$ ($1 \le k \le n \le 10^5$).
- The second line contains $n$ integers $a_1, a_2, \ldots, a_n$ ($-10^9 \le a_i \le 10^9$).
## Output Format
Print a single integer, which is the maximum possible minimum absolute difference.
## Sample Test Cases
### Sample Input 1
```
4 3
1 2 3 5
```
### Sample Output 1
```
2
```
### Sample Input 2
```
3 2
5 17 11
```
### Sample Output 2
```
12
```
## Constraints
- $1 \le k \le n \le 10^5$
- $-10^9 \le a_i \le 10^9$
- Time limit: 1 second
- Memory limit: 256 MB
## Explanation
### Sample 1:
Given $a = [1, 2, 3, 5]$ and $k = 3$.
We need to choose $3$ elements such that the minimum absolute difference between any pair of chosen elements is maximized.
Let's consider the possible subsequences of size $3$ and their minimum pairwise differences:
1. Subsequence $[1, 2, 3]$: The pairwise absolute differences are $|1-2|=1$, $|2-3|=1$, $|1-3|=2$. The minimum of these is $1$.
2. Subsequence $[1, 2, 5]$: The pairwise absolute differences are $|1-2|=1$, $|2-5|=3$, $|1-5|=4$. The minimum of these is $1$.
3. Subsequence $[1, 3, 5]$: The pairwise absolute differences are $|1-3|=2$, $|3-5|=2$, $|1-5|=4$. The minimum of these is $2$.
4. Subsequence $[2, 3, 5]$: The pairwise absolute differences are $|2-3|=1$, $|3-5|=2$, $|2-5|=3$. The minimum of these is $1$.
The maximum among these minimum differences is $\max(1, 1, 2, 1) = 2$.
### Sample 2:
Given $a = [5, 17, 11]$ and $k = 2$.
It is often helpful to first sort the input array for problems involving differences, as the order of elements in the original array does not affect the set of values available for a subsequence. The sorted distinct values from $a$ are $[5, 11, 17]$.
We need to choose $2$ elements.
1. Subsequence $\{5, 17\}$: Absolute difference is $|5-17|=12$. Minimum is $12$.
2. Subsequence $\{11, 17\}$: Absolute difference is $|11-17|=6$. Minimum is $6$.
3. Subsequence $\{5, 11\}$: Absolute difference is $|5-11|=6$. Minimum is $6$.
The maximum among these minimum differences is $\max(12, 6, 6) = 12$.
Loading problem statement...