2
* @param {number[]} nums3
* @param {number} pivot6
var pivotArray = function (nums, pivot) {9
//first Solution with 3 separet Array14
for (let i = 0; i < n; i++) {15
if (nums[i] < pivot) lessPivot.push(nums[i]);16
else if (nums[i] === pivot) equalPivot.push(nums[i]);17
else bigerPivot.push(nums[i]);19
return lessPivot.concat(equalPivot.concat(bigerPivot));21
//second Solution with one Array24
for (let num of nums) {25
if (num < pivot) result.push(num);28
for (let num of nums) {29
if (num === pivot) result.push(num);31
for (let num of nums) {32
if (num > pivot) result.push(num);