We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents d8eefc0 + 1739fc1 commit ff49956Copy full SHA for ff49956
String_Permutation/question.txt
@@ -0,0 +1 @@
1
+Check if two strings are permutations of each other.
String_Permutation/solution.cpp
@@ -0,0 +1,25 @@
+#include<iostream>
2
+#include<string.h>
3
+#include<algorithm>
4
+using namespace std;
5
+
6
7
+int main()
8
+{
9
+ string a,b;
10
+ cout<<"Enter two strings \n";
11
+ cin>>a>>b;
12
+ sort(a.begin(),a.end());
13
+ sort(b.begin(),b.end());
14
15
+ if(a==b)
16
+ cout<<"These strings are permutations of each other\n";
17
+ else
18
+ cout<<"These strings are NOT permutations of each other\n";
19
20
21
+ return 0;
22
+}
23
24
25
0 commit comments