Sobes.tech
Intern — Middle

Determining whether two strings are anagrams

livecode

Task condition

It is necessary to implement a function that checks whether the sets of characters in two strings are the same, regardless of their order (example: "abc" and "cab"). using System;

public class Test
{
    // abc
    // acb
    // bac
    // bca
    // cab
    // cba
    public static bool AreAnagrams(string a, string b)
    {

    }
}

    public static void Main(){
    Console.WriteLine(AreAnagrams("abc", "cab"));
    }