Java icon indicating copy to clipboard operation
Java copied to clipboard

Added three more approaches in anagram.java

Open Anshumanshukla46 opened this issue 3 years ago • 1 comments

First approach (5): Here, I have used a HashMap and once the element is found in s frequency have increased by 1 and when found in frequency have decreased by 1. Second approach (6): Here, I have used an array of size 26 where I increase the counter by 1 if found in s and decreased by 1 if found in t. If somehow it went in negative, I simply return false. Third approach (7): Here, I have used an array of size 256 which have the ability to deal with all Unicode characters.

Anshumanshukla46 avatar Oct 03 '22 06:10 Anshumanshukla46

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar Jan 17 '23 00:01 github-actions[bot]

Please reopen this issue once you add more information and updates here. If this is not the case and you need some help, feel free to seek help from our Gitter or ping one of the reviewers. Thank you for your contributions!

github-actions[bot] avatar Jan 25 '23 00:01 github-actions[bot]