Anagram || Flipkart Series-7 || Code || Explanation || GFG || Interview asked

Опубликовано: 18 Октябрь 2024
на канале: coding sikho
14
1

Anagram || Flipkart Series-7 || Code || Explanation || GFG || Interview asked


Given two strings a and b consisting of lowercase characters. The task is to check whether two given strings are an anagram of each other or not. An anagram of a string is another string that contains the same characters, only the order of characters can be different. For example, act and tac are an anagram of each other.

Note:-

If the strings are anagrams you have to return True or else return False

|s| represents the length of string s.


Example 1:

Input:a = geeksforgeeks, b = forgeeksgeeks
Output: YES
Explanation: Both the string have same characters with
same frequency. So, both are anagrams.


Follow Me On Social Media

Facebook:-   / mdsaifraza.raza.526  
LinkedIn:- linkedin.com/in/md-saif-raza-99941523a
Twitter:-   / mdsaifr10053951  
Instagram:-   / saif_raza8544