Interview Query

Valid Anagram

Start Timer

0:00:00

Upvote
7
Downvote
Save question
Mark as completed
View comments (17)
Next question

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
.
.
.
.
.


Comments

Loading comments