Implement a swipe left function that moves numbers to the left and merges equal numbers.
Function Signature:
function swipeLeft(numbers: number[]): number[]
Requirements:
Examples:
Input: [2,2,2,2]
Output: [8,0,0,0]
Explanation:
1. First merge: [4,4,0,0]
2. Second merge: [8,0,0,0]
Input: [0,2,2,0]
Output: [4,0,0,0]
Explanation:
1. Move left: [2,2,0,0]
2. Merge: [4,0,0,0]