Skip to content
CampusEduX

Check Anagram

Easyjavapythonccppjavascript

Given two strings, determine whether they contain exactly the same characters with the same frequencies, regardless of order.

Input Format

The first line contains string A. The second line contains string B. Neither string contains spaces.

Output Format

Print 1 if A and B are anagrams, otherwise print 0.

Related Problems

  • Reverse a String
    Easy · java, python, c, cpp, javascript
    Solve Problem
  • Check Palindrome
    Easy · java, python, c, cpp, javascript
    Solve Problem
  • Count Vowels and Consonants
    Easy · java, python, c, cpp, javascript
    Solve Problem

Input (stdin)

Output

Run your code to see output here...