Interview Query

Valid Anagram

0
Have you seen this question before?

Given two strings, write a function to return True if the strings are anagrams of each other and False if they are not.

Note: A word is not an anagram of itself.

Example 1:

Input:

string_1 = "listen"
string_2 = "silent"

Output:

True

Example 2:

Input:

string_1 = "banana"
string_2 = "bandana"

Output:

False
Next question: Youtube Recommendations
.....
Python 3.9.6
Loading editor
Use Shift + Enter to run code