🔥✅✅ Dart Solution 📌📌 || with Explanation 👌👌
Solution
Two-Pointer Technique: We'll use two pointers starting from both ends of the string and move towards the center.
Character Comparison: At each step, we
# Solution

1. **Two-Pointer Technique**: We'll use two pointers starting from both ends of the string and move towards the center.
2. **Character Comparison**: At each step, we compare the characters at both pointers:
    - If they are different, we need to replace one of them to make them match.
    - To ensure lexicographical smallest, we'll always replace the larger character with the smaller one.
3. **Middle Character Handling**: If the string length is odd, the middle character can be left as is since it doesn't affect the palindrome property.

## Time Complexity

- **O(n)**: We process each character in the string exactly once using the two-pointer approach, where n is the length of the string. The comparison and replacement operations are constant time for each character pair.

```dart
class Solution {
  String makeSmallestPalindrome(String s) {
    List<String> chars = s.split('');
    int left = 0;
    int right = s.length - 1;
    while (left < right) {
        if (chars[left] != chars[right]) {
            if (chars[left].compareTo(chars[right]) < 0) {
                chars[right] = chars[left];
            } else {
                chars[left] = chars[right];
            }
        }
        left++;
        right--;
    }
    return chars.join('');
  }
}
```
['Dart']