EasyTopic: Strings & HashingExpected: O(N) Time • O(1) Space

Valid Anagram Check

Given two strings `s` and `t`, determine whether `t` is an anagram of `s` — that is, whether `t` can be formed by reordering every letter of `s` exactly once, with none left over and none added.

Examples
Input: s = "listen", t = "silent"
Output: true
Input: s = "hello", t = "world"
Output: false
Constraints
  • 1 <= s.length, t.length <= 2 * 10^4
  • s and t consist of lowercase English letters only.
solution.js
JavaScript (ES6+)
Test Execution Results
Input:["listen","silent"]
Expected:true
Your Output:--