An Anagram is a word or phrase formed by rearranging the letters of a different word or phrase, typically using all the original letters exactly once. Ex:- "code" and "oced" ✔ "heist" and "sheit" ✔ "lane" and "line" ✖ Algorithm:- 1. check both strings are of equal length if yes then proceed to step 2 otherwise print "NO" 2. sort the characters of both strings either in ascending or descending order. 3. Check if both string are equal or not. Java 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 import java.util.Arrays; import java.util...
This blog contains coding/programming and interview questions of MNCs like TCS, Wipro, Infosys, Capgemini, Mindtree, Amazon, Google, Facebook, Flipkart, Cisco, HP, Dell, etc. with placement preparation guides.