C++ minmax O(1)
Intuition\nlook at min and max of each pair and compare\n# Approach\nuse minmax function\n\n# Complexity\n- Time complexity:\nO(1)\n\n- Space complexity:\nO(1)\
# Intuition\nlook at min and max of each pair and compare\n# Approach\nuse minmax function\n\n# Complexity\n- Time complexity:\n$$O(1)$$\n\n- Space complexity:\n$$O(1)$$\n\n# Code\n```cpp []\nclass Solution {\npublic:\n    bool canBeEqual(const string& s1, const string& s2) {\n        return std::minmax(s1[0], s1[2]) == std::minmax(s2[0], s2[2]) &&\n               std::minmax(s1[1], s1[3]) == std::minmax(s2[1], s2[3]);\n    }\n};\n```
['C++']