Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

gfg placement course

// for 2 strings s1 and s2 to be anagrams
// both conditions should be True
// 1 their length is same or 
len(s1)==len(s2)
// 2 rearranging chars alphabetically make them equal or 
sorted(s1)==sorted(s2)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #gfg #placement
ADD COMMENT
Topic
Name
2+2 =