☑️ Maximizing Sum Of Array After K Negations. ☑️
Code
# Code
```dart []
class Solution {
  int largestSumAfterKNegations(List<int> nums, int k) {
    while(k!=0){
        k--;
        nums.sort((a, b) => a.compareTo(b));
        for(int i = 0; i < nums.length; i++){
            if(nums[i] < 0){
                nums[i] = -nums[i];
                break;
            }else{
                for(int j = 0; j < nums.length; j++){
                    nums[j] = -nums[j];
                    break;
                }
                break;
            }
        }
        print(nums);
    }

    int sum = 0;
    for(int elem in nums){
        sum+=elem;
    }

    return sum;
  }
}
```
['Array', 'Greedy', 'Sorting', 'Dart']