From 2e39dd2b852accb2f0c73ed457441cabc7e7254e Mon Sep 17 00:00:00 2001 From: RryLee Date: Sat, 5 Mar 2016 15:07:30 +0800 Subject: [PATCH] sorting --- Sorting/1-tutorial-intro.cpp | 25 ++++ Sorting/1-tutorial-intro.php | 8 ++ Sorting/10-quicksort4.php | 53 ++++++++ Sorting/11-countingsort1.php | 22 ++++ Sorting/12-countingsort2.php | 24 ++++ Sorting/13-countingsort3.php | 20 +++ Sorting/14-countingsort4.cpp | 38 ++++++ Sorting/14-countingsort4.php | 27 ++++ Sorting/15-closest-numbers.php | 24 ++++ Sorting/16-find-median.php | 9 ++ Sorting/17-sherlock-and-watson.php | 18 +++ Sorting/18-almost-sorted.cpp | 59 +++++++++ Sorting/18-almost-sorted.php | 41 ++++++ Sorting/19-sherlock-and-pairs.php | 27 ++++ Sorting/2-insertionsort1.php | 29 ++++ Sorting/20-insertion-sort.cpp | 68 ++++++++++ Sorting/20-insertion-sort.php | 59 +++++++++ Sorting/3-insertionsort2.php | 26 ++++ Sorting/4-correctness-invariant.php | 25 ++++ Sorting/5-runningtime.php | 27 ++++ Sorting/6-quicksort1.php | 25 ++++ Sorting/7-quicksort2.php | 41 ++++++ Sorting/8-quicksort3.cpp | 50 +++++++ Sorting/8-quicksort3.php | 31 +++++ Sorting/9-bigger-is-greater.cpp | 25 ++++ Sorting/9-bigger-is-greater.php | 48 +++++++ Sorting/a.out | Bin 0 -> 9448 bytes {string => String}/1-pangrams.c | 0 {string => String}/1-pangrams.php | 0 {string => String}/10-palindrome-index.php | 0 .../11-reverse-shuffle-merge.php | 0 .../12-the-love-letter-mystery.cpp | 0 .../12-the-love-letter-mystery.php | 0 {string => String}/13-common-child.cpp | 0 String/14-morgan-and-a-string.php | 29 ++++ String/15-sherlock-and-valid-string.php | 22 ++++ String/16-count-string.php | 3 + String/17-string-function-calculation.cpp | 11 ++ String/17-string-function-calculation.php | 37 ++++++ {string => String}/2-funny-string.cpp | 0 {string => String}/2-funny-string.php | 0 String/22-string-similarity.cpp | 124 ++++++++++++++++++ String/22-string-similarity.php | 28 ++++ .../3-alternating-characters.cpp | 0 .../3-alternating-characters.php | 0 {string => String}/4-game-of-thrones.cpp | 0 {string => String}/4-game-of-thrones.php | 0 {string => String}/5-gem-stones.cpp | 0 {string => String}/5-gem-stones.php | 0 {string => String}/6-make-it-anagram.cpp | 0 {string => String}/6-make-it-anagram.php | 0 {string => String}/7-anagram.cpp | 0 {string => String}/7-anagram.php | 0 {string => String}/8-two-string.cpp | 0 {string => String}/8-two-string.php | 0 .../9-sherlock-and-anagrams.cpp | 0 String/a.out | Bin 0 -> 9112 bytes string/13-common-child | Bin 14104 -> 0 bytes string/a.out | Bin 14208 -> 0 bytes 59 files changed, 1103 insertions(+) create mode 100644 Sorting/1-tutorial-intro.cpp create mode 100644 Sorting/1-tutorial-intro.php create mode 100644 Sorting/10-quicksort4.php create mode 100644 Sorting/11-countingsort1.php create mode 100644 Sorting/12-countingsort2.php create mode 100644 Sorting/13-countingsort3.php create mode 100644 Sorting/14-countingsort4.cpp create mode 100644 Sorting/14-countingsort4.php create mode 100644 Sorting/15-closest-numbers.php create mode 100644 Sorting/16-find-median.php create mode 100644 Sorting/17-sherlock-and-watson.php create mode 100644 Sorting/18-almost-sorted.cpp create mode 100644 Sorting/18-almost-sorted.php create mode 100644 Sorting/19-sherlock-and-pairs.php create mode 100644 Sorting/2-insertionsort1.php create mode 100644 Sorting/20-insertion-sort.cpp create mode 100644 Sorting/20-insertion-sort.php create mode 100644 Sorting/3-insertionsort2.php create mode 100644 Sorting/4-correctness-invariant.php create mode 100644 Sorting/5-runningtime.php create mode 100644 Sorting/6-quicksort1.php create mode 100644 Sorting/7-quicksort2.php create mode 100644 Sorting/8-quicksort3.cpp create mode 100644 Sorting/8-quicksort3.php create mode 100644 Sorting/9-bigger-is-greater.cpp create mode 100644 Sorting/9-bigger-is-greater.php create mode 100755 Sorting/a.out rename {string => String}/1-pangrams.c (100%) rename {string => String}/1-pangrams.php (100%) rename {string => String}/10-palindrome-index.php (100%) rename {string => String}/11-reverse-shuffle-merge.php (100%) rename {string => String}/12-the-love-letter-mystery.cpp (100%) rename {string => String}/12-the-love-letter-mystery.php (100%) rename {string => String}/13-common-child.cpp (100%) create mode 100644 String/14-morgan-and-a-string.php create mode 100644 String/15-sherlock-and-valid-string.php create mode 100644 String/16-count-string.php create mode 100644 String/17-string-function-calculation.cpp create mode 100644 String/17-string-function-calculation.php rename {string => String}/2-funny-string.cpp (100%) rename {string => String}/2-funny-string.php (100%) create mode 100644 String/22-string-similarity.cpp create mode 100644 String/22-string-similarity.php rename {string => String}/3-alternating-characters.cpp (100%) rename {string => String}/3-alternating-characters.php (100%) rename {string => String}/4-game-of-thrones.cpp (100%) rename {string => String}/4-game-of-thrones.php (100%) rename {string => String}/5-gem-stones.cpp (100%) rename {string => String}/5-gem-stones.php (100%) rename {string => String}/6-make-it-anagram.cpp (100%) rename {string => String}/6-make-it-anagram.php (100%) rename {string => String}/7-anagram.cpp (100%) rename {string => String}/7-anagram.php (100%) rename {string => String}/8-two-string.cpp (100%) rename {string => String}/8-two-string.php (100%) rename {string => String}/9-sherlock-and-anagrams.cpp (100%) create mode 100755 String/a.out delete mode 100755 string/13-common-child delete mode 100755 string/a.out diff --git a/Sorting/1-tutorial-intro.cpp b/Sorting/1-tutorial-intro.cpp new file mode 100644 index 0000000..046bae9 --- /dev/null +++ b/Sorting/1-tutorial-intro.cpp @@ -0,0 +1,25 @@ +#include +#include + +using namespace std; + +int main(int argc, char const *argv[]) +{ + int n, V; + cin >> V >> n; + + int temp = 0; + for (int i = 0; i < n; ++i) + { + cin >> temp; + if (temp == V) + { + cout << i << endl; + return 0; + } + } + + cout << -1 << endl; + + return 0; +} diff --git a/Sorting/1-tutorial-intro.php b/Sorting/1-tutorial-intro.php new file mode 100644 index 0000000..4afe4ad --- /dev/null +++ b/Sorting/1-tutorial-intro.php @@ -0,0 +1,8 @@ += 0; $j--) { + if ($val < $arr[$j]) { + $arr[$j + 1] = $arr[$j]; + $arr[$j] = $val; + $times ++; + } else { + break; + } + } + } + + return $times; +} + +function quickSort($arr, $start, $end) { + global $times_2; + + if ($end - $start < 2) + return; + $p = $arr[$end - 1]; + $i = $start; + for ($j=$start; $j < $end; $j++) { + if ($arr[$j] <= $p) { + $temp = $arr[$i]; + $arr[$i] = $arr[$j]; + $arr[$j] = $temp; + $times_2 ++; + $i ++; + } + } + + quickSort($arr, $start, $i - 1); + quickSort($arr, $i, $end); + + return $times_2; +} + +$handle = fopen("php://stdin", "r"); +fscanf($handle, "%d", $t); + +$arr = explode(' ', trim(fgets($handle))); + +global $times_2; +$times_2 = 0; + +echo insertionSort($arr) - quickSort($arr, 0, count($arr)) . PHP_EOL; diff --git a/Sorting/11-countingsort1.php b/Sorting/11-countingsort1.php new file mode 100644 index 0000000..c81b8e1 --- /dev/null +++ b/Sorting/11-countingsort1.php @@ -0,0 +1,22 @@ + $value) { + echo str_repeat("$key ", $value); +} diff --git a/Sorting/13-countingsort3.php b/Sorting/13-countingsort3.php new file mode 100644 index 0000000..0f80424 --- /dev/null +++ b/Sorting/13-countingsort3.php @@ -0,0 +1,20 @@ + +#include +#include + +using namespace std; + +vector a[100]; +string str; +int n, i, j, x; + +int main(int argc, char const *argv[]) +{ + cin >> n; + for (i = 0; i < n / 2; ++i) + { + cin >> x; + cin >> str; + a[x].push_back("-"); + } + + for (; i < n; ++i) + { + cin >> x; + cin >> str; + a[x].push_back(str); + } + + for (i = 0; i < 100; ++i) + { + x = a[i].size(); + for (int j = 0; j < x; ++j) + { + cout << a[i][j] << " "; + } + } + + return 0; +} diff --git a/Sorting/14-countingsort4.php b/Sorting/14-countingsort4.php new file mode 100644 index 0000000..f5aef67 --- /dev/null +++ b/Sorting/14-countingsort4.php @@ -0,0 +1,27 @@ += 0) { + echo $A[$a - $times] . PHP_EOL; + } else { + echo $A[$a - $times + $N] . PHP_EOL; + } +} diff --git a/Sorting/18-almost-sorted.cpp b/Sorting/18-almost-sorted.cpp new file mode 100644 index 0000000..fa00692 --- /dev/null +++ b/Sorting/18-almost-sorted.cpp @@ -0,0 +1,59 @@ +#include +#include +#include + +typedef long long LL; + +using namespace std; + +int main(int argc, char const *argv[]) +{ + LL n; + vector origin, sorted, diff; + cin >> n; + for (LL i = 0; i < n; ++i) { + LL x; + cin >> x; + origin.push_back(x); + sorted.push_back(x); + } + sort(sorted.begin(), sorted.end()); + + for (LL i = 0; i < n; ++i) { + if (origin[i] != sorted[i]) { + diff.push_back(i); + } + } + + LL count = diff.size(); + + if (count == 0) { + cout << "yes" << endl; + return 0; + } + + if (count == 2 && + sorted[diff[0]] == origin[diff[1]] && + sorted[diff[1]] == origin[diff[0]]) { + cout << "yes" << endl << "swap " << diff[0] + 1 << " " << diff.back() + 1; + return 0; + } + + bool reverse = false; + for (LL i = 0; i < count; i ++) { + if (origin[diff[i]] == sorted[diff[count - i - 1]]) { + reverse = true; + } else { + reverse = false; + break; + } + } + + if (reverse) { + cout << "yes" << endl << "reverse " << diff[0] + 1 << " " << diff.back() + 1; + } else { + cout << "no" << endl; + } + + return 0; +} diff --git a/Sorting/18-almost-sorted.php b/Sorting/18-almost-sorted.php new file mode 100644 index 0000000..6ca52cd --- /dev/null +++ b/Sorting/18-almost-sorted.php @@ -0,0 +1,41 @@ + 2) { + $reverse = false; + for ($i=0; $i < $count; $i++) { + if ($sorted[$diff[$i]] == $origin[$diff[$count - 1 - $i]]) { + $reverse = true; + } else { + $reverse = false; + break; + } + } + if ($reverse) { + printf("yes\nreverse %d %d\n", $diff[0] + 1, $diff[$count - 1] + 1); + } else { + echo "no\n"; + } +} diff --git a/Sorting/19-sherlock-and-pairs.php b/Sorting/19-sherlock-and-pairs.php new file mode 100644 index 0000000..22e4c36 --- /dev/null +++ b/Sorting/19-sherlock-and-pairs.php @@ -0,0 +1,27 @@ += 0; $i--) { + if ($arr[$i] > $last) { + $arr[$i + 1] = $arr[$i]; + echo implode(' ', $arr) . PHP_EOL; + } else { + $arr[$i + 1] = $last; + echo implode(' ', $arr) . PHP_EOL; + break; + } + + if ($i == 0) { + $arr[0] = $last; + echo implode(' ', $arr) . PHP_EOL; + } + } +} + +$handle = fopen("php://stdin", "r"); +fscanf($handle, "%d", $m); +$ar = explode(' ', trim(fgets($handle))); + +insertSort($ar); diff --git a/Sorting/20-insertion-sort.cpp b/Sorting/20-insertion-sort.cpp new file mode 100644 index 0000000..5057a89 --- /dev/null +++ b/Sorting/20-insertion-sort.cpp @@ -0,0 +1,68 @@ +/* Enter your code here. Read input from STDIN. Print output to STDOUT */ +#include +#include +#include +#include + +using namespace std ; + +long long cnt=0 ; + +void merge(int a[],int p,int q,int r) +{ + int l1[q-p+1] ; + int r1[r-q] ; + int n1=q-p+1 ; + int n2=r-q ; + int pos1=0,pos2=0 ; + for(int i=p;i<=q;i++) + l1[pos1++]=a[i] ; + for(int i=q+1;i<=r;i++) + r1[pos2++]=a[i] ; + int size=pos1 ; + int pos3=p ; + pos1=pos2=0 ; + while(pos1r1[pos2]){ + cnt+=size-pos1 ; + a[pos3++]=r1[pos2++] ; + }else + a[pos3++]=l1[pos1++] ; + } + if(pos1>=n1){ + while(pos2= 0; $j--) { + if ($temp < $arr[$j]) { + $arr[$j + 1] = $arr[$j]; + $arr[$j] = $temp; + } else { + break; + } + } + + echo implode(" ", $arr) . PHP_EOL; + } +} diff --git a/Sorting/4-correctness-invariant.php b/Sorting/4-correctness-invariant.php new file mode 100644 index 0000000..1291121 --- /dev/null +++ b/Sorting/4-correctness-invariant.php @@ -0,0 +1,25 @@ += 0; $j--) { + if ($val < $arr[$j]) { + $arr[$j + 1] = $arr[$j]; + $arr[$j] = $val; + } else { + break; + } + } + } +} + +$handle = fopen ("php://stdin","r"); +$t = fgets($handle); +$arr = split(' ', fgets($handle)); + +insertionSort($arr); + +foreach($arr as $value) { + print $value." "; +} diff --git a/Sorting/5-runningtime.php b/Sorting/5-runningtime.php new file mode 100644 index 0000000..b84311d --- /dev/null +++ b/Sorting/5-runningtime.php @@ -0,0 +1,27 @@ += 0; $j--) { + if ($val < $arr[$j]) { + $arr[$j + 1] = $arr[$j]; + $arr[$j] = $val; + + $times ++; + } else { + break; + } + } + } + + echo $times . PHP_EOL; +} + +$handle = fopen ("php://stdin","r"); +$t = fgets($handle); +$arr = split(' ', fgets($handle)); + +insertionSort($arr); diff --git a/Sorting/6-quicksort1.php b/Sorting/6-quicksort1.php new file mode 100644 index 0000000..338b26f --- /dev/null +++ b/Sorting/6-quicksort1.php @@ -0,0 +1,25 @@ += $equal) { + $right[] = $ar[$i]; + } else { + $left[] = $ar[$i]; + } + } + + echo implode(' ', array_merge($left, $right)) . PHP_EOL; +} + +$fp = fopen("php://stdin", "r"); + +fscanf($fp, "%d", $m); +$ar = explode(' ', trim(fgets($fp))); + +partition($ar); diff --git a/Sorting/7-quicksort2.php b/Sorting/7-quicksort2.php new file mode 100644 index 0000000..f14fa6c --- /dev/null +++ b/Sorting/7-quicksort2.php @@ -0,0 +1,41 @@ + $arr[$i]) + $left[] = $arr[$i]; + else + $right[] = $arr[$i]; + } + + if (count($left) > 1) { + $left = quickSort($left); + echo implode(' ', $left) . PHP_EOL; + } + + if (count($right) > 1) { + $right = quickSort($right); + echo implode(' ', $right) . PHP_EOL; + } + + return array_merge($left, [$temp], $right); +} + +$fp = fopen("php://stdin", "r"); + +fscanf($fp, "%d", $m); + +$ar = explode(' ', trim(fgets($fp))); + +$results = quickSort($ar); + +echo implode(' ', $results) . PHP_EOL; diff --git a/Sorting/8-quicksort3.cpp b/Sorting/8-quicksort3.cpp new file mode 100644 index 0000000..beb1005 --- /dev/null +++ b/Sorting/8-quicksort3.cpp @@ -0,0 +1,50 @@ +#include +#include +#include +#include +#include +using namespace std; + +void quicksort(vector &vec, int startIndex, int pivotIndex) +{ + int pivot, index, isgreater; + int arraySize = pivotIndex - startIndex; + pivot = vec[pivotIndex]; + + if (arraySize > 0) { + index = startIndex; + isgreater = 0; + for(int i=startIndex;i vec; + cin >> size; + for(int i = 0; i> dummy; + vec.push_back(dummy); + } + quicksort(vec, 0, size-1); + return 0; +} diff --git a/Sorting/8-quicksort3.php b/Sorting/8-quicksort3.php new file mode 100644 index 0000000..0a06715 --- /dev/null +++ b/Sorting/8-quicksort3.php @@ -0,0 +1,31 @@ + $input[$i]) { + $tmp = $input[$i]; + $input[$i] = $input[$firstHigh]; + $input[$firstHigh++] = $tmp; + } + } + $input[$end] = $input[$firstHigh]; + $input[$firstHigh] = $p; + echo implode(' ', $input) . PHP_EOL; + return $firstHigh; +} diff --git a/Sorting/9-bigger-is-greater.cpp b/Sorting/9-bigger-is-greater.cpp new file mode 100644 index 0000000..59e5ae4 --- /dev/null +++ b/Sorting/9-bigger-is-greater.cpp @@ -0,0 +1,25 @@ +#include +#include + +using namespace std; + +int main(int argc, char const *argv[]) +{ + int T; + cin >> T; + while (T --) { + string s; + cin >> s; + string prev = s; + if (next_permutation(s.begin(), s.end())) + { + cout << s << endl; + } + else + { + cout << "no answer" << endl; + } + } + + return 0; +} diff --git a/Sorting/9-bigger-is-greater.php b/Sorting/9-bigger-is-greater.php new file mode 100644 index 0000000..76cc437 --- /dev/null +++ b/Sorting/9-bigger-is-greater.php @@ -0,0 +1,48 @@ + 0 && $str[$i - 1] >= $str[$i]) { + $i --; + } + + // no nect permutation. + if ($i <= 0) return false; + + // search right greater pivot. + $j = $length - 1; + while ($str[$j] <= $str[$i - 1]) { + $j --; + } + + // change pivot and right. + $temp = $str[$i - 1]; + $str[$i - 1] = $str[$j]; + $str[$j] = $temp; + + // reverse. + $j = $length - 1; + while ($i < $j) { + $temp = $str[$i]; + $str[$i] = $str[$j]; + $str[$j] = $temp; + $i ++; + $j --; + } + + return true; +} diff --git a/Sorting/a.out b/Sorting/a.out new file mode 100755 index 0000000000000000000000000000000000000000..73437492e9355191c5f87fcc3b034e4363136d2e GIT binary patch literal 9448 zcmcIpeQaCR6~DHVHlfr>OADbLU`7imEG9|QEQ}58q;6kO+Ga^wI-tBbw$m6AJF=g< zw5Sl2mSJUuiValurAnJ7v_D2S4b=6I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^1U?9l8Cyf6@9ZR{pRGG=E^rw3q)c9h!<- literal 0 HcmV?d00001 diff --git a/string/1-pangrams.c b/String/1-pangrams.c similarity index 100% rename from string/1-pangrams.c rename to String/1-pangrams.c diff --git a/string/1-pangrams.php b/String/1-pangrams.php similarity index 100% rename from string/1-pangrams.php rename to String/1-pangrams.php diff --git a/string/10-palindrome-index.php b/String/10-palindrome-index.php similarity index 100% rename from string/10-palindrome-index.php rename to String/10-palindrome-index.php diff --git a/string/11-reverse-shuffle-merge.php b/String/11-reverse-shuffle-merge.php similarity index 100% rename from string/11-reverse-shuffle-merge.php rename to String/11-reverse-shuffle-merge.php diff --git a/string/12-the-love-letter-mystery.cpp b/String/12-the-love-letter-mystery.cpp similarity index 100% rename from string/12-the-love-letter-mystery.cpp rename to String/12-the-love-letter-mystery.cpp diff --git a/string/12-the-love-letter-mystery.php b/String/12-the-love-letter-mystery.php similarity index 100% rename from string/12-the-love-letter-mystery.php rename to String/12-the-love-letter-mystery.php diff --git a/string/13-common-child.cpp b/String/13-common-child.cpp similarity index 100% rename from string/13-common-child.cpp rename to String/13-common-child.cpp diff --git a/String/14-morgan-and-a-string.php b/String/14-morgan-and-a-string.php new file mode 100644 index 0000000..6cbfa50 --- /dev/null +++ b/String/14-morgan-and-a-string.php @@ -0,0 +1,29 @@ + +#include + +using namespace std; + +int main(int argc, char const *argv[]) +{ + // + + return 0; +} diff --git a/String/17-string-function-calculation.php b/String/17-string-function-calculation.php new file mode 100644 index 0000000..f00623d --- /dev/null +++ b/String/17-string-function-calculation.php @@ -0,0 +1,37 @@ + 1 && $current[0] == $current[1]) { + while (($pos = strpos($str, $current, $start)) !== false) { + $count ++; + $start = $pos + 1; + } + } else { + $count = substr_count($str, $current); + } + + if (($count * $i) > $max) { + $max = $count * $i; + } + } + } +} + +echo $max . PHP_EOL; diff --git a/string/2-funny-string.cpp b/String/2-funny-string.cpp similarity index 100% rename from string/2-funny-string.cpp rename to String/2-funny-string.cpp diff --git a/string/2-funny-string.php b/String/2-funny-string.php similarity index 100% rename from string/2-funny-string.php rename to String/2-funny-string.php diff --git a/String/22-string-similarity.cpp b/String/22-string-similarity.cpp new file mode 100644 index 0000000..6acefd1 --- /dev/null +++ b/String/22-string-similarity.cpp @@ -0,0 +1,124 @@ +#include +#include + +using namespace std; + +typedef long int l; + +long int z_func(const string &s) +{ + l sum = 0; + l length = s.length(); + l Z[length] = {0}; + l left = 0; + l right = 0; + for (l k = 1; k < length; ++k) + { + if (k > right) { + left = right = k; + while (right < length && s[right] == s[right - left]) { + right ++; + } + Z[k] = right - left; + right --; + } else { + int k1 = k - left; + if (Z[k1] < right - k + 1) { + Z[k] = Z[k1]; + } else { + left = k; + while (right < length && s[right] == s[right - left]) { + right ++; + } + Z[k] = right - left; + right --; + } + } + } + + for (l i = 0; i < length; ++i) + { + sum += Z[i]; + } + + return sum; +} + +int main(int argc, char const *argv[]) +{ + int T; + cin >> T; + while (T --) { + string s; + cin >> s; + l res = z_func(s); + + cout << s.length() + res << endl; + } + + return 0; +} + + +// timeout ... +// #include +// #include + +// using namespace std; + +// long int match(const string &str1, const string &str2) +// { +// if (str1.empty() || str2.empty()) { +// return 0; +// } +// long int length = str2.length(); + +// int maxSubstr = 0; +// for (long int i = 0; i < length; ++i) +// { +// if (str2[i] == str1[i]) +// maxSubstr ++; +// else +// break; +// } + +// return maxSubstr; +// } + +// long int stringSimilarity(string s) +// { +// // soso. +// long int length = s.length(); +// long int index[length]; +// long int i = 0; +// long int c= 0; +// long int count= 0; +// while (s[i] != '\0') { +// if (s[i] == s[0]) { +// index[c] = i; +// c ++; +// } +// i ++; +// } + +// for (i = 0; i < c; ++i) +// { +// string s1 = s.substr(index[i], length); +// count += match(s, s1); +// } + +// return count; +// } + +// int main(int argc, char const *argv[]) +// { +// int T; +// cin >> T; +// while (T --) { +// string s; +// cin >> s; +// cout << stringSimilarity(s) << endl; +// } + +// return 0; +// } diff --git a/String/22-string-similarity.php b/String/22-string-similarity.php new file mode 100644 index 0000000..6b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1C`-h?TOG zvvp_|=YT2C?1=tfQ`q~^qqvchxoiSsMW(#Y%5&Y)K2{Pso)OAmQ@Ytvsf=gSas;zX ziE=B?OoM2x3yG5-k0i3+#lh#ixFgnQPLey~B-F9fT2`td`u+T08Qu4=B^UR9KBw~k z`}n@c^^mQdz6ycvSlG4{@p+d2pXS#%Gv0SuZbHHC&*xrK2i(ktnmheFfnUX)jO(9v z2bJZt2Kb&=tAxX_Xse$V{-j`F5jUW%qKiL*_BRY(Sn#%rs z&Y#x)ON}4*|Csh~2Pfit_XX`gt57R1Kxa^{pZ%W#Mq@(lBjS6*aSd?)Ev?m7E)&n= zvHSD=;*|EEvKyo9(=zj)I{f+E6Qo56`p7Y1>}P3(_!$cJ`Z=%Cq7w_8UtoK^ELapL zwLgEu`Cb#$j!t`)ng2@r^ZXV6|E&Exi#1sV_G9>W4u8HU9oPOXj{fufvHvUzUOe;; z5b=4H|4;24FQ@-2@TtYa{(KIup`akAy;FVzHq=D+=lhNCQ~JLJUs@{c&-b``?SE1C zpVueX&;5GWQ9s}J7N}Dowzs5`%=r6I*xO&c7wQW7*->-$V}8Zq&-cfE?a%GxFzm!9bl?WWJ_`fJ!wD;=V$o7cYG h|0D$lUDgx#Wt6Fn+<)GGXqi{4e@Yu1bts+n{|8#mbv6J1 literal 0 HcmV?d00001 diff --git a/string/13-common-child b/string/13-common-child deleted file mode 100755 index 1f2b901e141af180d281d4f83c73823adb731071..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 14104 zcmeHOdvH|Oc|W@=ka(>YjBO0WS}1nFuGU&1upFoHt{!lgE}$ZTsbhS#+Fj5FX;;xTG`bXgYn+>7?Y3)TQazNQOa#b{gUMK^-Tdu9MjXKSb?SwE^9 z{W^r*4!aK=@jfD~g?jg%+WF!y?Xt`glgta(cf9J&N;_CYKQ0Cj6Camn9;8 zNkw(peLbK}e)Imo-WLFuOsf!pXwrgmiqle#y>-6`dr;T*A&bktg}SB6)^!n$#lUd+(*Ox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;}n1`u5=~*S~FXunHzf1X_SYzlvB_~dUHRBd6`ybc)wCVr= diff --git a/string/a.out b/string/a.out deleted file mode 100755 index baf813f93d2962b48bda656f7c204796a15aa792..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 14208 zcmeHOeQ;FQb-%l-FF>po1#FB7S`(9E7_GIEz`{)J)yIk_M|>1XHu=C$%kF}hIil&+6^dZfYl!|8!yBx#xG!IrsD3uXpsP!OnK4!y!00#a)89$t3{^nNJ}yw@X%G zO=6J&QX%3uOFr*eAp5R<7Xg8x16LUs%kv=Ba3ME;+Ol;^P` zcter$G!~KHSwx;1v`{(!vWT5yMauuBdkfW+Xep!QgIS4KN-H>xrZ>6b%h@bnD%9da!FVDl$L& zR?gnIL)XK@!+yWN-c*NnEPkL+CS4)QDOd2%tQi{)QZ;sbsp~VVZtjo94;X#2$-0b& za4as{V+eJh-xy{&EiHl`w6@3{`fhYbk$QJE>Rp@kZoeKxZ%~tm6DdQsAazts#)|0{ zEsJbz47LN|u%4u`<`;TT{DD|Jf&rFH4Mb@qhItTT{Dlwd;l6|V{!pwRV$W><@h<(zcNf84iSd}&zrlxczB6`%uh@sNOg))m0kxc z%VV*nv||5@!cwbZi)aOSH7D<)DM{J`5&!<=L9D=K;ulK(PiFoKF_(B(@y2c6!V>Eg z*OmTEO)sg*HCjQE=lO(|b9(2|inK!4#U^ z)Pkhhb!~W7)dUbDzK;^Kld}lx?j)YNG9RJauXIwB%P2 zPhFWElYBMt)P>oHB)^z=>bmTpxie)HPWl`4@<%F3C=R0$|;F;;Ct~li>aDbfkZFzm|Se z8~Nq*uI`SB%q34iXcOmpC7HNf84y!9Lhr-42U)|_`~~!K#@-`^ z*-Lw~N1#LTF74RW<0xVJ#}5M0(m$Z?iD;uG>(&F+(!nWzMmrfit)(ZX+R;*oXDEKB z83%sxYzCE?iV=`LZ>C?=(yvb4mlK(o`qA~-*>v#KXzxY$Je)E1lH#~VwY3)3aY-8$qdm}lNgFxu(9XT-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