Check Permutation

5

1 votes
Easy
Problem

Given two strings, check if they are permutations of each other. Return true or false.
Permutation means - length of both the strings should same and should contain same set of characters. Order of characters doesn't matter.
Note : Input strings contain only lowercase english alphabets.
Input format :

Line 1 : String 1
Line 2 : String 2

Sample Input 1 :

abcde
baedc

Sample Output 1 :

true

Sample Input 2 :

abc
cbd

Sample Output 2 :

false

 

Time Limit: 1
Memory Limit: 256
Source Limit:
Editor Image

?