✅ One Line Solution
(Disclaimer: this is not an example to follow in a real project - it is written for fun and training mostly)Code #1.1Time complexity: O(n). Space complexity: O(
(Disclaimer: this is not an example to follow in a real project - it is written for fun and training mostly)

# Code #1.1
Time complexity: $$O(n)$$. Space complexity: $$O(1)$$.
```python3
class Solution:
    def areAlmostEqual(self, s: str, t: str) -> bool:
        return sum(map(ne,s,t))<3 and Counter(s)==Counter(t)
```
[Ref](https://leetcode.com/problems/check-if-one-string-swap-can-make-strings-equal/solutions/6376479/one-line-solution)

# Code #1.2
Time complexity: $$O(n*log(n))$$. Space complexity: $$O(n)$$.
```python3
class Solution:
    def areAlmostEqual(self, s: str, t: str) -> bool:
        return sum(map(ne,s,t))<3*(sorted(s)==sorted(t))
```

# Code #2.1
Time complexity: $$O(n)$$. Space complexity: $$O(n)$$.
```python3
class Solution:
    def areAlmostEqual(self, s: str, t: str) -> bool:
        return len(q:=[p for p in zip(s,t) if ne(*p)])==2 and q[0]==q[1][::-1] or q==[]
```

# Code #2.2
Time complexity: $$O(n)$$. Space complexity: $$O(n)$$.
```python3
class Solution:
    def areAlmostEqual(self, s: str, t: str) -> bool:
        return len(q:=[p for p in zip(s,t) if ne(*p)])==2 and {*q[0]}=={*q[1]} or s==t
```

(Disclaimer 2: code above is just a product of fantasy packed into one line, it is not claimed to be 'true' oneliners - please, remind about drawbacks only if you know how to make it better)
['Hash Table', 'String', 'Sorting', 'Counting', 'Python', 'Python3']