आसान 0 हल किए गए 0% स्वीकृति

Anagram Check

Check whether two phrases use the same letters.

Two phrases are anagrams if they contain exactly the same letters the same number of times, ignoring case, spaces and punctuation.

Implement is_anagram(first, second).

Input

first: The first phrase. second: The second phrase.

Output

Return true if the phrases are anagrams.

सीमाएँ

0 ≤ length of each ≤ 10,000 (ASCII)

उदाहरण

उदाहरण 1
इनपुट:
first = "Listen"
second = "Silent"

अपेक्षित आउटपुट:
expected = True
इनपुट:
std::string first = "Listen";
std::string second = "Silent";

अपेक्षित आउटपुट:
bool expected = true;
इनपुट:
string first = "Listen";
string second = "Silent";

अपेक्षित आउटपुट:
bool expected = true;

व्याख्या

Both use e, i, l, n, s, t once each.

उदाहरण 2
इनपुट:
first = "apple"
second = "paddle"

अपेक्षित आउटपुट:
expected = False
इनपुट:
std::string first = "apple";
std::string second = "paddle";

अपेक्षित आउटपुट:
bool expected = false;
इनपुट:
string first = "apple";
string second = "paddle";

अपेक्षित आउटपुट:
bool expected = false;

व्याख्या

The letters and counts differ.

संदर्भ

यह चुनौती CodeUtility के लिए अनुकूलित की गई है। ऊपर दिए गए स्टेटमेंट और सीमाओं का पालन करें।

दूसरों से सीखें

समुदाय समाधान

अभी तक कोई प्रकाशित समाधान नहीं। पहला साझा करने के लिए इस चुनौती को हल करें।