Checking if Strings Can be Made Equal With Operations using Dart GOAT language 🐐.
Intuition\n- All we nned to do is calculate all possible changes we can make.\n\n# Approach\n1. First thing to was think about all combinations possible to swap
# Intuition\n- All we nned to do is calculate all possible changes we can make.\n\n# Approach\n1. First thing to was think about all combinations possible to swap the letters.\n2. After that implemented all possible combinations, if you think that is hard your are wrong because there are only 4 letters in alll given words so possible combinations will be only 2 which is swaping letters in 0 with 2 and 1 with 3. \n3. Next thing to do was only checking one by one if swaped text is equal to another given word.\n\n\n# Code\n```dart []\nclass Solution {\n  bool canBeEqual(String s1, String s2) {\n\n  List<String> splitS1 = s1.split("");\n  List<String> splitS2 = s2.split("");\n\n  if(s1 == s2){\n    return true;\n  }\n\n  List<String> check1 = [];\n  check1.add(splitS1[2]);\n  check1.add(splitS1[1]);\n  check1.add(splitS1[0]);\n  check1.add(splitS1[3]);\n  if(check1.join() == s2){\n    return true;\n  }\n\n\n  List<String> check2 = [];\n  check2.add(splitS1[2]);\n  check2.add(splitS1[3]);\n  check2.add(splitS1[0]);\n  check2.add(splitS1[1]);\n  if(check2.join() == s2){\n    return true;\n  }\n\n\n  List<String> check3 = [];\n  check3.add(splitS1[0]);\n  check3.add(splitS1[3]);\n  check3.add(splitS1[2]);\n  check3.add(splitS1[1]);\n  if(check3.join() == s2){\n    return true;\n  }\n\n  List<String> check4 = [];\n  check4.add(splitS2[2]);\n  check4.add(splitS2[1]);\n  check4.add(splitS2[0]);\n  check4.add(splitS2[3]);\n  if(check4.join() == s1){\n    return true;\n  }\n\n\n  List<String> check5 = [];\n  check5.add(splitS2[2]);\n  check5.add(splitS2[3]);\n  check5.add(splitS2[0]);\n  check5.add(splitS2[1]);\n  if(check5.join() == s1){\n    return true;\n  }\n\n\n  List<String> check6 = [];\n  check6.add(splitS2[0]);\n  check6.add(splitS2[3]);\n  check6.add(splitS2[2]);\n  check6.add(splitS2[1]);\n  if(check6.join() == s1){\n    return true;\n  }\n\n  if(check1.join() == check4.join() || check1.join() == check5.join() || check1.join() == check6.join()){\n    return true;\n  }\n\n  if(check2.join() == check4.join() || check2.join() == check5.join() || check2.join() == check6.join()){\n    return true;\n  }\n\n  if(check3.join() == check4.join() || check3.join() == check5.join() || check3.join() == check6.join()){\n    return true;\n  }\n\n  return false;\n}\n}\n```
['String', 'Dart']