THE SIMPLEST SOLUTION | WITHOUT LOOPS
Complexity
Time complexity: O(1)

Space complexity: O(1)
Code
# Complexity
- Time complexity: $$O(1)$$
<!-- Add your time complexity here, e.g. $$O(n)$$ -->

- Space complexity: $$O(1)$$
<!-- Add your space complexity here, e.g. $$O(n)$$ -->

# Code
```java []
class Solution {
    public boolean canBeEqual(String s1, String s2) {
        return (s1.charAt(0) == s2.charAt(0) || s1.charAt(0) == s2.charAt(2)) &&
                (s1.charAt(2) == s2.charAt(0) || s1.charAt(2) == s2.charAt(2)) &&
                (s1.charAt(1) == s2.charAt(1) || s1.charAt(1) == s2.charAt(3)) &&
                (s1.charAt(3) == s2.charAt(1) || s1.charAt(3) == s2.charAt(3));
    }
}
// If you like it, please upvote)
```

['Java']