Comments on: Checking for string permutation https://shlomi-noach.github.io/blog/mysql/checking-for-string-permutation Blog by Shlomi Noach Wed, 28 Jan 2015 16:41:33 +0000 hourly 1 https://wordpress.org/?v=5.3.3 By: Noe Dadon https://shlomi-noach.github.io/blog/mysql/checking-for-string-permutation/comment-page-1#comment-306628 Wed, 28 Jan 2015 16:41:33 +0000 https://shlomi-noach.github.io/blog/?p=1209#comment-306628 A solution made with C# :

static bool checkPerm(string n1,string n2) {

if(n1.Length != n2.Length){
return false;
}

char[] res1 = n1.ToCharArray();
char[] res2 = n2.ToCharArray();
Array.Sort(res1); Array.Sort(res2);
string s1 = new string(res1);string s2 = new string(res2);

if(!s1.Equals(s2)){
return false;
}

return true;

}

]]>
By: SQL: selecting top N records per group | code.openark.org https://shlomi-noach.github.io/blog/mysql/checking-for-string-permutation/comment-page-1#comment-26411 Thu, 06 Jan 2011 14:12:22 +0000 https://shlomi-noach.github.io/blog/?p=1209#comment-26411 […] walking. Examples for string walking (described in the excellent SQL Cookbook) can be found here, here and here. We’ll be using a numbers table: a simple table which lists ascending integer […]

]]>