Tag: validanagram

  • Data Structures & Algorithms in Java – Strings – Valid Anagram

    Problem: Given two strings , check if they are valid anagrams of each other. For example, “anagram” is an anagram of “nagaram”. So return true “cat” is not an anagram of “dog” so return false. Assumptions: All the letters are lowercase English letters. Try out the solution here: https://leetcode.com/problems/valid-anagram/ Solution: Hint: Keep a count of…