filmov
tv
Check whether two String are Anagram or Permutable [ Cracking the Coding Interview ] java interview

Показать описание
Download Link -
Two words are said to be permutation or anagrams of each other if the letters from one word can be rearranged to form the other word.
step -1) Sort the two strings's characters.
step -2) Compare the results to see if they're identical.
Time Complexity
The above method is reasonably efficient -
O[n*log n] and, very easy to implement using the
standard Java API.
java interview question - check if two are anagram or Permutation of each other [cracking the coding interview]
Please watch this video on 720p or 1080p for better visibility
Two words are said to be permutation or anagrams of each other if the letters from one word can be rearranged to form the other word.
step -1) Sort the two strings's characters.
step -2) Compare the results to see if they're identical.
Time Complexity
The above method is reasonably efficient -
O[n*log n] and, very easy to implement using the
standard Java API.
java interview question - check if two are anagram or Permutation of each other [cracking the coding interview]
Please watch this video on 720p or 1080p for better visibility