JavaScript Solution - Two Pointers Approach
\nvar getStrongest = function(arr, k) {\n    const n = arr.length;\n    \n    arr.sort((a, b) => a - b);\n    \n    let left = 0;\n    let right = n - 1;\n    \
```\nvar getStrongest = function(arr, k) {\n    const n = arr.length;\n    \n    arr.sort((a, b) => a - b);\n    \n    let left = 0;\n    let right = n - 1;\n    \n    const idx = Math.floor((n - 1) / 2);\n    const median = arr[idx];\n    \n    const res = [];\n    \n    while (k > 0) {\n        const leftNum = arr[left];\n        const rightNum = arr[right];\n        \n        const leftStr = Math.abs(leftNum - median);\n        const rightStr = Math.abs(rightNum - median);\n        \n        if ((leftStr > rightStr) || (leftStr === rightStr && leftNum > rightNum)) {\n            res.push(leftNum);\n            left++;\n        }\n        else {\n            res.push(rightNum);\n            right--;\n        }\n        k--;\n    }\n    \n    return res;\n};\n```
['Two Pointers', 'JavaScript']