filmov
tv
DSA Interview Question | Anagrams #algorithm #interview #java #coding #programming #dsa #education

Показать описание
# Given two strings s1 and s2, return true if s1 is an anagram of s2, and false otherwise.
### What is anagram?
String s2 can be termed as anagram of s1 if utilizing all the characters of s2 we can form s1.
Input:
s1 = "act", s2 = "cat"
s1 = "acct", s2 = "catt"
Output:
act, cat : true
catt, acct : false
### What is anagram?
String s2 can be termed as anagram of s1 if utilizing all the characters of s2 we can form s1.
Input:
s1 = "act", s2 = "cat"
s1 = "acct", s2 = "catt"
Output:
act, cat : true
catt, acct : false