From 3cf6d32c38f00af6145025f06412359425ec9ca8 Mon Sep 17 00:00:00 2001 From: Azad Kshitij Date: Sun, 4 Oct 2020 23:47:49 +0530 Subject: [PATCH 1/4] Add QuickShort Algorithm in python with example --- .vscode/settings.json | 3 ++ Arrays/games.0.3.1.py | 3 +- python/NumberToEnglish.py | 24 +++++++++----- python/quickShort.py | 33 +++++++++++++++++++ ...rt.py.4f5666e2839771263be1c3d6d4af6366.tmp | 32 ++++++++++++++++++ 5 files changed, 86 insertions(+), 9 deletions(-) create mode 100644 .vscode/settings.json create mode 100644 python/quickShort.py create mode 100644 python/quickShort.py.4f5666e2839771263be1c3d6d4af6366.tmp diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..6809c20 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "python.pythonPath": "C:\\Users\\azadk\\AppData\\Local\\Programs\\Python\\Python38-32\\python.exe" +} \ No newline at end of file diff --git a/Arrays/games.0.3.1.py b/Arrays/games.0.3.1.py index 96ac900..123bc3b 100644 --- a/Arrays/games.0.3.1.py +++ b/Arrays/games.0.3.1.py @@ -35,7 +35,8 @@ print("Enter the number of points you want play for: ") points = int(input()) while player_score < points and computer_score < points: - print(f"computer score = {computer_score}\t {player1} score = {player_score}") + print( + f"computer score = {computer_score}\t {player1} score = {player_score}") print("Rock 👊\n") print("Paper 🤚\n") print("Scissor ✌\n") diff --git a/python/NumberToEnglish.py b/python/NumberToEnglish.py index 3efbad0..bb7f5fe 100644 --- a/python/NumberToEnglish.py +++ b/python/NumberToEnglish.py @@ -28,10 +28,14 @@ def NumToEnglish(num): num = str(num) resulted_string = "" - initial_dict = {0: "zero", 1: "one", 2: "two", 3: "three", 4: "four", 5: "five", 6: "six", 7: "seven", 8: "eight", - 9: "nine", 10: "ten", 11: "eleven", 12: "twelve", 13: "thirteen", 14: "fourteen", 15: "fifteen", - 16: "sixteen", 17: "seventeen", 18: "eighteen", 19: "nineteen", 20: "twenty", 30: "thirty", - 40: "forty", 50: "fifty", 60: "sixty", 70: "seventy", 80: "eighty", 90: "ninety", 100: "hundred"} + initial_dict = {0: "zero", 1: "one", 2: "two", 3: "three", + 4: "four", 5: "five", 6: "six", 7: "seven", 8: "eight", + 9: "nine", 10: "ten", 11: "eleven", 12: "twelve", + 13: "thirteen", 14: "fourteen", 15: "fifteen", + 16: "sixteen", 17: "seventeen", 18: "eighteen", + 19: "nineteen", 20: "twenty", 30: "thirty", + 40: "forty", 50: "fifty", 60: "sixty", 70: "seventy", + 80: "eighty", 90: "ninety", 100: "hundred"} if int(num) in initial_dict.keys(): return initial_dict.get(int(num)) @@ -40,14 +44,18 @@ def NumToEnglish(num): for i in range(length_of_number): if i == 0 and int(num[i]) > 0: - resulted_string = str(initial_dict.get(int(num[i]))) + " " + str(initial_dict.get(100)) + resulted_string = str(initial_dict.get( + int(num[i]))) + " " + str(initial_dict.get(100)) elif i == 1 and int(num[1]) == 1: - resulted_string = resulted_string + " " + str(initial_dict.get(int(num[1:3]))) + resulted_string = resulted_string + " " + \ + str(initial_dict.get(int(num[1:3]))) elif i == 1 and int(num[1]) > 1: - resulted_string = resulted_string + " " + str(initial_dict.get(int(num[1]) * 10)) + resulted_string = resulted_string + " " + \ + str(initial_dict.get(int(num[1]) * 10)) elif i == 2 and int(num[1]) != 1 and int(num[i]) > 0: print(num[1]) - resulted_string = resulted_string + " " + str(initial_dict.get(int(num[i]))) + resulted_string = resulted_string + " " + \ + str(initial_dict.get(int(num[i]))) return resulted_string.strip() diff --git a/python/quickShort.py b/python/quickShort.py new file mode 100644 index 0000000..eee49ca --- /dev/null +++ b/python/quickShort.py @@ -0,0 +1,33 @@ +''' +The way this algorithm works is +first we define a pivot point as a reference we can use any point as a +reference but here we are using last value from our input list + +and then we make two list namesd as lower and heigher and we append value +respective to the pivot point to the respective list + +and we done the same process over and over again till the condition breaks +''' + +def quick_short(List): + length = len(List) + lower = [] + heigher = [] + if length <= 1: + return List + else: + pivot = List.pop() + for i in List: + if i >= pivot: + heigher.append(i) + else: + lower.append(i) + return quick_short(lower) + [pivot] + quick_short(heigher) + + +x = quick_short([ +89,399,757,257,372,553,241,216,48,355,41,34,798,470,751,285,288,768,563,2,638,113,153,394,500,715,495,217,578,625,628,27,345,329,579,677,331,211,354,646,715,595,784,552,515,226,598,533,508,332,515,789,521,261,117,415,712,604,93,144,595,38,423,798,165,472,573,771,312,330,92,731,775,579,140,329,530,439,276,166,395,233,41,314,141,201,688,383,763,606,87,672,207,564,687,285,24,216,394,675,652,302,33,786,540,173,664,624,58,190,792,43,178,212,557,231,389,641,586,504,301,92,573,126,85,678,27,480,765,637,255,193,300,693,74,16,146,479,54,87,503,215,161,208,673,83,180,520,591,786,559,486,12,474,174,310,359,463,185,402,610,324,720,237,364,386,609,411,303,549,618,360,23,620,466,477,41,505,337,701,537,631,251,701,422,697,408,482,338,724,591,94,253,449,381,584,6,531,4,689,183,399,44,473,716,59,661,443,592,422,428,37,770,107,689,783,215,558,159,263,80,35,275,404,111,580,230,700,97,611,329,766,117,693,560,98,339,217,316,783,396,774,423,769,618,486,207,50,324,596,778,712,301,565,26,122,327,724,538,392,56,428,550,172,314,195,778,258,768,130,687,754,67,634,375,749,780,505,175,694,183,514,250,16,784,27,684,620,269,190,782,300,554,578,670,509,480,230,444,336,136,23,659,46,261,273,570,393,240,380,340,224,745,308,361,43,444,179,293,244,50,349,52,346,102,520,160,57,40,733,169,761,280,284,603,422,666,52,531,779,110,181,79,76,401,385,334,628,528,553,507,420,739,402,333,552,588,8,57,248,767,199,195,626,198,312,21,121,127,430,668,387,243,85,452,336,104,538,174,707,130,239,592,41,73,334,293,396,88,264,602,86,11,94,357,445,336,724,623,614,531,585,144,469,710,326,581,152,239,189,727,54,736,697,574,1,130,291,177,761,270,490,528,54,671,435,115,635,595,526,253,375,37,622,180,271,4,35,763,473,721,92,413,464,230,524,644,412,77,111,92,1,686,747,525,150,128,298,160,177,514,669,742,532,730,734,171,711,762,682,49,484,700,152,128,449,704,749,384,208,323,429,565,510,10,157,794,180,416,436,481,670,663,268,183,585,645,714,239,536,475,388,22,35,95,30,537,577,784,790,603,3,409,213,192,468,326,521,42,574,21,717,276,689,787,316,118,520,779,356,583,47,593,618,371,142,119,360,487,357,647,376,774,623,263,720,211,242,708,3,383,274,388,652,306,484,356,378,621,239,710,131,741,686,321,25,57,475,724,394,76,114,308,92,197,220,99,756,185,621,229,276,571,196,730,632,584,216,635,283,328,701,466,48,264,322,215,121,656,797,595,428,422,374,184,138,230,175,564,213,83,772,552,292,791,595,95,81,259,783,85,131,543,1,676,134,261,277,411,258,412,738,481,186,774,445,539,522,157,800,478,83,289,731,460,89,405,583,618,335,590,632,498,728,778,634,431,400,160,46,124,194,124,628,440,661,758,583,275,260,88,80,789,116,313,354,318,319,427,257,335,466,243,723,529,92,55,552,792,630,575,148,66,509,165,556,587,165,470,650,503,451,295,560,273,560,109,40,479,338,611,684,319,77,13,216,82,323,518,202,677,798,61,220,573,248,487,737,277,597,338,645,784,306,595,393,478,702,657,242,529,465,584,519,15,48,533,458,70,684,66,61,363,24,338,431,115,190,475,548,731,180,774,150,126,392,261,377,383,333,613,296,793,682,649,444,707,8,378,537,545,767,527,746,108,118,454,214,489,257,630,335,575,424,204,135,360,661,577,754,688,710,231,577,142,337,406,135,364,545,622,242,286,270,468,370,204,786,559,575,763,799,484,781,130,223,746,6,682,298,311,329,35,744,174,492,703,519,93,497,586,43,631,742,455,392,572,663,34,120,688,301,466,646,34,218,228,696,449,672,256,271,677,65,330,318,210,23,114,207,373,727,280,563,23,779,397,48,362,276,67,127,352,448,671,423,471,18,589,799,60,757,369,314,176,498,685,497,184,382,487,261,246,101,242,2,516,176,795,203,456,513,342,705,263,120,353,720,678,339,263,712,524,561,568,9,781,437,572,798,73,549,228,47,138,748,766,745,718,460,15,507,663,461,624,249,267,319,459,170,426,154,590,156,84,658,529,248,93,168,453,712,374,353,507,530,319,22,378,457,512,759,430,196,136,358,530,80,639,125,269,65,245,486,748,639,229,71,402,252,631,121,39,379,19,596,500,553,574,640,793,72,447,243,293,350,737,3,655,314,119,78,575,759,42,538,402,460,749,788,264,207,578,32,130,743,629,59,66,233,759,226,314,475,775,405,488,765,20,720,117,68,674,54,735,519,372,567,497,237,32,380,719,323,346,785,160,349,415,138,49,513,297,483,239,599,168,546,297,702,450,150,427,598,756,433,720,467,221,559,31,535,693,179,469,684,602,605,186,289,266,628,522,256,714,290,727,251,331,77,191,25,517,17,383,510,565,444,566,742,319,391,81,344,655,798,653,21,544,375,112,437,702,519,33,459,244,635,30,15,326,327,610,613,390,785,494,733,95,191,568,561,792,502,169,300,102,65,132,111,543,745,742,111,51,732,678,605,717,184,305,526,559,109,775,5,427,424,57,372,635,418,747,705,419,572,182,189,760,663,216,125,646,12,15,751,45,323,586,27,560,525,625,633,484,66,267,751,78,60,229,32,701,669,13,329,664,14,501,751,71,614,303,337,643,452,387,229,144,620,733,238,656,789,633,319,258,336,247,257,19,738,343,91,305,333,371,301,728,392,351,658,42,655,422,681,647,539,335,296,189,392,331,392,256,117,615,43,297,208,17,233,315,137,238,109,632,537,529,79,326,217,396,237,24,645,706,779,671,266,90,189,311,52,42,8,691,337,516,626,309,682,331,398,124,743,515,596,528,678,536,33,65,661,487,16,648,387,414,235,21,203,595,687,325,642,90,782,586,478,589,85,379,709,652,387,527,216,180,279,650,740,715,584,546,440,736,672,167,453,323,153,566,239,790,439,224,497,450,307,236,193,612,22,491,10,591,320,590,529,672,484,95,359,323,297,214,217,505,79,409,86,632,378,785,665,196,48,212,181,162,513,368,77,733,310,523,546,625,342,590,543,207,713,28,134,226,726,40,365,670,257,558,486,448,759,183,611,506,188,336,537,532,705,190,169,516,595,610,24,219,283,228,150,65,201,517,564,371,118,785,790,35,210,364,692,257,697,25,301,169,645,158,41,143,537,46,120,436,332,20,722,353,61,738,502,266,716,520,39,421,486,345,193,726,683,792,421,508,720,137,445,731,170,397,334,726,46,54,749,241,452,299,357,768,188,529,9,123,159,145,461,213,52,380,471,646,569,461,526,120,733,45,196,548,628,395,126,417,487,758,248,795,553,257,366,155,755,757,632,314,366,203,414,97,145,498,307,666,516,320,122,218,23,245,158,67,401,254,337,413,23,562,693,694,198,467,648,252,29,5,312,266,796,289,534,129,397,307,240,192,640,105,18,371,383,396,9,558,308,763,678,10,484,689,136,311,67,444,305,541,379,356,50,223,675,773,345,719,330,378,158,723,496,438,13,699,280,297,769,279,798,139,303,260,643,501,686,37,629,576,745,239,108,634,691,131,416,706,763,161,549,178,627,535,8,718,223,354,124,594,364,40,224,356,763,140,769,747,100,619,504,759,649,33,432,509,671,58,548,415,349,38,152,396,423,106,479,489,235,681,540,588,521,348,528,264,124,331,420,425,556,764,62,579,489,78,118,128,683,603,201,328,427,455,110,759,290,48,95,35,168,301,142,189,525,727,696,347,357,458,787,181,604,655,14,505,94,486,737,547,327,798,663,449,753,167,225,309,159,623,38,622,619,656,749,351,190,675,729,499,358,787,375,83,69,761,755,474,473,220,171,381,351,145,688,461,366,568,381,320,727,603,304,588,787,683,413,271,586,173,389,441,429,460,500,462,438,547,176,74,129,208,69,659,663,598,250,232,409,123,766,692,285,262,398,17,60,520,451,340,404,353,635,356,82,528,237,794,264,471,181,726,446,178,425,333,241,210,508,314,266,39,652,392,242,57,47,776,718,103,743,576,451,570,309,302,260,795,645,424,605,595,196,406,611,485,407,497,415,419,189,35,158,370,725,101,392,27,427,590,604,289,29,117,342,477,776,474,674,311,225,378,773,516,367,414,732,434,709,715,387,517,295,520,742,709,379,627,737,703,205,702,402,629,200,148,280,302,594,83,442,771,194,428,316,707,277,787,794,668,87,724,740,759,645,753,329,645,160,556,339,286,139,301,696,171,234,800,739,777,361,287,585,262,683,678,663,199,754,687,57,74,62,710,723,751,101,143,132,272,77,582,609,547,386,21,482,613,302,136,366,33,314,512,769,87,785,479,683,566,256,617,733,514,614,719,329,632,443,642,5,284,779,205,192,714,792,667,657,532,19,569,698,220,350,408,146,477,213,509,770,676,428,523,339,593,154,643,173,461,264,17,767,67,398,364,277,199,739,484,165,322,531,502,581,21,502,761,151,509,215,545,7,644,475,345,359,158,377,615,605,262,50,535,542,166,217,246,88,202,370,452,568,712,516,107,544,206,410,253,458,746,126,176,277,254,599,369,372,278,427,428,245,103,238,46,699,425,424,186,664,188,97,418,174,212,771,214,677,217,454,679,662,28,414,285,211,317,20,442,751,760,241,386,587,510,497,105,149,527,225,306,315,320,16,578,431,307,149,176,613,137,127,58,654,3,127,8,118,245,783,209,66,539,156,148,672,766,780,657,322,776,155,150,43,586,666,563,234,57,360,111,446,371,69,84,125,719,700,238,316,212,143,214,16,657,499,595,473,258,763,78,741,65,776,375,112,551,431,367,550,33,646,46,648,273,255,452,331,763,167,247,405,274,400,595,27,103,183,109,760,552,15,167,610,565,483,397,407,511,67,121,726,683,389,162,520,238,367,540,417,242,382,653,337,413,774,454,667,800,52,536,708,657,648,32,121,798,669,719,470,382,50,195,768,335,301,749,763,161,465,387,148,339,685,251,25,503,679,175,253,563,159,651,290,453,23,786,541,201,551,277,701,407,208,231,143,22,444,386,136,533,291,384,528,104,413,591,78,201,537,666,431,548,729,309,629,44,192,1,545,120,226,166,188,711,362,20,144,202,768,247,248,492,92,302,585,596,513,80,579,489,440,146,496,284,252,395,571,449,260,255,131,704,173,47,473,488,292,481,338,714,563,599,210,483,777,92,382,794,535,197,557,47,130,348,152,536,698,478,160,285,670,324,341,68,793,262,777,122,44,27,179,237,542,43,38,750,475,493,658,118,382,352,45,348,197,242,508,365,528,171,534,427,704,408,612,379,740,481,403,190,255,208,729,359,543,669,12,661,583,772,251,434,778,325,8,638,649,328,189,169,338,626,675,60,448,480,21,486,205,104,313,566,198,267,418,73,23,420,476,482,290,582,263,249,673,348,771,76,200,115,282,712,228,796,355,198,502,457,347,761,411,403,407,791,77,130,607,663,795,8,778,700,455,520,735,206,499,228,670,32,193,780,227,209,594,636,648,327,478,217,292,123,441,424,92,634,11,435,746,501,792,576,495,145,219,164,731,432,455,602,791,562,443,734,140,47,437,678,86,131,29,658,608,129,751,443,692,572,187,273,705,284,50,93,715,97,661,508,569,87,190,113,285,533,170,371,582,678,147,459,776,229,425,380,742,777,37,436,21,514,2,60,166,572,788,121,116,199,570,309,494,146,656,545,764,706,625,108,114,194,49,632,607,699,271,277,209,155,490,733,575,348,800,762,519,15,523,383,183,186,631,449,413,228,482,223,221,301,288,660,378,719,16,531,661,281,663,658,728,313,55,738,788,245,672,469,241,170,393,224,270,557,5,150,787,435,703,546,471,143,190,759,462,570,646,480,332,596,251,269,690,459,293,612,347,66,349,570,596,692,350,623,506,687,306,466,63,60,93,384,377,88,203,613,365,504,767,412,56,652,252,775,623,457,58,5,706,255,17,146,400,641,58,782,69,500,271,55,346,699,507,273,9,101,414,139,44,226,138,228,244,231,297,742,575,398,382,557,356,634,196,365,160,11,791,73,418,475,649,401,314,210,484,773,360,141,795,521,18,508,281,177,560,76,121,14,279,268,82,254,638,292,752,598,343,672,175,656,520,686,211,405,678,306,3,503,222,313,263,637,552,717,569,299,561,34,159,111,389,100,689,37,379,136,710,19,684,540,740,727,454,115,743,148,701,508,609,100,588,148,252,163,468,111,284,28,578,434,533,428,551,543,587,635,206,156,297,180,226,240,529,542,60,268,106,413,784,552,578,79,231,211,543,621,348,730,64,626,507,426,791,19,318,313,386,795,503,40,399,479,226,231,786,753,563,496,525,303,460,657,243,275,183,168,763,629,154,103,676,454,788,676,610,405,146,59,17,361,383,373,789,682,507,88,766,257,209,257,483,599,409,797,12,572,736,654,80,706,652,206,2,394,177,364,585,776,217,608,312,741,381,102,466,728,797,152,495,692,321,424,600,229,205,418,33,401,7,75,219,346,177,538,149,474,18,178,564,153,315,68,729,63,260,393,337,723,766,350,533,322,260,774,103,243,34,568,431,477,595,137,598,512,630,666,116,288,207,613,37,315,186,696,512,745,314,799,608,184,368,298,711,151,648,368,570,70,62,353,461,589,100,646,590,346,408,713,81,332,628,426,294,116,249,633,16,264,71,57,106,396,383,457,551,797,481,144,705,208,398,649,525,78,17,493,408,369,389,564,193,388,743,382,199,786,727,735,135,529,69,559,189,493,303,135,76,461,587,438,460,642,398,580,47,386,171,271,762,82,165,684,427,434,643,731,616,498,325,91,32,406,594,315,245,141,274,682,711,364,487,292,311,399,395,204,60,519,646,245,617,164,166,776,605,570,391,452,330,286,142,661,562,105,77,191,18,520,399,600,759,384,315,384,190,147,405,674,126,439,502,637,64,525,604,574,526,492,737,654,607,722,154,313,744,785,460,151,529,32,187,760,106,220,438,546,613,544,670,791,784,361,455,169,229,662,250,152,732,527,486,573,233,580,457,12,561,157,148,401,368,674,59,75,428,511,109,490,75,651,548,187,85,516,493,288,71,450,133,254,151,734,559,656,770,651,726,179,609,84,330,742,456,20,580,270,73,497,246,283,177,257,475,559,489,255,49,25,787,575,547,616,684,327,179,639,628,541,129,618,118,797,199,151,563,185,528,115,88,44,658,504,562,311,34,727,273,507,700,331,421,315,131,764,557,727,738,512,764,251,705,216,498,607,536,760,407,703,281,282,345,533,475,276,246,35,253,569,197,525,683,372,643,221,476,600,640,66,206,720,510,495,582,731,256,74,404,178,522,648,9,534,86,132,679,45,42,691,364,681,364,253,313,774,320,86,85,497,69,335,776,63,124,371,405,698,138,343,440,794,22,500,67,393,258,602,91,765,772,410,289,583,28,546,213,589,430,731,490,328,106,494,432,29,695,530,505,639,605,404,508,129,568,648,729,214,658,708,321,480,57,312,302,733,41,418,690,130,524,223,567,176,420,748,341,426,273,629,602,350,491,65,686,660,95,524,462,334,45,563,525,739,251,369,352,401,665,655,464,777,297,65,449,688,776,543,572,119,738,577,278,49,440,90,35,107,267,79,290,610,330,174,83,283,559,195,50,201,566,443,492,192,334,772,610,112,612,173,115,181,195,455,727,374,374,390,60,75,756,150,375,683,205,768,488,397,197,188,262,367,492,292,483,593,786,118,67,661,750,651,696,82,577,787,225,581,600,448,154,588,47,185,766,759,223,641,542,555,671,131,598,22,564,605,617,553,721,161,329,687,562,489,396,287,664,712,502,212,170,727,776,56,527,404,440,272,796,537,734,788,449,243,518,233,143,525,679,153,163,363,15,484,521,225,141,127,39,165,94,538,80,533,371,390,707,49,368,450,746,88,760,285,580,81,632,447,343,427,708,523,316,23,769,539,240,257,732,83,14,412,302,795,8,785,648,755,83,142,649,104,632,547,436,694,349,707,319,386,468,711,387,218,23,560,492,463,525,696,263,736,132,757,652,159,602,364,611,92,245,796,424,478,333,795,658,622,668,443,736,552,118,593,641,165,531,149,245,382,664,590,278,488,248,648,81,153,88,462,581,237,350,714,27,457,733,315,199,90,685,305,355,261,460,357,653,798,150,451,202,341,76,259,378,133,134,468,630,518,55,593,774,736,392,465,425,289,61,564,682,98,283,79,751,692,568,645,209,287,563,293,612,791,325,94,5,243,285,452,242,193,720,594,756,641,56,420,424,436,53,562,507,458,199,132,449,491,135,263,276,384,463,523,504,532,703,759,732,483,492,232,580,529,566,790,371,678,531,164,309,180,624,498,296,2,25,283,633,433,507,483,309,537,781,445,173,97,628,678,506,411,395,366,727,335,101,325,598,29,784,756,595,511,464,416,600,205,171,793,35,628,418,169,492,355,543,354,750,441,71,553,250,246,764,491,567,762,669,593,173,14,402,753,360,668,2,569,4,106,588,649,50,661,372,309,283,526,478,240,450,288,245,276,161,720,335,54,653,430,159,663,558,645,740,85,103,216,263,410,711,311,709,58,93,581,154,745,156,517,177,410,481,548,68,70,146,757,123,360,79,227,742,626,311,532,96,157,704,790,398,211,468,88,82,336,289,75,506,28,304,107,800,376,412,432,524,112,188,460,33,388,646,483,201,699,757,581,550,270,760,306,285,74,617,575,699,740,19,709,658,228,147,536,271,693,697,692,110,741,131,660,316,592,637,359,687,166,640,337,470,644,415,514,518,57,667,382,678,216,106,341,240,676,454,304,350,247,247,472,585,396,71,492,777,145,574,484,697,697,604,675,482,455,302,538,54,649,291,369,490,606,54,445,222,450,758,653,343,386,388,275,150,490,538,256,3,525,571,70,588,117,213,682,643,567,244,50,516,751,451,285,765,172,791,156,582,166,561,710,404,359,76,303,449,164,510,338,448,47,15,474,121,593,305,502,4,148,605,505,750,364,359,5,734,536,95,177,536,761,517,600,494,674,344,718,643,182,523,46,606,228,63,704,680,337,796,444,541,638,208,729,711,327,68,652,496,774,444,354,636,318,69,634,592,490,84,404,676,279,239,553,175,702,302,706,587,75,212,385,773,696,39,125,273,581,579,305,483,212,670,129,760,645,359,328,758,585,385,298,304,532,414,684,548,655,467,137,772,411,310,228,389,310,518,424,8,787,743,246,135,209,306,599,175,371,319,197,734,271,349,447,432,746,610,594,796,744,589,183,690,627,696,649,743,183,466,210,759,1,686,28,220,245,183,632,700,70,152,287,537,531,548,609,540,62,496,371,425,371,351,32,258,501,271,269,691,559,391,258,239,349,208,776,427,781,589,729,465,403,530,606,382,728,249,316,101,368,459,166,91,483,200,378,161,744,151,768,714,685,234,369,18,28,385,55,433,343,110,654,726,439,556,146,494,517,788,265,293,120,750,750,120,85,492,443,627,356,322,566,248,290,596,570,238,117,425,772,636,69,204,618,30,240,736,375,197,127,626,599,719,47,211,199,543,72,550,641,62,436,364,468,587,399,542,629,475,106,158,389,644,189,602,789,795,114,519,440,422,477,392,797,284,160,197,505,253,733,769,712,463,440,533,355,403,406,691,535,66,237,209,3,614,16,365,634,388,671,315,106,596,71,616,16,498,47,328,95,47,321,660,114,755,674,121,284,628,792,770,157,316,32,773,515,254,131,286,20,350,474,312,720,776,535,70,531,108,753,350,520,260,98,731,675,351,180,123,739,557,66,396,206,12,772,206,794,54,296,177,676,451,428,580,68,492,553,756,618,251,697,34,556,51,688,394,576,584,526,345,235,220,21,620,798,197,277,194,272,80,421,196,717,675,393,730,694,621,760,386,379,96,124,130,413,381,518,491,735,233,601,362,760,555,381,104,723,773,798,569,202,378,278,725,703,138,166,452,678,525,26,472,417,494,64,44,679,554,277,402,767,301,557,144,516,503,419,150,97,444,483,731,62,486,32,628,550,133,726,221,547,186,307,759,6,493,656,566,59,786,19,620,579,416,656,63,389,619,101,448,21,249,213,505,149,459,220,730,153,698,396,75,745,570,47,533,341,696,753,195,754,734,413,735,297,352,561,11,571,468,216,444,54,503,3,197,747,92,614,720,652,435,29,742,604,699,396,127,191,678,731,582,675,702,143,289,535,74,647,466,346,14,607,230,533,695,351,752,272,566,440,108,131,80,177,11,43,32,522,359,237,545,662,254,706,276,205,793,284,221,58,59,782,623,517,700,262,585,669,767,284,180,192,9,314,782,279,287,643,459,797,87,762,485,642,473,430,335,51,349,544,252,56,574,69,49,316,720,649,41,520,610,159,668,129,394,310,624,691,800,646,565,327,678,489,126,232,143,78,213,70,222,494,794,91,568,319,788,561,221,62,8,373,61,669,337,452,159,110,39,527,597,136,193,466,77,180,178,233,21,191,499,671,676,371,381,576,322,225,749,670,25,633,444,405,275,100,748,590,134,768,235,169,410,229,159,537,669,659,191,777,197,504,22,240,622,771,448,203,638,703,27,610,294,711,57,220,36,176,125,75,182,430,622,166,589,270,15,105,346,718,354,788,277,188,202,707,771,426,81,466,782,626,557,218,719,159,686,354,108,397,621,79,200,309,379,659,724,271,313,299,795,720,405,413,89,662,404,410,56,568,522,738,598,499,652,335,395,450,610,302,248,740,366,220,571,367,495,668,771,673,461,562,591,523,21,669,412,443,251,427,320,768,26,379,80,312,135,38,416,247,773,676,723,87,639,264,416,562,631,21,661,117,250,680,113,529,385,591,24,766,470,740,785,499,365,118,659,266,339,782,469,155,437,141,557,68,63,266,675,338,522,706,493,139,21,248,227,53,744,260,686,730,612,143,522,698,467,165,401,202,473,316,145,105,90,340,305,172,567,275,647,425,443,202,479,382,775,372,582,243,245,208,427,538,206,528,720,283,109,213,733,3,45,275,267,57,409,45,746,373,250,41,759,792,518,261,669,397,772,799,256,635,262,509,466,599,741,252,720,375,617,80,593,738,236,335,641,759,376,469,75,797,150,617,93,689,275,517,61,594,201,444,481,520,500,601,756,697,794,33,458,40,556,547,311,613,393,499,602,277,747,640,438,537,84,362,724,233,82,45,173,422,534,278,182,334,26,130,399,163,446,679,670,538,704,580,591,283,199,133,783,301,250,518,693,779,487,42,542,97,414,550,81,237,235,461,635,46,529,659,36,661,792,563,309,84,464,63,204,333,173,269,792,370,524,580,542,138,283,553,201,301,481,40,139,268,515,18,50,170,513,98,765,14,800,425,57,132,104,508,227,396,618,506,311,72,467,259,474,756,71,41,532,5,202,344,684,474,45,791,784,463,507,269,77,746,777,270,671,663,508,615,519,187,98,686,363,647,30,757,717,640,189,449,132,703,710,701,200,127,790,273,48,478,386,448,303,718,252,407,120,578,98,141,766,117,326,251,720,398,245,421,265,177,667,450,640,423,391,795,6,275,145,757,267,436,514,413,796,287,390,675,390,188,58,210,401,227,752,107,174,790,608,631,136,96,442,222,548,795,375,460,34,730,10,288,399,307,308,511,337,321,517,1,19,573,134,478,403,331,550,505,583,273,45,208,467,567,357,504,293,631,661,74,216,229,401,464,408,348,738,781,498,277,772,265,299,771,547,531,211,485,90,339,538,43,765,739,488,133,287,416,134,764,2,225,706,23,794,762,381,510,31,249,80,606,421,404,327,12,624,415,697,482,420,751,334,742,228,359,87,755,603,566,734,196,581,588,568,306,758,641,314,590,327,108,676,123,284,259,414,792,382,447,93,553,226,712,619,543,90,548,693,335,286,474,510,641,458,487,461,8,359,606,297,123,180,431,30,494,140,348,251,418,325,40,728,629,402,153,629,652,387,127,271,549,347,127,621,322,447,456,644,208,303,685,153,761,741,47,467,371,96,507,110,346,658,307,341,599,695,169,378,30,208,398,446,674,419,604,675,275,495,458,76,530,636,546,22,572,635,80,604,588,550,700,22,184,678,522,29,225,195,537,383,736,131,131,160,182,750,638,263,492,157,799,56,610,246,414,58,312,264,205,684,248,42,180,270,702,686,271,491,321,666,300,376,404,547,43,470,448,536,290,413,342,792,207,708,47,619,750,771,708,438,633,332,208,732,279,620,507,89,202,240,782,426,97,550,302,418,209,421,525,579,581,665,694,654,215,702,737,344,491,611,424,536,469,512,617,372,596,771,363,793,366,228,501,326,349,4,772,414,606,567,520,563,493,278,202,588,348,779,666,701,156,759,295,253,514,327,603,80,126,768,680,739,60,231,548,477,271,143,45,427,478,595,229,597,709,308,681,134,694,325,258,178,411,528,265,525,515,319,11,107,498,101,601,767,37,500,284,685,606,359,648,399,66,128,289,136,275,610,524,21,716,78,532,444,603,41,162,428,199,403,98,214,795,411,285,727,378,786,69,32,21,487,298,688,302,427,531,49,362,155,530,158,732,751,107,384,180,631,154,406,563,75,564,331,570,287,658,123,129,227,682,191,471,554,590,79,74,546,601,690,250,512,584,45,150,17,763,727,589,277,49,396,538,491,622,532,455,642,324,767,642,74,757,391,327,376,42,571,530,153,73,57,634,481,351,532,190,281,624,661,438,101,386,150,398,161,710,192,607,742,270,769,798,578,746,510,368,465,512,165,193,516,438,290,60,721,437,605,471,798,773,712,105,776,217,627,730,677,611,772,668,555,420,169,95,498,616,38,301,278,22,714,572,511,6,615,259,439,488,103,666,338,41,235,493,498,151,558,412,800,133,385,51,225,759,472,372,733,496,332,274,575,351,593,54,558,297,615,406,159,58,217,548,767,246,383,638,587,725,748,679,364,798,339,747,139,582,234,413,262,444,76,75,502,63,337,243,229,429,707,742,24,477,720,137,541,358,555,228,254,578,462,316,709,139,764,574,426,314,750,505,84,462,451,505,235,299,750,108,38,381,154,573,50,273,251,158,168,96,756,439,257,425,730,677,245,210,778,563,176,187,65,309,397,349,90,662,627,580,191,223,66,313,211,713,697,25,700,323,678,653,783,31,541,749,45,106,624,737,760,393,369,798,715,334,159,256,340,246,194,698,599,581,12,251,639,765,223,439,263,692,709,576,289,605,373,22,9,226,744,716,759,332,450,167,96,39,762,197,212,285,15,101,445,340,637,367,8,396,542,279,108,779,402,744,633,316,756,359,231,103,1,203,574,702,772,553,476,489,301,782,298,397,630,346,130,623,512,40,186,594,31,149,545,503,438,670,364,347,100,644,459,188,576,458,760,529,442,666,51,324,717,405,121,650,707,2,213,406,763,234,283,232,460,339,253,241,204,698,437,437,276,463,143,502,797,799,11,650,232,531,625,357,485,284,120,788,240,486,539,144,581,614,597,275,281,534,264,528,559,707,40,274,148,49,228,355,222,28,171,391,355,29,118,594,718,633,482,24,177,588,294,296,323,574,207,427,211,649,257,190,459,298,558,10,752,480,549,763,281,290,28,785,630,382,61,509,147,555,784,685,155,579,256,643,268,459,68,638,192,118,489,55,132,385,697,115,789,421,384,484,722,389,571,92,46,429,223,222,648,410,268,139,671,210,745,19,438,278,425,469,465,784,394,698,310,678,651,76,665,78,86,648,498,505,508,153,144,78,780,785,83,175,121,534,80,64,793,12,213,159,610,741,561,180,222,570,531,622,166,155,235,559,42,521,303,410,57,792,181,568,569,17,1,199,216,476,626,394,426,691,197,236,445,577,589,684,83,360,663,50,534,297,640,350,476,224,210,441,117,379,27,227,589,254,791,143,543,457,282,777,480,357,788,306,167,155,262,797,573,736,174,28,281,273,650,411,181,375,120,377,42,244,341,631,106,324,283,105,551,618,562,600,645,161,396,722,485,504,767,375,500,753,372,540,416,102,585,642,781,14,489,4,420,666,287,4,36,194,655,176,43,76,87,560,34,731,479,524,304,738,634,774,125,178,256,65,364,85,159,660,154,221,633,763,485,685,364,81,601,204,378,559,751,342,261,468,441,313,205,782,114,253,418,735,118,278,47,186,212,494,171,627,605,509,740,746,620,794,646,79,124,118,345,92,598,483,496,229,610,717,702,316,443,784,489,755,442,403,187,4,371,75,158,548,405,99,32,326,590,221,786,181,338,479,40,734,82,199,377,252,580,562,438,711,598,643,390,771,728,584,344,318,304,770,633,444,533,763,565,86,180,99,641,48,210,251,786,167,713,774,698,418,146,301,199,276,701,647,279,375,371,27,59,297,448,397,382,175,432,566,709,539,397,374,231,704,796,504,411,116,740,589,451,541,771,475,535,509,213,342,705,362,696,340,80,332,783,660,351,513,260,280,154,557,320,195,311,237,317,731,346,545,161,243,796,26,674,350,543,40,13,147,761,336,423,503,344,133,279,747,81,46,671,532,309,123,194,208,620,649,747,631,618,470,287,188,756,743,522,503,549,661,720,363,350,92,667,330,235,507,746,527,431,224,251,747,131,489,690,772,203,488,52,344,496,230,453,249,394,107,406,491,263,191,126,371,274,706,544,127,374,737,278,242,55,218,699,580,352,682,273,568,471,491,490,278,636,452,230,573,90,355,605,289,254,798,192,345,22,551,307,510,717,144,750,663,654,61,224,686,769,382,393,72,634,31,473,722,310,701,264,214,479,174,250,382,368,340,127,480,794,771,270,21,664,223,29,268,323,623,355,103,744,82,185,591,660,43,404,252,83,635,32,202,471,660,335,339,560,146,621,622,137,568,452,692,599,458,702,547,679,175,136,342,534,126,232,608,282,767,793,220,61,743,196,718,64,525,667,465,423,148,621,254,689,386,770,740,73,453,330,785,614,632,750,711,214,369,432,303,537,64,395,266,437,365,590,565,232,329,135,794,57,141,663,667,784,9,348,322,704,97,121,257,1,187,355,660,792,733,746,130,628,786,394,772,348,273,208,481,630,146,421,164,224,18,645,62,416,521,249,198,317,159,453,608,696,510,134,554,343,488,752,666,659,211,230,138,772,125,90,419,390,222,401,21,659,121,142,61,237,632,686,534,608,338,267,19,680,663,555,127,433,299,683,173,542,165,571,229,397,237,492,791,681,550,152,470,203,335,35,534,576,56,250,463,202,189,237,319,585,387,243,482,799,54,467,543,518,185,16,21,390,459,50,580,651,193,536,776,7,791,778,454,215,610,632,779,439,180,660,599,54,297,312,781,639,570,462,795,780,606,664,687,160,61,667,421,546,691,590,462,602,103,451,353,448,602,105,404,104,39,342,350,682,633,311,367,675,652,80,620,553,488,780,55,655,474,435,719,332,480,228,745,291,100,14,190,306,246,328,199,95,317,589,707,432,352,354,492,655,250,597,91,750,702,54,756,475,745,240,333,509,692,418,708,740,565,620,530,538,469,395,662,716,756,275,744,514,491,561,422,440,156,654,540,25,736,778,116,467,636,573,245,643,12,170,736,98,296,732,657,225,96,327,269,487,127,52,3,308,233,638,590,596,455,556,538,99,450,690,715,750,202,278,300,504,513,597,738,228,419,532,424,87,65,593,720,792,715,38,355,642,259,535,59,629,468,145,42,261,544,218,606,394,220,204,315,36,161,520,736,593,553,219,679,366,317,357,14,347,579,420,434,109,794,647,377,771,302,444,681,487,306,236,442,88,106,28,427,751,441,734,101,395,133,121,182,1,18,629,727,688,176,571,185,380,86,675,51,192,653,73,664,488,314,289,341,742,415,495,276,40,513,104,177,305,690,108,365,83,719,178,390,331,662,573,525,292,365,175,22,387,174,61,437,12,588,183,787,332,290,265,557,363,694,502,775,504,526,297,386,493,485,454,595,587,49,743,293,609,570,108,442,505,431,22,61,395,277,250,329,34,487,135,536,195,704,366,86,768,719,609,1,415,486,129,735,11,798,301,737,556,465,320,298,500,641,497,481,33,229,774,700,281,658,234,416,403,446,515,68,485,71,771,432,791,647,637,586,214,628,238,600,367,523,512,203,389,69,628,105,640,220,168,136,557,317,297,194,701,691,357,244,43,296,341,170,711,39,264,483,256,105,262,408,49,266,137,290,718,772,511,334,654,251,536,194,284,442,672,45,35,98,218,432,586,467,457,641,545,475,735,508,161,355,154,726,668,15,415,422,197,581,438,454,447,642,349,677,227,230,18,272,140,102,12,153,481,794,234,765,555,304,661,646,410,123,586,169,450,510,412,110,787,779,199,697,324,494,726,585,247,254,615,633,713,604,401,415,380,313,222,509,186,260,498,771,85,363,596,253,660,611,394,749,50,669,751,311,563,598,37,239,171,739,292,744,720,320,200,27,480,280,670,54,305,300,370,301,435,142,71,344,255,598,696,619,350,731,633,35,345,49,542,361,510,501,636,296,101,52,626,34,336,330,202,511,340,495,492,212,39,568,248,404,438,764,370,58,366,126,93,524,525,234,108,226,259,767,621,573,506,326,35,121,98,378,239,774,363,678,302,299,180,194,12,457,561,322,519,616,129,265,455,657,141,425,573,249,145,596,419,695,506,500,145,20,426,604,136,762,34,615,73,331,80,369,17,500,460,395,395,706,581,462,37,379,711,373,169,99,627,220,476,368,518,571,619,766,755,386,304,196,680,406,346,486,513,410,58,388,400,479,719,618,545,106,748,584,168,753,58,746,433,159,257,148,7,351,766,775,614,395,43,777,46,100,570,63,60,667,54,474,357,7,494,18,713,444,281,464,521,169,407,511,753,694,272,778,443,147,16,743,239,771,373,130,271,303,19,129,399,150,256,140,115,565,183,53,389,88,110,797,155,117,358,142,531,439,476,758,549,455,616,105,786,573,320,445,8,93,713,306,75,479,16,648,681,118,299,408,578,689,23,543,197,673,344,251,108,192,778,267,551,82,236,563,523,206,176,206,665,81,260,165,772,303,129,560,396,406,703,602,557,369,762,168,549,519,371,792,233,224,687,388,388,778,690,546,474,670,765,627,280,337,316,339,137,696,139,315,472,21,529,290,588,598,797,284,670,83,390,279,693,12,327,583,275,601,797,623,587,23,266,402,536,103,697,783,503,549,429,348,685,561,616,730,742,75,347,383,219,314,661,797,9,108,213,463,754,442,389,443,576,81,309,625,570,49,569,244,322,382,692,716,485,661,244,690,74,279,685,242,161,437,696,261,346,508,206,160,43,146,185,523,390,700,575,444,304,775,643,501,723,540,91,795,723,300,425,427,243,46,35,288,338,136,403,330,231,207,651,594,754,611,364,2,538,174,761,47,531,121,338,137,405,557,479,96,795,701,164,144 +]) +x = set(x) +print(x) + diff --git a/python/quickShort.py.4f5666e2839771263be1c3d6d4af6366.tmp b/python/quickShort.py.4f5666e2839771263be1c3d6d4af6366.tmp new file mode 100644 index 0000000..53390c8 --- /dev/null +++ b/python/quickShort.py.4f5666e2839771263be1c3d6d4af6366.tmp @@ -0,0 +1,32 @@ +''' +The way this algorithm works is +first we define a pivot point as a reference we can use any point as a +reference but here we are using last value from our input list + +and then we make two list namesd as lower and heigher and we append value +respective to the pivot point to the respective list + +and we done the same process over and over again till the condition breaks +''' + +def quick_short(List): + length = len(List) + lower = [] + heigher = [] + if length <= 1: + return List + else: + pivot = List.pop() + for i in List: + if i >= pivot: + heigher.append(i) + else: + lower.append(i) + return quick_short(lower) + [pivot] + quick_short(heigher) + +x = quick_short([ +89,399,757,257,372,553,241,216,48,355,41,34,798,470,751,285,288,768,563,2,638,113,153,394,500,715,495,217,578,625,628,27,345,329,579,677,331,211,354,646,715,595,784,552,515,226,598,533,508,332,515,789,521,261,117,415,712,604,93,144,595,38,423,798,165,472,573,771,312,330,92,731,775,579,140,329,530,439,276,166,395,233,41,314,141,201,688,383,763,606,87,672,207,564,687,285,24,216,394,675,652,302,33,786,540,173,664,624,58,190,792,43,178,212,557,231,389,641,586,504,301,92,573,126,85,678,27,480,765,637,255,193,300,693,74,16,146,479,54,87,503,215,161,208,673,83,180,520,591,786,559,486,12,474,174,310,359,463,185,402,610,324,720,237,364,386,609,411,303,549,618,360,23,620,466,477,41,505,337,701,537,631,251,701,422,697,408,482,338,724,591,94,253,449,381,584,6,531,4,689,183,399,44,473,716,59,661,443,592,422,428,37,770,107,689,783,215,558,159,263,80,35,275,404,111,580,230,700,97,611,329,766,117,693,560,98,339,217,316,783,396,774,423,769,618,486,207,50,324,596,778,712,301,565,26,122,327,724,538,392,56,428,550,172,314,195,778,258,768,130,687,754,67,634,375,749,780,505,175,694,183,514,250,16,784,27,684,620,269,190,782,300,554,578,670,509,480,230,444,336,136,23,659,46,261,273,570,393,240,380,340,224,745,308,361,43,444,179,293,244,50,349,52,346,102,520,160,57,40,733,169,761,280,284,603,422,666,52,531,779,110,181,79,76,401,385,334,628,528,553,507,420,739,402,333,552,588,8,57,248,767,199,195,626,198,312,21,121,127,430,668,387,243,85,452,336,104,538,174,707,130,239,592,41,73,334,293,396,88,264,602,86,11,94,357,445,336,724,623,614,531,585,144,469,710,326,581,152,239,189,727,54,736,697,574,1,130,291,177,761,270,490,528,54,671,435,115,635,595,526,253,375,37,622,180,271,4,35,763,473,721,92,413,464,230,524,644,412,77,111,92,1,686,747,525,150,128,298,160,177,514,669,742,532,730,734,171,711,762,682,49,484,700,152,128,449,704,749,384,208,323,429,565,510,10,157,794,180,416,436,481,670,663,268,183,585,645,714,239,536,475,388,22,35,95,30,537,577,784,790,603,3,409,213,192,468,326,521,42,574,21,717,276,689,787,316,118,520,779,356,583,47,593,618,371,142,119,360,487,357,647,376,774,623,263,720,211,242,708,3,383,274,388,652,306,484,356,378,621,239,710,131,741,686,321,25,57,475,724,394,76,114,308,92,197,220,99,756,185,621,229,276,571,196,730,632,584,216,635,283,328,701,466,48,264,322,215,121,656,797,595,428,422,374,184,138,230,175,564,213,83,772,552,292,791,595,95,81,259,783,85,131,543,1,676,134,261,277,411,258,412,738,481,186,774,445,539,522,157,800,478,83,289,731,460,89,405,583,618,335,590,632,498,728,778,634,431,400,160,46,124,194,124,628,440,661,758,583,275,260,88,80,789,116,313,354,318,319,427,257,335,466,243,723,529,92,55,552,792,630,575,148,66,509,165,556,587,165,470,650,503,451,295,560,273,560,109,40,479,338,611,684,319,77,13,216,82,323,518,202,677,798,61,220,573,248,487,737,277,597,338,645,784,306,595,393,478,702,657,242,529,465,584,519,15,48,533,458,70,684,66,61,363,24,338,431,115,190,475,548,731,180,774,150,126,392,261,377,383,333,613,296,793,682,649,444,707,8,378,537,545,767,527,746,108,118,454,214,489,257,630,335,575,424,204,135,360,661,577,754,688,710,231,577,142,337,406,135,364,545,622,242,286,270,468,370,204,786,559,575,763,799,484,781,130,223,746,6,682,298,311,329,35,744,174,492,703,519,93,497,586,43,631,742,455,392,572,663,34,120,688,301,466,646,34,218,228,696,449,672,256,271,677,65,330,318,210,23,114,207,373,727,280,563,23,779,397,48,362,276,67,127,352,448,671,423,471,18,589,799,60,757,369,314,176,498,685,497,184,382,487,261,246,101,242,2,516,176,795,203,456,513,342,705,263,120,353,720,678,339,263,712,524,561,568,9,781,437,572,798,73,549,228,47,138,748,766,745,718,460,15,507,663,461,624,249,267,319,459,170,426,154,590,156,84,658,529,248,93,168,453,712,374,353,507,530,319,22,378,457,512,759,430,196,136,358,530,80,639,125,269,65,245,486,748,639,229,71,402,252,631,121,39,379,19,596,500,553,574,640,793,72,447,243,293,350,737,3,655,314,119,78,575,759,42,538,402,460,749,788,264,207,578,32,130,743,629,59,66,233,759,226,314,475,775,405,488,765,20,720,117,68,674,54,735,519,372,567,497,237,32,380,719,323,346,785,160,349,415,138,49,513,297,483,239,599,168,546,297,702,450,150,427,598,756,433,720,467,221,559,31,535,693,179,469,684,602,605,186,289,266,628,522,256,714,290,727,251,331,77,191,25,517,17,383,510,565,444,566,742,319,391,81,344,655,798,653,21,544,375,112,437,702,519,33,459,244,635,30,15,326,327,610,613,390,785,494,733,95,191,568,561,792,502,169,300,102,65,132,111,543,745,742,111,51,732,678,605,717,184,305,526,559,109,775,5,427,424,57,372,635,418,747,705,419,572,182,189,760,663,216,125,646,12,15,751,45,323,586,27,560,525,625,633,484,66,267,751,78,60,229,32,701,669,13,329,664,14,501,751,71,614,303,337,643,452,387,229,144,620,733,238,656,789,633,319,258,336,247,257,19,738,343,91,305,333,371,301,728,392,351,658,42,655,422,681,647,539,335,296,189,392,331,392,256,117,615,43,297,208,17,233,315,137,238,109,632,537,529,79,326,217,396,237,24,645,706,779,671,266,90,189,311,52,42,8,691,337,516,626,309,682,331,398,124,743,515,596,528,678,536,33,65,661,487,16,648,387,414,235,21,203,595,687,325,642,90,782,586,478,589,85,379,709,652,387,527,216,180,279,650,740,715,584,546,440,736,672,167,453,323,153,566,239,790,439,224,497,450,307,236,193,612,22,491,10,591,320,590,529,672,484,95,359,323,297,214,217,505,79,409,86,632,378,785,665,196,48,212,181,162,513,368,77,733,310,523,546,625,342,590,543,207,713,28,134,226,726,40,365,670,257,558,486,448,759,183,611,506,188,336,537,532,705,190,169,516,595,610,24,219,283,228,150,65,201,517,564,371,118,785,790,35,210,364,692,257,697,25,301,169,645,158,41,143,537,46,120,436,332,20,722,353,61,738,502,266,716,520,39,421,486,345,193,726,683,792,421,508,720,137,445,731,170,397,334,726,46,54,749,241,452,299,357,768,188,529,9,123,159,145,461,213,52,380,471,646,569,461,526,120,733,45,196,548,628,395,126,417,487,758,248,795,553,257,366,155,755,757,632,314,366,203,414,97,145,498,307,666,516,320,122,218,23,245,158,67,401,254,337,413,23,562,693,694,198,467,648,252,29,5,312,266,796,289,534,129,397,307,240,192,640,105,18,371,383,396,9,558,308,763,678,10,484,689,136,311,67,444,305,541,379,356,50,223,675,773,345,719,330,378,158,723,496,438,13,699,280,297,769,279,798,139,303,260,643,501,686,37,629,576,745,239,108,634,691,131,416,706,763,161,549,178,627,535,8,718,223,354,124,594,364,40,224,356,763,140,769,747,100,619,504,759,649,33,432,509,671,58,548,415,349,38,152,396,423,106,479,489,235,681,540,588,521,348,528,264,124,331,420,425,556,764,62,579,489,78,118,128,683,603,201,328,427,455,110,759,290,48,95,35,168,301,142,189,525,727,696,347,357,458,787,181,604,655,14,505,94,486,737,547,327,798,663,449,753,167,225,309,159,623,38,622,619,656,749,351,190,675,729,499,358,787,375,83,69,761,755,474,473,220,171,381,351,145,688,461,366,568,381,320,727,603,304,588,787,683,413,271,586,173,389,441,429,460,500,462,438,547,176,74,129,208,69,659,663,598,250,232,409,123,766,692,285,262,398,17,60,520,451,340,404,353,635,356,82,528,237,794,264,471,181,726,446,178,425,333,241,210,508,314,266,39,652,392,242,57,47,776,718,103,743,576,451,570,309,302,260,795,645,424,605,595,196,406,611,485,407,497,415,419,189,35,158,370,725,101,392,27,427,590,604,289,29,117,342,477,776,474,674,311,225,378,773,516,367,414,732,434,709,715,387,517,295,520,742,709,379,627,737,703,205,702,402,629,200,148,280,302,594,83,442,771,194,428,316,707,277,787,794,668,87,724,740,759,645,753,329,645,160,556,339,286,139,301,696,171,234,800,739,777,361,287,585,262,683,678,663,199,754,687,57,74,62,710,723,751,101,143,132,272,77,582,609,547,386,21,482,613,302,136,366,33,314,512,769,87,785,479,683,566,256,617,733,514,614,719,329,632,443,642,5,284,779,205,192,714,792,667,657,532,19,569,698,220,350,408,146,477,213,509,770,676,428,523,339,593,154,643,173,461,264,17,767,67,398,364,277,199,739,484,165,322,531,502,581,21,502,761,151,509,215,545,7,644,475,345,359,158,377,615,605,262,50,535,542,166,217,246,88,202,370,452,568,712,516,107,544,206,410,253,458,746,126,176,277,254,599,369,372,278,427,428,245,103,238,46,699,425,424,186,664,188,97,418,174,212,771,214,677,217,454,679,662,28,414,285,211,317,20,442,751,760,241,386,587,510,497,105,149,527,225,306,315,320,16,578,431,307,149,176,613,137,127,58,654,3,127,8,118,245,783,209,66,539,156,148,672,766,780,657,322,776,155,150,43,586,666,563,234,57,360,111,446,371,69,84,125,719,700,238,316,212,143,214,16,657,499,595,473,258,763,78,741,65,776,375,112,551,431,367,550,33,646,46,648,273,255,452,331,763,167,247,405,274,400,595,27,103,183,109,760,552,15,167,610,565,483,397,407,511,67,121,726,683,389,162,520,238,367,540,417,242,382,653,337,413,774,454,667,800,52,536,708,657,648,32,121,798,669,719,470,382,50,195,768,335,301,749,763,161,465,387,148,339,685,251,25,503,679,175,253,563,159,651,290,453,23,786,541,201,551,277,701,407,208,231,143,22,444,386,136,533,291,384,528,104,413,591,78,201,537,666,431,548,729,309,629,44,192,1,545,120,226,166,188,711,362,20,144,202,768,247,248,492,92,302,585,596,513,80,579,489,440,146,496,284,252,395,571,449,260,255,131,704,173,47,473,488,292,481,338,714,563,599,210,483,777,92,382,794,535,197,557,47,130,348,152,536,698,478,160,285,670,324,341,68,793,262,777,122,44,27,179,237,542,43,38,750,475,493,658,118,382,352,45,348,197,242,508,365,528,171,534,427,704,408,612,379,740,481,403,190,255,208,729,359,543,669,12,661,583,772,251,434,778,325,8,638,649,328,189,169,338,626,675,60,448,480,21,486,205,104,313,566,198,267,418,73,23,420,476,482,290,582,263,249,673,348,771,76,200,115,282,712,228,796,355,198,502,457,347,761,411,403,407,791,77,130,607,663,795,8,778,700,455,520,735,206,499,228,670,32,193,780,227,209,594,636,648,327,478,217,292,123,441,424,92,634,11,435,746,501,792,576,495,145,219,164,731,432,455,602,791,562,443,734,140,47,437,678,86,131,29,658,608,129,751,443,692,572,187,273,705,284,50,93,715,97,661,508,569,87,190,113,285,533,170,371,582,678,147,459,776,229,425,380,742,777,37,436,21,514,2,60,166,572,788,121,116,199,570,309,494,146,656,545,764,706,625,108,114,194,49,632,607,699,271,277,209,155,490,733,575,348,800,762,519,15,523,383,183,186,631,449,413,228,482,223,221,301,288,660,378,719,16,531,661,281,663,658,728,313,55,738,788,245,672,469,241,170,393,224,270,557,5,150,787,435,703,546,471,143,190,759,462,570,646,480,332,596,251,269,690,459,293,612,347,66,349,570,596,692,350,623,506,687,306,466,63,60,93,384,377,88,203,613,365,504,767,412,56,652,252,775,623,457,58,5,706,255,17,146,400,641,58,782,69,500,271,55,346,699,507,273,9,101,414,139,44,226,138,228,244,231,297,742,575,398,382,557,356,634,196,365,160,11,791,73,418,475,649,401,314,210,484,773,360,141,795,521,18,508,281,177,560,76,121,14,279,268,82,254,638,292,752,598,343,672,175,656,520,686,211,405,678,306,3,503,222,313,263,637,552,717,569,299,561,34,159,111,389,100,689,37,379,136,710,19,684,540,740,727,454,115,743,148,701,508,609,100,588,148,252,163,468,111,284,28,578,434,533,428,551,543,587,635,206,156,297,180,226,240,529,542,60,268,106,413,784,552,578,79,231,211,543,621,348,730,64,626,507,426,791,19,318,313,386,795,503,40,399,479,226,231,786,753,563,496,525,303,460,657,243,275,183,168,763,629,154,103,676,454,788,676,610,405,146,59,17,361,383,373,789,682,507,88,766,257,209,257,483,599,409,797,12,572,736,654,80,706,652,206,2,394,177,364,585,776,217,608,312,741,381,102,466,728,797,152,495,692,321,424,600,229,205,418,33,401,7,75,219,346,177,538,149,474,18,178,564,153,315,68,729,63,260,393,337,723,766,350,533,322,260,774,103,243,34,568,431,477,595,137,598,512,630,666,116,288,207,613,37,315,186,696,512,745,314,799,608,184,368,298,711,151,648,368,570,70,62,353,461,589,100,646,590,346,408,713,81,332,628,426,294,116,249,633,16,264,71,57,106,396,383,457,551,797,481,144,705,208,398,649,525,78,17,493,408,369,389,564,193,388,743,382,199,786,727,735,135,529,69,559,189,493,303,135,76,461,587,438,460,642,398,580,47,386,171,271,762,82,165,684,427,434,643,731,616,498,325,91,32,406,594,315,245,141,274,682,711,364,487,292,311,399,395,204,60,519,646,245,617,164,166,776,605,570,391,452,330,286,142,661,562,105,77,191,18,520,399,600,759,384,315,384,190,147,405,674,126,439,502,637,64,525,604,574,526,492,737,654,607,722,154,313,744,785,460,151,529,32,187,760,106,220,438,546,613,544,670,791,784,361,455,169,229,662,250,152,732,527,486,573,233,580,457,12,561,157,148,401,368,674,59,75,428,511,109,490,75,651,548,187,85,516,493,288,71,450,133,254,151,734,559,656,770,651,726,179,609,84,330,742,456,20,580,270,73,497,246,283,177,257,475,559,489,255,49,25,787,575,547,616,684,327,179,639,628,541,129,618,118,797,199,151,563,185,528,115,88,44,658,504,562,311,34,727,273,507,700,331,421,315,131,764,557,727,738,512,764,251,705,216,498,607,536,760,407,703,281,282,345,533,475,276,246,35,253,569,197,525,683,372,643,221,476,600,640,66,206,720,510,495,582,731,256,74,404,178,522,648,9,534,86,132,679,45,42,691,364,681,364,253,313,774,320,86,85,497,69,335,776,63,124,371,405,698,138,343,440,794,22,500,67,393,258,602,91,765,772,410,289,583,28,546,213,589,430,731,490,328,106,494,432,29,695,530,505,639,605,404,508,129,568,648,729,214,658,708,321,480,57,312,302,733,41,418,690,130,524,223,567,176,420,748,341,426,273,629,602,350,491,65,686,660,95,524,462,334,45,563,525,739,251,369,352,401,665,655,464,777,297,65,449,688,776,543,572,119,738,577,278,49,440,90,35,107,267,79,290,610,330,174,83,283,559,195,50,201,566,443,492,192,334,772,610,112,612,173,115,181,195,455,727,374,374,390,60,75,756,150,375,683,205,768,488,397,197,188,262,367,492,292,483,593,786,118,67,661,750,651,696,82,577,787,225,581,600,448,154,588,47,185,766,759,223,641,542,555,671,131,598,22,564,605,617,553,721,161,329,687,562,489,396,287,664,712,502,212,170,727,776,56,527,404,440,272,796,537,734,788,449,243,518,233,143,525,679,153,163,363,15,484,521,225,141,127,39,165,94,538,80,533,371,390,707,49,368,450,746,88,760,285,580,81,632,447,343,427,708,523,316,23,769,539,240,257,732,83,14,412,302,795,8,785,648,755,83,142,649,104,632,547,436,694,349,707,319,386,468,711,387,218,23,560,492,463,525,696,263,736,132,757,652,159,602,364,611,92,245,796,424,478,333,795,658,622,668,443,736,552,118,593,641,165,531,149,245,382,664,590,278,488,248,648,81,153,88,462,581,237,350,714,27,457,733,315,199,90,685,305,355,261,460,357,653,798,150,451,202,341,76,259,378,133,134,468,630,518,55,593,774,736,392,465,425,289,61,564,682,98,283,79,751,692,568,645,209,287,563,293,612,791,325,94,5,243,285,452,242,193,720,594,756,641,56,420,424,436,53,562,507,458,199,132,449,491,135,263,276,384,463,523,504,532,703,759,732,483,492,232,580,529,566,790,371,678,531,164,309,180,624,498,296,2,25,283,633,433,507,483,309,537,781,445,173,97,628,678,506,411,395,366,727,335,101,325,598,29,784,756,595,511,464,416,600,205,171,793,35,628,418,169,492,355,543,354,750,441,71,553,250,246,764,491,567,762,669,593,173,14,402,753,360,668,2,569,4,106,588,649,50,661,372,309,283,526,478,240,450,288,245,276,161,720,335,54,653,430,159,663,558,645,740,85,103,216,263,410,711,311,709,58,93,581,154,745,156,517,177,410,481,548,68,70,146,757,123,360,79,227,742,626,311,532,96,157,704,790,398,211,468,88,82,336,289,75,506,28,304,107,800,376,412,432,524,112,188,460,33,388,646,483,201,699,757,581,550,270,760,306,285,74,617,575,699,740,19,709,658,228,147,536,271,693,697,692,110,741,131,660,316,592,637,359,687,166,640,337,470,644,415,514,518,57,667,382,678,216,106,341,240,676,454,304,350,247,247,472,585,396,71,492,777,145,574,484,697,697,604,675,482,455,302,538,54,649,291,369,490,606,54,445,222,450,758,653,343,386,388,275,150,490,538,256,3,525,571,70,588,117,213,682,643,567,244,50,516,751,451,285,765,172,791,156,582,166,561,710,404,359,76,303,449,164,510,338,448,47,15,474,121,593,305,502,4,148,605,505,750,364,359,5,734,536,95,177,536,761,517,600,494,674,344,718,643,182,523,46,606,228,63,704,680,337,796,444,541,638,208,729,711,327,68,652,496,774,444,354,636,318,69,634,592,490,84,404,676,279,239,553,175,702,302,706,587,75,212,385,773,696,39,125,273,581,579,305,483,212,670,129,760,645,359,328,758,585,385,298,304,532,414,684,548,655,467,137,772,411,310,228,389,310,518,424,8,787,743,246,135,209,306,599,175,371,319,197,734,271,349,447,432,746,610,594,796,744,589,183,690,627,696,649,743,183,466,210,759,1,686,28,220,245,183,632,700,70,152,287,537,531,548,609,540,62,496,371,425,371,351,32,258,501,271,269,691,559,391,258,239,349,208,776,427,781,589,729,465,403,530,606,382,728,249,316,101,368,459,166,91,483,200,378,161,744,151,768,714,685,234,369,18,28,385,55,433,343,110,654,726,439,556,146,494,517,788,265,293,120,750,750,120,85,492,443,627,356,322,566,248,290,596,570,238,117,425,772,636,69,204,618,30,240,736,375,197,127,626,599,719,47,211,199,543,72,550,641,62,436,364,468,587,399,542,629,475,106,158,389,644,189,602,789,795,114,519,440,422,477,392,797,284,160,197,505,253,733,769,712,463,440,533,355,403,406,691,535,66,237,209,3,614,16,365,634,388,671,315,106,596,71,616,16,498,47,328,95,47,321,660,114,755,674,121,284,628,792,770,157,316,32,773,515,254,131,286,20,350,474,312,720,776,535,70,531,108,753,350,520,260,98,731,675,351,180,123,739,557,66,396,206,12,772,206,794,54,296,177,676,451,428,580,68,492,553,756,618,251,697,34,556,51,688,394,576,584,526,345,235,220,21,620,798,197,277,194,272,80,421,196,717,675,393,730,694,621,760,386,379,96,124,130,413,381,518,491,735,233,601,362,760,555,381,104,723,773,798,569,202,378,278,725,703,138,166,452,678,525,26,472,417,494,64,44,679,554,277,402,767,301,557,144,516,503,419,150,97,444,483,731,62,486,32,628,550,133,726,221,547,186,307,759,6,493,656,566,59,786,19,620,579,416,656,63,389,619,101,448,21,249,213,505,149,459,220,730,153,698,396,75,745,570,47,533,341,696,753,195,754,734,413,735,297,352,561,11,571,468,216,444,54,503,3,197,747,92,614,720,652,435,29,742,604,699,396,127,191,678,731,582,675,702,143,289,535,74,647,466,346,14,607,230,533,695,351,752,272,566,440,108,131,80,177,11,43,32,522,359,237,545,662,254,706,276,205,793,284,221,58,59,782,623,517,700,262,585,669,767,284,180,192,9,314,782,279,287,643,459,797,87,762,485,642,473,430,335,51,349,544,252,56,574,69,49,316,720,649,41,520,610,159,668,129,394,310,624,691,800,646,565,327,678,489,126,232,143,78,213,70,222,494,794,91,568,319,788,561,221,62,8,373,61,669,337,452,159,110,39,527,597,136,193,466,77,180,178,233,21,191,499,671,676,371,381,576,322,225,749,670,25,633,444,405,275,100,748,590,134,768,235,169,410,229,159,537,669,659,191,777,197,504,22,240,622,771,448,203,638,703,27,610,294,711,57,220,36,176,125,75,182,430,622,166,589,270,15,105,346,718,354,788,277,188,202,707,771,426,81,466,782,626,557,218,719,159,686,354,108,397,621,79,200,309,379,659,724,271,313,299,795,720,405,413,89,662,404,410,56,568,522,738,598,499,652,335,395,450,610,302,248,740,366,220,571,367,495,668,771,673,461,562,591,523,21,669,412,443,251,427,320,768,26,379,80,312,135,38,416,247,773,676,723,87,639,264,416,562,631,21,661,117,250,680,113,529,385,591,24,766,470,740,785,499,365,118,659,266,339,782,469,155,437,141,557,68,63,266,675,338,522,706,493,139,21,248,227,53,744,260,686,730,612,143,522,698,467,165,401,202,473,316,145,105,90,340,305,172,567,275,647,425,443,202,479,382,775,372,582,243,245,208,427,538,206,528,720,283,109,213,733,3,45,275,267,57,409,45,746,373,250,41,759,792,518,261,669,397,772,799,256,635,262,509,466,599,741,252,720,375,617,80,593,738,236,335,641,759,376,469,75,797,150,617,93,689,275,517,61,594,201,444,481,520,500,601,756,697,794,33,458,40,556,547,311,613,393,499,602,277,747,640,438,537,84,362,724,233,82,45,173,422,534,278,182,334,26,130,399,163,446,679,670,538,704,580,591,283,199,133,783,301,250,518,693,779,487,42,542,97,414,550,81,237,235,461,635,46,529,659,36,661,792,563,309,84,464,63,204,333,173,269,792,370,524,580,542,138,283,553,201,301,481,40,139,268,515,18,50,170,513,98,765,14,800,425,57,132,104,508,227,396,618,506,311,72,467,259,474,756,71,41,532,5,202,344,684,474,45,791,784,463,507,269,77,746,777,270,671,663,508,615,519,187,98,686,363,647,30,757,717,640,189,449,132,703,710,701,200,127,790,273,48,478,386,448,303,718,252,407,120,578,98,141,766,117,326,251,720,398,245,421,265,177,667,450,640,423,391,795,6,275,145,757,267,436,514,413,796,287,390,675,390,188,58,210,401,227,752,107,174,790,608,631,136,96,442,222,548,795,375,460,34,730,10,288,399,307,308,511,337,321,517,1,19,573,134,478,403,331,550,505,583,273,45,208,467,567,357,504,293,631,661,74,216,229,401,464,408,348,738,781,498,277,772,265,299,771,547,531,211,485,90,339,538,43,765,739,488,133,287,416,134,764,2,225,706,23,794,762,381,510,31,249,80,606,421,404,327,12,624,415,697,482,420,751,334,742,228,359,87,755,603,566,734,196,581,588,568,306,758,641,314,590,327,108,676,123,284,259,414,792,382,447,93,553,226,712,619,543,90,548,693,335,286,474,510,641,458,487,461,8,359,606,297,123,180,431,30,494,140,348,251,418,325,40,728,629,402,153,629,652,387,127,271,549,347,127,621,322,447,456,644,208,303,685,153,761,741,47,467,371,96,507,110,346,658,307,341,599,695,169,378,30,208,398,446,674,419,604,675,275,495,458,76,530,636,546,22,572,635,80,604,588,550,700,22,184,678,522,29,225,195,537,383,736,131,131,160,182,750,638,263,492,157,799,56,610,246,414,58,312,264,205,684,248,42,180,270,702,686,271,491,321,666,300,376,404,547,43,470,448,536,290,413,342,792,207,708,47,619,750,771,708,438,633,332,208,732,279,620,507,89,202,240,782,426,97,550,302,418,209,421,525,579,581,665,694,654,215,702,737,344,491,611,424,536,469,512,617,372,596,771,363,793,366,228,501,326,349,4,772,414,606,567,520,563,493,278,202,588,348,779,666,701,156,759,295,253,514,327,603,80,126,768,680,739,60,231,548,477,271,143,45,427,478,595,229,597,709,308,681,134,694,325,258,178,411,528,265,525,515,319,11,107,498,101,601,767,37,500,284,685,606,359,648,399,66,128,289,136,275,610,524,21,716,78,532,444,603,41,162,428,199,403,98,214,795,411,285,727,378,786,69,32,21,487,298,688,302,427,531,49,362,155,530,158,732,751,107,384,180,631,154,406,563,75,564,331,570,287,658,123,129,227,682,191,471,554,590,79,74,546,601,690,250,512,584,45,150,17,763,727,589,277,49,396,538,491,622,532,455,642,324,767,642,74,757,391,327,376,42,571,530,153,73,57,634,481,351,532,190,281,624,661,438,101,386,150,398,161,710,192,607,742,270,769,798,578,746,510,368,465,512,165,193,516,438,290,60,721,437,605,471,798,773,712,105,776,217,627,730,677,611,772,668,555,420,169,95,498,616,38,301,278,22,714,572,511,6,615,259,439,488,103,666,338,41,235,493,498,151,558,412,800,133,385,51,225,759,472,372,733,496,332,274,575,351,593,54,558,297,615,406,159,58,217,548,767,246,383,638,587,725,748,679,364,798,339,747,139,582,234,413,262,444,76,75,502,63,337,243,229,429,707,742,24,477,720,137,541,358,555,228,254,578,462,316,709,139,764,574,426,314,750,505,84,462,451,505,235,299,750,108,38,381,154,573,50,273,251,158,168,96,756,439,257,425,730,677,245,210,778,563,176,187,65,309,397,349,90,662,627,580,191,223,66,313,211,713,697,25,700,323,678,653,783,31,541,749,45,106,624,737,760,393,369,798,715,334,159,256,340,246,194,698,599,581,12,251,639,765,223,439,263,692,709,576,289,605,373,22,9,226,744,716,759,332,450,167,96,39,762,197,212,285,15,101,445,340,637,367,8,396,542,279,108,779,402,744,633,316,756,359,231,103,1,203,574,702,772,553,476,489,301,782,298,397,630,346,130,623,512,40,186,594,31,149,545,503,438,670,364,347,100,644,459,188,576,458,760,529,442,666,51,324,717,405,121,650,707,2,213,406,763,234,283,232,460,339,253,241,204,698,437,437,276,463,143,502,797,799,11,650,232,531,625,357,485,284,120,788,240,486,539,144,581,614,597,275,281,534,264,528,559,707,40,274,148,49,228,355,222,28,171,391,355,29,118,594,718,633,482,24,177,588,294,296,323,574,207,427,211,649,257,190,459,298,558,10,752,480,549,763,281,290,28,785,630,382,61,509,147,555,784,685,155,579,256,643,268,459,68,638,192,118,489,55,132,385,697,115,789,421,384,484,722,389,571,92,46,429,223,222,648,410,268,139,671,210,745,19,438,278,425,469,465,784,394,698,310,678,651,76,665,78,86,648,498,505,508,153,144,78,780,785,83,175,121,534,80,64,793,12,213,159,610,741,561,180,222,570,531,622,166,155,235,559,42,521,303,410,57,792,181,568,569,17,1,199,216,476,626,394,426,691,197,236,445,577,589,684,83,360,663,50,534,297,640,350,476,224,210,441,117,379,27,227,589,254,791,143,543,457,282,777,480,357,788,306,167,155,262,797,573,736,174,28,281,273,650,411,181,375,120,377,42,244,341,631,106,324,283,105,551,618,562,600,645,161,396,722,485,504,767,375,500,753,372,540,416,102,585,642,781,14,489,4,420,666,287,4,36,194,655,176,43,76,87,560,34,731,479,524,304,738,634,774,125,178,256,65,364,85,159,660,154,221,633,763,485,685,364,81,601,204,378,559,751,342,261,468,441,313,205,782,114,253,418,735,118,278,47,186,212,494,171,627,605,509,740,746,620,794,646,79,124,118,345,92,598,483,496,229,610,717,702,316,443,784,489,755,442,403,187,4,371,75,158,548,405,99,32,326,590,221,786,181,338,479,40,734,82,199,377,252,580,562,438,711,598,643,390,771,728,584,344,318,304,770,633,444,533,763,565,86,180,99,641,48,210,251,786,167,713,774,698,418,146,301,199,276,701,647,279,375,371,27,59,297,448,397,382,175,432,566,709,539,397,374,231,704,796,504,411,116,740,589,451,541,771,475,535,509,213,342,705,362,696,340,80,332,783,660,351,513,260,280,154,557,320,195,311,237,317,731,346,545,161,243,796,26,674,350,543,40,13,147,761,336,423,503,344,133,279,747,81,46,671,532,309,123,194,208,620,649,747,631,618,470,287,188,756,743,522,503,549,661,720,363,350,92,667,330,235,507,746,527,431,224,251,747,131,489,690,772,203,488,52,344,496,230,453,249,394,107,406,491,263,191,126,371,274,706,544,127,374,737,278,242,55,218,699,580,352,682,273,568,471,491,490,278,636,452,230,573,90,355,605,289,254,798,192,345,22,551,307,510,717,144,750,663,654,61,224,686,769,382,393,72,634,31,473,722,310,701,264,214,479,174,250,382,368,340,127,480,794,771,270,21,664,223,29,268,323,623,355,103,744,82,185,591,660,43,404,252,83,635,32,202,471,660,335,339,560,146,621,622,137,568,452,692,599,458,702,547,679,175,136,342,534,126,232,608,282,767,793,220,61,743,196,718,64,525,667,465,423,148,621,254,689,386,770,740,73,453,330,785,614,632,750,711,214,369,432,303,537,64,395,266,437,365,590,565,232,329,135,794,57,141,663,667,784,9,348,322,704,97,121,257,1,187,355,660,792,733,746,130,628,786,394,772,348,273,208,481,630,146,421,164,224,18,645,62,416,521,249,198,317,159,453,608,696,510,134,554,343,488,752,666,659,211,230,138,772,125,90,419,390,222,401,21,659,121,142,61,237,632,686,534,608,338,267,19,680,663,555,127,433,299,683,173,542,165,571,229,397,237,492,791,681,550,152,470,203,335,35,534,576,56,250,463,202,189,237,319,585,387,243,482,799,54,467,543,518,185,16,21,390,459,50,580,651,193,536,776,7,791,778,454,215,610,632,779,439,180,660,599,54,297,312,781,639,570,462,795,780,606,664,687,160,61,667,421,546,691,590,462,602,103,451,353,448,602,105,404,104,39,342,350,682,633,311,367,675,652,80,620,553,488,780,55,655,474,435,719,332,480,228,745,291,100,14,190,306,246,328,199,95,317,589,707,432,352,354,492,655,250,597,91,750,702,54,756,475,745,240,333,509,692,418,708,740,565,620,530,538,469,395,662,716,756,275,744,514,491,561,422,440,156,654,540,25,736,778,116,467,636,573,245,643,12,170,736,98,296,732,657,225,96,327,269,487,127,52,3,308,233,638,590,596,455,556,538,99,450,690,715,750,202,278,300,504,513,597,738,228,419,532,424,87,65,593,720,792,715,38,355,642,259,535,59,629,468,145,42,261,544,218,606,394,220,204,315,36,161,520,736,593,553,219,679,366,317,357,14,347,579,420,434,109,794,647,377,771,302,444,681,487,306,236,442,88,106,28,427,751,441,734,101,395,133,121,182,1,18,629,727,688,176,571,185,380,86,675,51,192,653,73,664,488,314,289,341,742,415,495,276,40,513,104,177,305,690,108,365,83,719,178,390,331,662,573,525,292,365,175,22,387,174,61,437,12,588,183,787,332,290,265,557,363,694,502,775,504,526,297,386,493,485,454,595,587,49,743,293,609,570,108,442,505,431,22,61,395,277,250,329,34,487,135,536,195,704,366,86,768,719,609,1,415,486,129,735,11,798,301,737,556,465,320,298,500,641,497,481,33,229,774,700,281,658,234,416,403,446,515,68,485,71,771,432,791,647,637,586,214,628,238,600,367,523,512,203,389,69,628,105,640,220,168,136,557,317,297,194,701,691,357,244,43,296,341,170,711,39,264,483,256,105,262,408,49,266,137,290,718,772,511,334,654,251,536,194,284,442,672,45,35,98,218,432,586,467,457,641,545,475,735,508,161,355,154,726,668,15,415,422,197,581,438,454,447,642,349,677,227,230,18,272,140,102,12,153,481,794,234,765,555,304,661,646,410,123,586,169,450,510,412,110,787,779,199,697,324,494,726,585,247,254,615,633,713,604,401,415,380,313,222,509,186,260,498,771,85,363,596,253,660,611,394,749,50,669,751,311,563,598,37,239,171,739,292,744,720,320,200,27,480,280,670,54,305,300,370,301,435,142,71,344,255,598,696,619,350,731,633,35,345,49,542,361,510,501,636,296,101,52,626,34,336,330,202,511,340,495,492,212,39,568,248,404,438,764,370,58,366,126,93,524,525,234,108,226,259,767,621,573,506,326,35,121,98,378,239,774,363,678,302,299,180,194,12,457,561,322,519,616,129,265,455,657,141,425,573,249,145,596,419,695,506,500,145,20,426,604,136,762,34,615,73,331,80,369,17,500,460,395,395,706,581,462,37,379,711,373,169,99,627,220,476,368,518,571,619,766,755,386,304,196,680,406,346,486,513,410,58,388,400,479,719,618,545,106,748,584,168,753,58,746,433,159,257,148,7,351,766,775,614,395,43,777,46,100,570,63,60,667,54,474,357,7,494,18,713,444,281,464,521,169,407,511,753,694,272,778,443,147,16,743,239,771,373,130,271,303,19,129,399,150,256,140,115,565,183,53,389,88,110,797,155,117,358,142,531,439,476,758,549,455,616,105,786,573,320,445,8,93,713,306,75,479,16,648,681,118,299,408,578,689,23,543,197,673,344,251,108,192,778,267,551,82,236,563,523,206,176,206,665,81,260,165,772,303,129,560,396,406,703,602,557,369,762,168,549,519,371,792,233,224,687,388,388,778,690,546,474,670,765,627,280,337,316,339,137,696,139,315,472,21,529,290,588,598,797,284,670,83,390,279,693,12,327,583,275,601,797,623,587,23,266,402,536,103,697,783,503,549,429,348,685,561,616,730,742,75,347,383,219,314,661,797,9,108,213,463,754,442,389,443,576,81,309,625,570,49,569,244,322,382,692,716,485,661,244,690,74,279,685,242,161,437,696,261,346,508,206,160,43,146,185,523,390,700,575,444,304,775,643,501,723,540,91,795,723,300,425,427,243,46,35,288,338,136,403,330,231,207,651,594,754,611,364,2,538,174,761,47,531,121,338,137,405,557,479,96,795,701,164,144 +]) +x = set(x) +print(x) + From b26e46203b85388eb578f18e4c7fa44e3ce7b7d5 Mon Sep 17 00:00:00 2001 From: Azad Kshitij Date: Sun, 4 Oct 2020 23:49:31 +0530 Subject: [PATCH 2/4] Add quickshort algorithm in python --- python/quickShort.py | 1 - 1 file changed, 1 deletion(-) diff --git a/python/quickShort.py b/python/quickShort.py index eee49ca..53390c8 100644 --- a/python/quickShort.py +++ b/python/quickShort.py @@ -24,7 +24,6 @@ def quick_short(List): lower.append(i) return quick_short(lower) + [pivot] + quick_short(heigher) - x = quick_short([ 89,399,757,257,372,553,241,216,48,355,41,34,798,470,751,285,288,768,563,2,638,113,153,394,500,715,495,217,578,625,628,27,345,329,579,677,331,211,354,646,715,595,784,552,515,226,598,533,508,332,515,789,521,261,117,415,712,604,93,144,595,38,423,798,165,472,573,771,312,330,92,731,775,579,140,329,530,439,276,166,395,233,41,314,141,201,688,383,763,606,87,672,207,564,687,285,24,216,394,675,652,302,33,786,540,173,664,624,58,190,792,43,178,212,557,231,389,641,586,504,301,92,573,126,85,678,27,480,765,637,255,193,300,693,74,16,146,479,54,87,503,215,161,208,673,83,180,520,591,786,559,486,12,474,174,310,359,463,185,402,610,324,720,237,364,386,609,411,303,549,618,360,23,620,466,477,41,505,337,701,537,631,251,701,422,697,408,482,338,724,591,94,253,449,381,584,6,531,4,689,183,399,44,473,716,59,661,443,592,422,428,37,770,107,689,783,215,558,159,263,80,35,275,404,111,580,230,700,97,611,329,766,117,693,560,98,339,217,316,783,396,774,423,769,618,486,207,50,324,596,778,712,301,565,26,122,327,724,538,392,56,428,550,172,314,195,778,258,768,130,687,754,67,634,375,749,780,505,175,694,183,514,250,16,784,27,684,620,269,190,782,300,554,578,670,509,480,230,444,336,136,23,659,46,261,273,570,393,240,380,340,224,745,308,361,43,444,179,293,244,50,349,52,346,102,520,160,57,40,733,169,761,280,284,603,422,666,52,531,779,110,181,79,76,401,385,334,628,528,553,507,420,739,402,333,552,588,8,57,248,767,199,195,626,198,312,21,121,127,430,668,387,243,85,452,336,104,538,174,707,130,239,592,41,73,334,293,396,88,264,602,86,11,94,357,445,336,724,623,614,531,585,144,469,710,326,581,152,239,189,727,54,736,697,574,1,130,291,177,761,270,490,528,54,671,435,115,635,595,526,253,375,37,622,180,271,4,35,763,473,721,92,413,464,230,524,644,412,77,111,92,1,686,747,525,150,128,298,160,177,514,669,742,532,730,734,171,711,762,682,49,484,700,152,128,449,704,749,384,208,323,429,565,510,10,157,794,180,416,436,481,670,663,268,183,585,645,714,239,536,475,388,22,35,95,30,537,577,784,790,603,3,409,213,192,468,326,521,42,574,21,717,276,689,787,316,118,520,779,356,583,47,593,618,371,142,119,360,487,357,647,376,774,623,263,720,211,242,708,3,383,274,388,652,306,484,356,378,621,239,710,131,741,686,321,25,57,475,724,394,76,114,308,92,197,220,99,756,185,621,229,276,571,196,730,632,584,216,635,283,328,701,466,48,264,322,215,121,656,797,595,428,422,374,184,138,230,175,564,213,83,772,552,292,791,595,95,81,259,783,85,131,543,1,676,134,261,277,411,258,412,738,481,186,774,445,539,522,157,800,478,83,289,731,460,89,405,583,618,335,590,632,498,728,778,634,431,400,160,46,124,194,124,628,440,661,758,583,275,260,88,80,789,116,313,354,318,319,427,257,335,466,243,723,529,92,55,552,792,630,575,148,66,509,165,556,587,165,470,650,503,451,295,560,273,560,109,40,479,338,611,684,319,77,13,216,82,323,518,202,677,798,61,220,573,248,487,737,277,597,338,645,784,306,595,393,478,702,657,242,529,465,584,519,15,48,533,458,70,684,66,61,363,24,338,431,115,190,475,548,731,180,774,150,126,392,261,377,383,333,613,296,793,682,649,444,707,8,378,537,545,767,527,746,108,118,454,214,489,257,630,335,575,424,204,135,360,661,577,754,688,710,231,577,142,337,406,135,364,545,622,242,286,270,468,370,204,786,559,575,763,799,484,781,130,223,746,6,682,298,311,329,35,744,174,492,703,519,93,497,586,43,631,742,455,392,572,663,34,120,688,301,466,646,34,218,228,696,449,672,256,271,677,65,330,318,210,23,114,207,373,727,280,563,23,779,397,48,362,276,67,127,352,448,671,423,471,18,589,799,60,757,369,314,176,498,685,497,184,382,487,261,246,101,242,2,516,176,795,203,456,513,342,705,263,120,353,720,678,339,263,712,524,561,568,9,781,437,572,798,73,549,228,47,138,748,766,745,718,460,15,507,663,461,624,249,267,319,459,170,426,154,590,156,84,658,529,248,93,168,453,712,374,353,507,530,319,22,378,457,512,759,430,196,136,358,530,80,639,125,269,65,245,486,748,639,229,71,402,252,631,121,39,379,19,596,500,553,574,640,793,72,447,243,293,350,737,3,655,314,119,78,575,759,42,538,402,460,749,788,264,207,578,32,130,743,629,59,66,233,759,226,314,475,775,405,488,765,20,720,117,68,674,54,735,519,372,567,497,237,32,380,719,323,346,785,160,349,415,138,49,513,297,483,239,599,168,546,297,702,450,150,427,598,756,433,720,467,221,559,31,535,693,179,469,684,602,605,186,289,266,628,522,256,714,290,727,251,331,77,191,25,517,17,383,510,565,444,566,742,319,391,81,344,655,798,653,21,544,375,112,437,702,519,33,459,244,635,30,15,326,327,610,613,390,785,494,733,95,191,568,561,792,502,169,300,102,65,132,111,543,745,742,111,51,732,678,605,717,184,305,526,559,109,775,5,427,424,57,372,635,418,747,705,419,572,182,189,760,663,216,125,646,12,15,751,45,323,586,27,560,525,625,633,484,66,267,751,78,60,229,32,701,669,13,329,664,14,501,751,71,614,303,337,643,452,387,229,144,620,733,238,656,789,633,319,258,336,247,257,19,738,343,91,305,333,371,301,728,392,351,658,42,655,422,681,647,539,335,296,189,392,331,392,256,117,615,43,297,208,17,233,315,137,238,109,632,537,529,79,326,217,396,237,24,645,706,779,671,266,90,189,311,52,42,8,691,337,516,626,309,682,331,398,124,743,515,596,528,678,536,33,65,661,487,16,648,387,414,235,21,203,595,687,325,642,90,782,586,478,589,85,379,709,652,387,527,216,180,279,650,740,715,584,546,440,736,672,167,453,323,153,566,239,790,439,224,497,450,307,236,193,612,22,491,10,591,320,590,529,672,484,95,359,323,297,214,217,505,79,409,86,632,378,785,665,196,48,212,181,162,513,368,77,733,310,523,546,625,342,590,543,207,713,28,134,226,726,40,365,670,257,558,486,448,759,183,611,506,188,336,537,532,705,190,169,516,595,610,24,219,283,228,150,65,201,517,564,371,118,785,790,35,210,364,692,257,697,25,301,169,645,158,41,143,537,46,120,436,332,20,722,353,61,738,502,266,716,520,39,421,486,345,193,726,683,792,421,508,720,137,445,731,170,397,334,726,46,54,749,241,452,299,357,768,188,529,9,123,159,145,461,213,52,380,471,646,569,461,526,120,733,45,196,548,628,395,126,417,487,758,248,795,553,257,366,155,755,757,632,314,366,203,414,97,145,498,307,666,516,320,122,218,23,245,158,67,401,254,337,413,23,562,693,694,198,467,648,252,29,5,312,266,796,289,534,129,397,307,240,192,640,105,18,371,383,396,9,558,308,763,678,10,484,689,136,311,67,444,305,541,379,356,50,223,675,773,345,719,330,378,158,723,496,438,13,699,280,297,769,279,798,139,303,260,643,501,686,37,629,576,745,239,108,634,691,131,416,706,763,161,549,178,627,535,8,718,223,354,124,594,364,40,224,356,763,140,769,747,100,619,504,759,649,33,432,509,671,58,548,415,349,38,152,396,423,106,479,489,235,681,540,588,521,348,528,264,124,331,420,425,556,764,62,579,489,78,118,128,683,603,201,328,427,455,110,759,290,48,95,35,168,301,142,189,525,727,696,347,357,458,787,181,604,655,14,505,94,486,737,547,327,798,663,449,753,167,225,309,159,623,38,622,619,656,749,351,190,675,729,499,358,787,375,83,69,761,755,474,473,220,171,381,351,145,688,461,366,568,381,320,727,603,304,588,787,683,413,271,586,173,389,441,429,460,500,462,438,547,176,74,129,208,69,659,663,598,250,232,409,123,766,692,285,262,398,17,60,520,451,340,404,353,635,356,82,528,237,794,264,471,181,726,446,178,425,333,241,210,508,314,266,39,652,392,242,57,47,776,718,103,743,576,451,570,309,302,260,795,645,424,605,595,196,406,611,485,407,497,415,419,189,35,158,370,725,101,392,27,427,590,604,289,29,117,342,477,776,474,674,311,225,378,773,516,367,414,732,434,709,715,387,517,295,520,742,709,379,627,737,703,205,702,402,629,200,148,280,302,594,83,442,771,194,428,316,707,277,787,794,668,87,724,740,759,645,753,329,645,160,556,339,286,139,301,696,171,234,800,739,777,361,287,585,262,683,678,663,199,754,687,57,74,62,710,723,751,101,143,132,272,77,582,609,547,386,21,482,613,302,136,366,33,314,512,769,87,785,479,683,566,256,617,733,514,614,719,329,632,443,642,5,284,779,205,192,714,792,667,657,532,19,569,698,220,350,408,146,477,213,509,770,676,428,523,339,593,154,643,173,461,264,17,767,67,398,364,277,199,739,484,165,322,531,502,581,21,502,761,151,509,215,545,7,644,475,345,359,158,377,615,605,262,50,535,542,166,217,246,88,202,370,452,568,712,516,107,544,206,410,253,458,746,126,176,277,254,599,369,372,278,427,428,245,103,238,46,699,425,424,186,664,188,97,418,174,212,771,214,677,217,454,679,662,28,414,285,211,317,20,442,751,760,241,386,587,510,497,105,149,527,225,306,315,320,16,578,431,307,149,176,613,137,127,58,654,3,127,8,118,245,783,209,66,539,156,148,672,766,780,657,322,776,155,150,43,586,666,563,234,57,360,111,446,371,69,84,125,719,700,238,316,212,143,214,16,657,499,595,473,258,763,78,741,65,776,375,112,551,431,367,550,33,646,46,648,273,255,452,331,763,167,247,405,274,400,595,27,103,183,109,760,552,15,167,610,565,483,397,407,511,67,121,726,683,389,162,520,238,367,540,417,242,382,653,337,413,774,454,667,800,52,536,708,657,648,32,121,798,669,719,470,382,50,195,768,335,301,749,763,161,465,387,148,339,685,251,25,503,679,175,253,563,159,651,290,453,23,786,541,201,551,277,701,407,208,231,143,22,444,386,136,533,291,384,528,104,413,591,78,201,537,666,431,548,729,309,629,44,192,1,545,120,226,166,188,711,362,20,144,202,768,247,248,492,92,302,585,596,513,80,579,489,440,146,496,284,252,395,571,449,260,255,131,704,173,47,473,488,292,481,338,714,563,599,210,483,777,92,382,794,535,197,557,47,130,348,152,536,698,478,160,285,670,324,341,68,793,262,777,122,44,27,179,237,542,43,38,750,475,493,658,118,382,352,45,348,197,242,508,365,528,171,534,427,704,408,612,379,740,481,403,190,255,208,729,359,543,669,12,661,583,772,251,434,778,325,8,638,649,328,189,169,338,626,675,60,448,480,21,486,205,104,313,566,198,267,418,73,23,420,476,482,290,582,263,249,673,348,771,76,200,115,282,712,228,796,355,198,502,457,347,761,411,403,407,791,77,130,607,663,795,8,778,700,455,520,735,206,499,228,670,32,193,780,227,209,594,636,648,327,478,217,292,123,441,424,92,634,11,435,746,501,792,576,495,145,219,164,731,432,455,602,791,562,443,734,140,47,437,678,86,131,29,658,608,129,751,443,692,572,187,273,705,284,50,93,715,97,661,508,569,87,190,113,285,533,170,371,582,678,147,459,776,229,425,380,742,777,37,436,21,514,2,60,166,572,788,121,116,199,570,309,494,146,656,545,764,706,625,108,114,194,49,632,607,699,271,277,209,155,490,733,575,348,800,762,519,15,523,383,183,186,631,449,413,228,482,223,221,301,288,660,378,719,16,531,661,281,663,658,728,313,55,738,788,245,672,469,241,170,393,224,270,557,5,150,787,435,703,546,471,143,190,759,462,570,646,480,332,596,251,269,690,459,293,612,347,66,349,570,596,692,350,623,506,687,306,466,63,60,93,384,377,88,203,613,365,504,767,412,56,652,252,775,623,457,58,5,706,255,17,146,400,641,58,782,69,500,271,55,346,699,507,273,9,101,414,139,44,226,138,228,244,231,297,742,575,398,382,557,356,634,196,365,160,11,791,73,418,475,649,401,314,210,484,773,360,141,795,521,18,508,281,177,560,76,121,14,279,268,82,254,638,292,752,598,343,672,175,656,520,686,211,405,678,306,3,503,222,313,263,637,552,717,569,299,561,34,159,111,389,100,689,37,379,136,710,19,684,540,740,727,454,115,743,148,701,508,609,100,588,148,252,163,468,111,284,28,578,434,533,428,551,543,587,635,206,156,297,180,226,240,529,542,60,268,106,413,784,552,578,79,231,211,543,621,348,730,64,626,507,426,791,19,318,313,386,795,503,40,399,479,226,231,786,753,563,496,525,303,460,657,243,275,183,168,763,629,154,103,676,454,788,676,610,405,146,59,17,361,383,373,789,682,507,88,766,257,209,257,483,599,409,797,12,572,736,654,80,706,652,206,2,394,177,364,585,776,217,608,312,741,381,102,466,728,797,152,495,692,321,424,600,229,205,418,33,401,7,75,219,346,177,538,149,474,18,178,564,153,315,68,729,63,260,393,337,723,766,350,533,322,260,774,103,243,34,568,431,477,595,137,598,512,630,666,116,288,207,613,37,315,186,696,512,745,314,799,608,184,368,298,711,151,648,368,570,70,62,353,461,589,100,646,590,346,408,713,81,332,628,426,294,116,249,633,16,264,71,57,106,396,383,457,551,797,481,144,705,208,398,649,525,78,17,493,408,369,389,564,193,388,743,382,199,786,727,735,135,529,69,559,189,493,303,135,76,461,587,438,460,642,398,580,47,386,171,271,762,82,165,684,427,434,643,731,616,498,325,91,32,406,594,315,245,141,274,682,711,364,487,292,311,399,395,204,60,519,646,245,617,164,166,776,605,570,391,452,330,286,142,661,562,105,77,191,18,520,399,600,759,384,315,384,190,147,405,674,126,439,502,637,64,525,604,574,526,492,737,654,607,722,154,313,744,785,460,151,529,32,187,760,106,220,438,546,613,544,670,791,784,361,455,169,229,662,250,152,732,527,486,573,233,580,457,12,561,157,148,401,368,674,59,75,428,511,109,490,75,651,548,187,85,516,493,288,71,450,133,254,151,734,559,656,770,651,726,179,609,84,330,742,456,20,580,270,73,497,246,283,177,257,475,559,489,255,49,25,787,575,547,616,684,327,179,639,628,541,129,618,118,797,199,151,563,185,528,115,88,44,658,504,562,311,34,727,273,507,700,331,421,315,131,764,557,727,738,512,764,251,705,216,498,607,536,760,407,703,281,282,345,533,475,276,246,35,253,569,197,525,683,372,643,221,476,600,640,66,206,720,510,495,582,731,256,74,404,178,522,648,9,534,86,132,679,45,42,691,364,681,364,253,313,774,320,86,85,497,69,335,776,63,124,371,405,698,138,343,440,794,22,500,67,393,258,602,91,765,772,410,289,583,28,546,213,589,430,731,490,328,106,494,432,29,695,530,505,639,605,404,508,129,568,648,729,214,658,708,321,480,57,312,302,733,41,418,690,130,524,223,567,176,420,748,341,426,273,629,602,350,491,65,686,660,95,524,462,334,45,563,525,739,251,369,352,401,665,655,464,777,297,65,449,688,776,543,572,119,738,577,278,49,440,90,35,107,267,79,290,610,330,174,83,283,559,195,50,201,566,443,492,192,334,772,610,112,612,173,115,181,195,455,727,374,374,390,60,75,756,150,375,683,205,768,488,397,197,188,262,367,492,292,483,593,786,118,67,661,750,651,696,82,577,787,225,581,600,448,154,588,47,185,766,759,223,641,542,555,671,131,598,22,564,605,617,553,721,161,329,687,562,489,396,287,664,712,502,212,170,727,776,56,527,404,440,272,796,537,734,788,449,243,518,233,143,525,679,153,163,363,15,484,521,225,141,127,39,165,94,538,80,533,371,390,707,49,368,450,746,88,760,285,580,81,632,447,343,427,708,523,316,23,769,539,240,257,732,83,14,412,302,795,8,785,648,755,83,142,649,104,632,547,436,694,349,707,319,386,468,711,387,218,23,560,492,463,525,696,263,736,132,757,652,159,602,364,611,92,245,796,424,478,333,795,658,622,668,443,736,552,118,593,641,165,531,149,245,382,664,590,278,488,248,648,81,153,88,462,581,237,350,714,27,457,733,315,199,90,685,305,355,261,460,357,653,798,150,451,202,341,76,259,378,133,134,468,630,518,55,593,774,736,392,465,425,289,61,564,682,98,283,79,751,692,568,645,209,287,563,293,612,791,325,94,5,243,285,452,242,193,720,594,756,641,56,420,424,436,53,562,507,458,199,132,449,491,135,263,276,384,463,523,504,532,703,759,732,483,492,232,580,529,566,790,371,678,531,164,309,180,624,498,296,2,25,283,633,433,507,483,309,537,781,445,173,97,628,678,506,411,395,366,727,335,101,325,598,29,784,756,595,511,464,416,600,205,171,793,35,628,418,169,492,355,543,354,750,441,71,553,250,246,764,491,567,762,669,593,173,14,402,753,360,668,2,569,4,106,588,649,50,661,372,309,283,526,478,240,450,288,245,276,161,720,335,54,653,430,159,663,558,645,740,85,103,216,263,410,711,311,709,58,93,581,154,745,156,517,177,410,481,548,68,70,146,757,123,360,79,227,742,626,311,532,96,157,704,790,398,211,468,88,82,336,289,75,506,28,304,107,800,376,412,432,524,112,188,460,33,388,646,483,201,699,757,581,550,270,760,306,285,74,617,575,699,740,19,709,658,228,147,536,271,693,697,692,110,741,131,660,316,592,637,359,687,166,640,337,470,644,415,514,518,57,667,382,678,216,106,341,240,676,454,304,350,247,247,472,585,396,71,492,777,145,574,484,697,697,604,675,482,455,302,538,54,649,291,369,490,606,54,445,222,450,758,653,343,386,388,275,150,490,538,256,3,525,571,70,588,117,213,682,643,567,244,50,516,751,451,285,765,172,791,156,582,166,561,710,404,359,76,303,449,164,510,338,448,47,15,474,121,593,305,502,4,148,605,505,750,364,359,5,734,536,95,177,536,761,517,600,494,674,344,718,643,182,523,46,606,228,63,704,680,337,796,444,541,638,208,729,711,327,68,652,496,774,444,354,636,318,69,634,592,490,84,404,676,279,239,553,175,702,302,706,587,75,212,385,773,696,39,125,273,581,579,305,483,212,670,129,760,645,359,328,758,585,385,298,304,532,414,684,548,655,467,137,772,411,310,228,389,310,518,424,8,787,743,246,135,209,306,599,175,371,319,197,734,271,349,447,432,746,610,594,796,744,589,183,690,627,696,649,743,183,466,210,759,1,686,28,220,245,183,632,700,70,152,287,537,531,548,609,540,62,496,371,425,371,351,32,258,501,271,269,691,559,391,258,239,349,208,776,427,781,589,729,465,403,530,606,382,728,249,316,101,368,459,166,91,483,200,378,161,744,151,768,714,685,234,369,18,28,385,55,433,343,110,654,726,439,556,146,494,517,788,265,293,120,750,750,120,85,492,443,627,356,322,566,248,290,596,570,238,117,425,772,636,69,204,618,30,240,736,375,197,127,626,599,719,47,211,199,543,72,550,641,62,436,364,468,587,399,542,629,475,106,158,389,644,189,602,789,795,114,519,440,422,477,392,797,284,160,197,505,253,733,769,712,463,440,533,355,403,406,691,535,66,237,209,3,614,16,365,634,388,671,315,106,596,71,616,16,498,47,328,95,47,321,660,114,755,674,121,284,628,792,770,157,316,32,773,515,254,131,286,20,350,474,312,720,776,535,70,531,108,753,350,520,260,98,731,675,351,180,123,739,557,66,396,206,12,772,206,794,54,296,177,676,451,428,580,68,492,553,756,618,251,697,34,556,51,688,394,576,584,526,345,235,220,21,620,798,197,277,194,272,80,421,196,717,675,393,730,694,621,760,386,379,96,124,130,413,381,518,491,735,233,601,362,760,555,381,104,723,773,798,569,202,378,278,725,703,138,166,452,678,525,26,472,417,494,64,44,679,554,277,402,767,301,557,144,516,503,419,150,97,444,483,731,62,486,32,628,550,133,726,221,547,186,307,759,6,493,656,566,59,786,19,620,579,416,656,63,389,619,101,448,21,249,213,505,149,459,220,730,153,698,396,75,745,570,47,533,341,696,753,195,754,734,413,735,297,352,561,11,571,468,216,444,54,503,3,197,747,92,614,720,652,435,29,742,604,699,396,127,191,678,731,582,675,702,143,289,535,74,647,466,346,14,607,230,533,695,351,752,272,566,440,108,131,80,177,11,43,32,522,359,237,545,662,254,706,276,205,793,284,221,58,59,782,623,517,700,262,585,669,767,284,180,192,9,314,782,279,287,643,459,797,87,762,485,642,473,430,335,51,349,544,252,56,574,69,49,316,720,649,41,520,610,159,668,129,394,310,624,691,800,646,565,327,678,489,126,232,143,78,213,70,222,494,794,91,568,319,788,561,221,62,8,373,61,669,337,452,159,110,39,527,597,136,193,466,77,180,178,233,21,191,499,671,676,371,381,576,322,225,749,670,25,633,444,405,275,100,748,590,134,768,235,169,410,229,159,537,669,659,191,777,197,504,22,240,622,771,448,203,638,703,27,610,294,711,57,220,36,176,125,75,182,430,622,166,589,270,15,105,346,718,354,788,277,188,202,707,771,426,81,466,782,626,557,218,719,159,686,354,108,397,621,79,200,309,379,659,724,271,313,299,795,720,405,413,89,662,404,410,56,568,522,738,598,499,652,335,395,450,610,302,248,740,366,220,571,367,495,668,771,673,461,562,591,523,21,669,412,443,251,427,320,768,26,379,80,312,135,38,416,247,773,676,723,87,639,264,416,562,631,21,661,117,250,680,113,529,385,591,24,766,470,740,785,499,365,118,659,266,339,782,469,155,437,141,557,68,63,266,675,338,522,706,493,139,21,248,227,53,744,260,686,730,612,143,522,698,467,165,401,202,473,316,145,105,90,340,305,172,567,275,647,425,443,202,479,382,775,372,582,243,245,208,427,538,206,528,720,283,109,213,733,3,45,275,267,57,409,45,746,373,250,41,759,792,518,261,669,397,772,799,256,635,262,509,466,599,741,252,720,375,617,80,593,738,236,335,641,759,376,469,75,797,150,617,93,689,275,517,61,594,201,444,481,520,500,601,756,697,794,33,458,40,556,547,311,613,393,499,602,277,747,640,438,537,84,362,724,233,82,45,173,422,534,278,182,334,26,130,399,163,446,679,670,538,704,580,591,283,199,133,783,301,250,518,693,779,487,42,542,97,414,550,81,237,235,461,635,46,529,659,36,661,792,563,309,84,464,63,204,333,173,269,792,370,524,580,542,138,283,553,201,301,481,40,139,268,515,18,50,170,513,98,765,14,800,425,57,132,104,508,227,396,618,506,311,72,467,259,474,756,71,41,532,5,202,344,684,474,45,791,784,463,507,269,77,746,777,270,671,663,508,615,519,187,98,686,363,647,30,757,717,640,189,449,132,703,710,701,200,127,790,273,48,478,386,448,303,718,252,407,120,578,98,141,766,117,326,251,720,398,245,421,265,177,667,450,640,423,391,795,6,275,145,757,267,436,514,413,796,287,390,675,390,188,58,210,401,227,752,107,174,790,608,631,136,96,442,222,548,795,375,460,34,730,10,288,399,307,308,511,337,321,517,1,19,573,134,478,403,331,550,505,583,273,45,208,467,567,357,504,293,631,661,74,216,229,401,464,408,348,738,781,498,277,772,265,299,771,547,531,211,485,90,339,538,43,765,739,488,133,287,416,134,764,2,225,706,23,794,762,381,510,31,249,80,606,421,404,327,12,624,415,697,482,420,751,334,742,228,359,87,755,603,566,734,196,581,588,568,306,758,641,314,590,327,108,676,123,284,259,414,792,382,447,93,553,226,712,619,543,90,548,693,335,286,474,510,641,458,487,461,8,359,606,297,123,180,431,30,494,140,348,251,418,325,40,728,629,402,153,629,652,387,127,271,549,347,127,621,322,447,456,644,208,303,685,153,761,741,47,467,371,96,507,110,346,658,307,341,599,695,169,378,30,208,398,446,674,419,604,675,275,495,458,76,530,636,546,22,572,635,80,604,588,550,700,22,184,678,522,29,225,195,537,383,736,131,131,160,182,750,638,263,492,157,799,56,610,246,414,58,312,264,205,684,248,42,180,270,702,686,271,491,321,666,300,376,404,547,43,470,448,536,290,413,342,792,207,708,47,619,750,771,708,438,633,332,208,732,279,620,507,89,202,240,782,426,97,550,302,418,209,421,525,579,581,665,694,654,215,702,737,344,491,611,424,536,469,512,617,372,596,771,363,793,366,228,501,326,349,4,772,414,606,567,520,563,493,278,202,588,348,779,666,701,156,759,295,253,514,327,603,80,126,768,680,739,60,231,548,477,271,143,45,427,478,595,229,597,709,308,681,134,694,325,258,178,411,528,265,525,515,319,11,107,498,101,601,767,37,500,284,685,606,359,648,399,66,128,289,136,275,610,524,21,716,78,532,444,603,41,162,428,199,403,98,214,795,411,285,727,378,786,69,32,21,487,298,688,302,427,531,49,362,155,530,158,732,751,107,384,180,631,154,406,563,75,564,331,570,287,658,123,129,227,682,191,471,554,590,79,74,546,601,690,250,512,584,45,150,17,763,727,589,277,49,396,538,491,622,532,455,642,324,767,642,74,757,391,327,376,42,571,530,153,73,57,634,481,351,532,190,281,624,661,438,101,386,150,398,161,710,192,607,742,270,769,798,578,746,510,368,465,512,165,193,516,438,290,60,721,437,605,471,798,773,712,105,776,217,627,730,677,611,772,668,555,420,169,95,498,616,38,301,278,22,714,572,511,6,615,259,439,488,103,666,338,41,235,493,498,151,558,412,800,133,385,51,225,759,472,372,733,496,332,274,575,351,593,54,558,297,615,406,159,58,217,548,767,246,383,638,587,725,748,679,364,798,339,747,139,582,234,413,262,444,76,75,502,63,337,243,229,429,707,742,24,477,720,137,541,358,555,228,254,578,462,316,709,139,764,574,426,314,750,505,84,462,451,505,235,299,750,108,38,381,154,573,50,273,251,158,168,96,756,439,257,425,730,677,245,210,778,563,176,187,65,309,397,349,90,662,627,580,191,223,66,313,211,713,697,25,700,323,678,653,783,31,541,749,45,106,624,737,760,393,369,798,715,334,159,256,340,246,194,698,599,581,12,251,639,765,223,439,263,692,709,576,289,605,373,22,9,226,744,716,759,332,450,167,96,39,762,197,212,285,15,101,445,340,637,367,8,396,542,279,108,779,402,744,633,316,756,359,231,103,1,203,574,702,772,553,476,489,301,782,298,397,630,346,130,623,512,40,186,594,31,149,545,503,438,670,364,347,100,644,459,188,576,458,760,529,442,666,51,324,717,405,121,650,707,2,213,406,763,234,283,232,460,339,253,241,204,698,437,437,276,463,143,502,797,799,11,650,232,531,625,357,485,284,120,788,240,486,539,144,581,614,597,275,281,534,264,528,559,707,40,274,148,49,228,355,222,28,171,391,355,29,118,594,718,633,482,24,177,588,294,296,323,574,207,427,211,649,257,190,459,298,558,10,752,480,549,763,281,290,28,785,630,382,61,509,147,555,784,685,155,579,256,643,268,459,68,638,192,118,489,55,132,385,697,115,789,421,384,484,722,389,571,92,46,429,223,222,648,410,268,139,671,210,745,19,438,278,425,469,465,784,394,698,310,678,651,76,665,78,86,648,498,505,508,153,144,78,780,785,83,175,121,534,80,64,793,12,213,159,610,741,561,180,222,570,531,622,166,155,235,559,42,521,303,410,57,792,181,568,569,17,1,199,216,476,626,394,426,691,197,236,445,577,589,684,83,360,663,50,534,297,640,350,476,224,210,441,117,379,27,227,589,254,791,143,543,457,282,777,480,357,788,306,167,155,262,797,573,736,174,28,281,273,650,411,181,375,120,377,42,244,341,631,106,324,283,105,551,618,562,600,645,161,396,722,485,504,767,375,500,753,372,540,416,102,585,642,781,14,489,4,420,666,287,4,36,194,655,176,43,76,87,560,34,731,479,524,304,738,634,774,125,178,256,65,364,85,159,660,154,221,633,763,485,685,364,81,601,204,378,559,751,342,261,468,441,313,205,782,114,253,418,735,118,278,47,186,212,494,171,627,605,509,740,746,620,794,646,79,124,118,345,92,598,483,496,229,610,717,702,316,443,784,489,755,442,403,187,4,371,75,158,548,405,99,32,326,590,221,786,181,338,479,40,734,82,199,377,252,580,562,438,711,598,643,390,771,728,584,344,318,304,770,633,444,533,763,565,86,180,99,641,48,210,251,786,167,713,774,698,418,146,301,199,276,701,647,279,375,371,27,59,297,448,397,382,175,432,566,709,539,397,374,231,704,796,504,411,116,740,589,451,541,771,475,535,509,213,342,705,362,696,340,80,332,783,660,351,513,260,280,154,557,320,195,311,237,317,731,346,545,161,243,796,26,674,350,543,40,13,147,761,336,423,503,344,133,279,747,81,46,671,532,309,123,194,208,620,649,747,631,618,470,287,188,756,743,522,503,549,661,720,363,350,92,667,330,235,507,746,527,431,224,251,747,131,489,690,772,203,488,52,344,496,230,453,249,394,107,406,491,263,191,126,371,274,706,544,127,374,737,278,242,55,218,699,580,352,682,273,568,471,491,490,278,636,452,230,573,90,355,605,289,254,798,192,345,22,551,307,510,717,144,750,663,654,61,224,686,769,382,393,72,634,31,473,722,310,701,264,214,479,174,250,382,368,340,127,480,794,771,270,21,664,223,29,268,323,623,355,103,744,82,185,591,660,43,404,252,83,635,32,202,471,660,335,339,560,146,621,622,137,568,452,692,599,458,702,547,679,175,136,342,534,126,232,608,282,767,793,220,61,743,196,718,64,525,667,465,423,148,621,254,689,386,770,740,73,453,330,785,614,632,750,711,214,369,432,303,537,64,395,266,437,365,590,565,232,329,135,794,57,141,663,667,784,9,348,322,704,97,121,257,1,187,355,660,792,733,746,130,628,786,394,772,348,273,208,481,630,146,421,164,224,18,645,62,416,521,249,198,317,159,453,608,696,510,134,554,343,488,752,666,659,211,230,138,772,125,90,419,390,222,401,21,659,121,142,61,237,632,686,534,608,338,267,19,680,663,555,127,433,299,683,173,542,165,571,229,397,237,492,791,681,550,152,470,203,335,35,534,576,56,250,463,202,189,237,319,585,387,243,482,799,54,467,543,518,185,16,21,390,459,50,580,651,193,536,776,7,791,778,454,215,610,632,779,439,180,660,599,54,297,312,781,639,570,462,795,780,606,664,687,160,61,667,421,546,691,590,462,602,103,451,353,448,602,105,404,104,39,342,350,682,633,311,367,675,652,80,620,553,488,780,55,655,474,435,719,332,480,228,745,291,100,14,190,306,246,328,199,95,317,589,707,432,352,354,492,655,250,597,91,750,702,54,756,475,745,240,333,509,692,418,708,740,565,620,530,538,469,395,662,716,756,275,744,514,491,561,422,440,156,654,540,25,736,778,116,467,636,573,245,643,12,170,736,98,296,732,657,225,96,327,269,487,127,52,3,308,233,638,590,596,455,556,538,99,450,690,715,750,202,278,300,504,513,597,738,228,419,532,424,87,65,593,720,792,715,38,355,642,259,535,59,629,468,145,42,261,544,218,606,394,220,204,315,36,161,520,736,593,553,219,679,366,317,357,14,347,579,420,434,109,794,647,377,771,302,444,681,487,306,236,442,88,106,28,427,751,441,734,101,395,133,121,182,1,18,629,727,688,176,571,185,380,86,675,51,192,653,73,664,488,314,289,341,742,415,495,276,40,513,104,177,305,690,108,365,83,719,178,390,331,662,573,525,292,365,175,22,387,174,61,437,12,588,183,787,332,290,265,557,363,694,502,775,504,526,297,386,493,485,454,595,587,49,743,293,609,570,108,442,505,431,22,61,395,277,250,329,34,487,135,536,195,704,366,86,768,719,609,1,415,486,129,735,11,798,301,737,556,465,320,298,500,641,497,481,33,229,774,700,281,658,234,416,403,446,515,68,485,71,771,432,791,647,637,586,214,628,238,600,367,523,512,203,389,69,628,105,640,220,168,136,557,317,297,194,701,691,357,244,43,296,341,170,711,39,264,483,256,105,262,408,49,266,137,290,718,772,511,334,654,251,536,194,284,442,672,45,35,98,218,432,586,467,457,641,545,475,735,508,161,355,154,726,668,15,415,422,197,581,438,454,447,642,349,677,227,230,18,272,140,102,12,153,481,794,234,765,555,304,661,646,410,123,586,169,450,510,412,110,787,779,199,697,324,494,726,585,247,254,615,633,713,604,401,415,380,313,222,509,186,260,498,771,85,363,596,253,660,611,394,749,50,669,751,311,563,598,37,239,171,739,292,744,720,320,200,27,480,280,670,54,305,300,370,301,435,142,71,344,255,598,696,619,350,731,633,35,345,49,542,361,510,501,636,296,101,52,626,34,336,330,202,511,340,495,492,212,39,568,248,404,438,764,370,58,366,126,93,524,525,234,108,226,259,767,621,573,506,326,35,121,98,378,239,774,363,678,302,299,180,194,12,457,561,322,519,616,129,265,455,657,141,425,573,249,145,596,419,695,506,500,145,20,426,604,136,762,34,615,73,331,80,369,17,500,460,395,395,706,581,462,37,379,711,373,169,99,627,220,476,368,518,571,619,766,755,386,304,196,680,406,346,486,513,410,58,388,400,479,719,618,545,106,748,584,168,753,58,746,433,159,257,148,7,351,766,775,614,395,43,777,46,100,570,63,60,667,54,474,357,7,494,18,713,444,281,464,521,169,407,511,753,694,272,778,443,147,16,743,239,771,373,130,271,303,19,129,399,150,256,140,115,565,183,53,389,88,110,797,155,117,358,142,531,439,476,758,549,455,616,105,786,573,320,445,8,93,713,306,75,479,16,648,681,118,299,408,578,689,23,543,197,673,344,251,108,192,778,267,551,82,236,563,523,206,176,206,665,81,260,165,772,303,129,560,396,406,703,602,557,369,762,168,549,519,371,792,233,224,687,388,388,778,690,546,474,670,765,627,280,337,316,339,137,696,139,315,472,21,529,290,588,598,797,284,670,83,390,279,693,12,327,583,275,601,797,623,587,23,266,402,536,103,697,783,503,549,429,348,685,561,616,730,742,75,347,383,219,314,661,797,9,108,213,463,754,442,389,443,576,81,309,625,570,49,569,244,322,382,692,716,485,661,244,690,74,279,685,242,161,437,696,261,346,508,206,160,43,146,185,523,390,700,575,444,304,775,643,501,723,540,91,795,723,300,425,427,243,46,35,288,338,136,403,330,231,207,651,594,754,611,364,2,538,174,761,47,531,121,338,137,405,557,479,96,795,701,164,144 ]) From 4c321ff14772ca884cbca3c9dd2149cb774f1218 Mon Sep 17 00:00:00 2001 From: Azad Kshitij Date: Sun, 4 Oct 2020 23:53:02 +0530 Subject: [PATCH 3/4] Update quickShort.py --- python/quickShort.py | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 python/quickShort.py diff --git a/python/quickShort.py b/python/quickShort.py new file mode 100644 index 0000000..44464c6 --- /dev/null +++ b/python/quickShort.py @@ -0,0 +1,32 @@ +''' +The way this algorithm works is +first we define a pivot point as a reference we can use any point as a +reference but here we are using last value from our input list + +and then we make two list namesd as lower and heigher and we append value +respective to the pivot point to the respective list + +and we done the same process over and over again till the condition breaks +''' + +def quick_short(List): + length = len(List) + lower = [] + heigher = [] + if length <= 1: + return List + else: + pivot = List.pop() + for i in List: + if i >= pivot: + heigher.append(i) + else: + lower.append(i) + return quick_short(lower) + [pivot] + quick_short(heigher) + +x = quick_short([ +89,399,757,257,372,553,241,216,48,355,41,34,798,470,751,285,288,768,563,2,638,113,153,394,500,715,495,217,578,625,628,27,345,329,579,677,331,211,354,646,715,595,784,552,515,226,598,533,508,332,515,789,521,261,117,415,712,604,93,144,595,38,423,798,165,472,573,771,312,330,92,731,775,579,140,329,530,439,276,166,395,233,41,314,141,201,688,383,763,606,87,672,207,564,687,285,24,216,394,675,652,302,33,786,540,173,664,624,58,190,792,43,178,212,557,231,389,641,586,504,301,92,573,126,85,678,27,480,765,637,255,193,300,693,74,16,146,479,54,87,503,215,161,208,673,83,180,520,591,786,559,486,12,474,174,310,359,463,185,402,610,324,720,237,364,386,609,411,303,549,618,360,23,620,466,477,41,505,337,701,537,631,251,701,422,697,408,482,338,724,591,94,253,449,381,584,6,531,4,689,183,399,44,473,716,59,661,443,592,422,428,37,770,107,689,783,215,558,159,263,80,35,275,404,111,580,230,700,97,611,329,766,117,693,560,98,339,217,316,783,396,774,423,769,618,486,207,50,324,596,778,712,301,565,26,122,327,724,538,392,56,428,550,172,314,195,778,258,768,130,687,754,67,634,375,749,780,505,175,694,183,514,250,16,784,27,684,620,269,190,782,300,554,578,670,509,480,230,444,336,136,23,659,46,261,273,570,393,240,380,340,224,745,308,361,43,444,179,293,244,50,349,52,346,102,520,160,57,40,733,169,761,280,284,603,422,666,52,531,779,110,181,79,76,401,385,334,628,528,553,507,420,739,402,333,552,588,8,57,248,767,199,195,626,198,312,21,121,127,430,668,387,243,85,452,336,104,538,174,707,130,239,592,41,73,334,293,396,88,264, +]) +x = set(x) +print(x) + From 1845fbd3bac00fd921a047176b10d97888350274 Mon Sep 17 00:00:00 2001 From: Azad Kshitij Date: Sun, 4 Oct 2020 23:57:00 +0530 Subject: [PATCH 4/4] Add anotherway of bubble short in python --- python/BubbleSort.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/python/BubbleSort.py b/python/BubbleSort.py index 177f200..e0e4756 100644 --- a/python/BubbleSort.py +++ b/python/BubbleSort.py @@ -13,3 +13,20 @@ def bubbleSort(arrays): bubbleSort(arrays) #Printing array after bubble sort print(arrays) + + +#Anotherway of implementing Bubble short inpython + +def bubble_short(sequence): + indexing_length = len(sequence) - 1 + shorted = False + + while not shorted: + shorted = True + for i in range(indexing_length): + if sequence[i] > sequence[i+1]: + shorted = False + sequence[i],sequence[i+1] = sequence[i+1],sequence[i] + return sequence + +print(bubble_short([89,399,757,257,372,553,241,216,48,355,41,34,798,470,751]))