Problems

Valid Anagram

easy
easy
strings
hashmap

Given two strings s and t, return true if t is an anagram of s, and false otherwise.

An anagram is a word formed by rearranging the letters of another, using all the original letters exactly once.

Examples

Example 1

Input: s = "anagram", t = "nagaram"
Output: true

Example 2

Input: s = "rat", t = "car"
Output: false

Example 3

Input: s = "a", t = "ab"
Output: false

Running will execute all 3 cases.