{"action":"created","comment":{"url":"https://api.github.com/repos/Foxfanmedium/Algorithms/pulls/comments/218203602","pull_request_review_id":156089253,"id":218203602,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxODIwMzYwMg==","diff_hunk":"@@ -0,0 +1,60 @@\n+\"\"\"\n+1. Отсортировать по убыванию методом «пузырька» одномерный целочисленный массив, заданный случайными числами на\n+промежутке [-100; 100). Вывести на экран исходный и отсортированный массивы.1. Отсортировать по убыванию\n+методом «пузырька» одномерный целочисленный массив, заданный случайными числами на промежутке [-100; 100).\n+Вывести на экран исходный и отсортированный массивы.\n+\"\"\"\n+\n+\"\"\"\n+Решение в видуе функции.\n+Функция должна быть доработана чтобы работала быстрее\n+\"\"\"\n+\n+# Version 1\n+import random\n+import numpy\n+\n+array = [random.randint(-100, 100) for _ in range(20)]\n+print(array)\n+template = sorted(array)\n+print(template)\n+\n+\n+def bubble_sort(lst):\n+    n = 1\n+    while n < (len(array)):\n+        for i in range(len(array) - n):\n+            if (array > template) - (array < template) == 0:","path":"HW_7/HW_7_1.py","position":27,"original_position":27,"commit_id":"a4926ddbd7c62984b0a39e6254eb235f6dc50c8f","original_commit_id":"a4926ddbd7c62984b0a39e6254eb235f6dc50c8f","user":{"login":"Dzhoker1","id":31956448,"node_id":"MDQ6VXNlcjMxOTU2NDQ4","avatar_url":"https://avatars2.githubusercontent.com/u/31956448?v=4","gravatar_id":"","url":"https://api.github.com/users/Dzhoker1","html_url":"https://github.com/Dzhoker1","followers_url":"https://api.github.com/users/Dzhoker1/followers","following_url":"https://api.github.com/users/Dzhoker1/following{/other_user}","gists_url":"https://api.github.com/users/Dzhoker1/gists{/gist_id}","starred_url":"https://api.github.com/users/Dzhoker1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Dzhoker1/subscriptions","organizations_url":"https://api.github.com/users/Dzhoker1/orgs","repos_url":"https://api.github.com/users/Dzhoker1/repos","events_url":"https://api.github.com/users/Dzhoker1/events{/privacy}","received_events_url":"https://api.github.com/users/Dzhoker1/received_events","type":"User","site_admin":false},"body":"Сравнение списков в любых вариациях происходит поэлементно. Т.е. из сложности O(n**2) получаем O(n**3)\r\n","created_at":"2018-09-17T19:50:45Z","updated_at":"2018-09-17T19:57:31Z","html_url":"https://github.com/Foxfanmedium/Algorithms/pull/6#discussion_r218203602","pull_request_url":"https://api.github.com/repos/Foxfanmedium/Algorithms/pulls/6","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/Foxfanmedium/Algorithms/pulls/comments/218203602"},"html":{"href":"https://github.com/Foxfanmedium/Algorithms/pull/6#discussion_r218203602"},"pull_request":{"href":"https://api.github.com/repos/Foxfanmedium/Algorithms/pulls/6"}}},"pull_request":{"url":"https://api.github.com/repos/Foxfanmedium/Algorithms/pulls/6","id":215875154,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE1ODc1MTU0","html_url":"https://github.com/Foxfanmedium/Algorithms/pull/6","diff_url":"https://github.com/Foxfanmedium/Algorithms/pull/6.diff","patch_url":"https://github.com/Foxfanmedium/Algorithms/pull/6.patch","issue_url":"https://api.github.com/repos/Foxfanmedium/Algorithms/issues/6","number":6,"state":"open","locked":false,"title":"Hw 7","user":{"login":"Foxfanmedium","id":32788485,"node_id":"MDQ6VXNlcjMyNzg4NDg1","avatar_url":"https://avatars3.githubusercontent.com/u/32788485?v=4","gravatar_id":"","url":"https://api.github.com/users/Foxfanmedium","html_url":"https://github.com/Foxfanmedium","followers_url":"https://api.github.com/users/Foxfanmedium/followers","following_url":"https://api.github.com/users/Foxfanmedium/following{/other_user}","gists_url":"https://api.github.com/users/Foxfanmedium/gists{/gist_id}","starred_url":"https://api.github.com/users/Foxfanmedium/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Foxfanmedium/subscriptions","organizations_url":"https://api.github.com/users/Foxfanmedium/orgs","repos_url":"https://api.github.com/users/Foxfanmedium/repos","events_url":"https://api.github.com/users/Foxfanmedium/events{/privacy}","received_events_url":"https://api.github.com/users/Foxfanmedium/received_events","type":"User","site_admin":false},"body":"Здравствуйте! \r\n\r\nРешение ДЗ № 7 находится в папке Hw_7 (очепятка)\r\n\r\nСразу скажу, что эту домашку делал еще не посмотрев занятие № 8. ","created_at":"2018-09-17T05:16:30Z","updated_at":"2018-09-17T19:57:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8397d479abb1de88c34740235c754f83e3ffcb4f","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/Foxfanmedium/Algorithms/pulls/6/commits","review_comments_url":"https://api.github.com/repos/Foxfanmedium/Algorithms/pulls/6/comments","review_comment_url":"https://api.github.com/repos/Foxfanmedium/Algorithms/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Foxfanmedium/Algorithms/issues/6/comments","statuses_url":"https://api.github.com/repos/Foxfanmedium/Algorithms/statuses/a4926ddbd7c62984b0a39e6254eb235f6dc50c8f","head":{"label":"Foxfanmedium:HW_7","ref":"HW_7","sha":"a4926ddbd7c62984b0a39e6254eb235f6dc50c8f","user":{"login":"Foxfanmedium","id":32788485,"node_id":"MDQ6VXNlcjMyNzg4NDg1","avatar_url":"https://avatars3.githubusercontent.com/u/32788485?v=4","gravatar_id":"","url":"https://api.github.com/users/Foxfanmedium","html_url":"https://github.com/Foxfanmedium","followers_url":"https://api.github.com/users/Foxfanmedium/followers","following_url":"https://api.github.com/users/Foxfanmedium/following{/other_user}","gists_url":"https://api.github.com/users/Foxfanmedium/gists{/gist_id}","starred_url":"https://api.github.com/users/Foxfanmedium/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Foxfanmedium/subscriptions","organizations_url":"https://api.github.com/users/Foxfanmedium/orgs","repos_url":"https://api.github.com/users/Foxfanmedium/repos","events_url":"https://api.github.com/users/Foxfanmedium/events{/privacy}","received_events_url":"https://api.github.com/users/Foxfanmedium/received_events","type":"User","site_admin":false},"repo":{"id":145937417,"node_id":"MDEwOlJlcG9zaXRvcnkxNDU5Mzc0MTc=","name":"Algorithms","full_name":"Foxfanmedium/Algorithms","private":false,"owner":{"login":"Foxfanmedium","id":32788485,"node_id":"MDQ6VXNlcjMyNzg4NDg1","avatar_url":"https://avatars3.githubusercontent.com/u/32788485?v=4","gravatar_id":"","url":"https://api.github.com/users/Foxfanmedium","html_url":"https://github.com/Foxfanmedium","followers_url":"https://api.github.com/users/Foxfanmedium/followers","following_url":"https://api.github.com/users/Foxfanmedium/following{/other_user}","gists_url":"https://api.github.com/users/Foxfanmedium/gists{/gist_id}","starred_url":"https://api.github.com/users/Foxfanmedium/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Foxfanmedium/subscriptions","organizations_url":"https://api.github.com/users/Foxfanmedium/orgs","repos_url":"https://api.github.com/users/Foxfanmedium/repos","events_url":"https://api.github.com/users/Foxfanmedium/events{/privacy}","received_events_url":"https://api.github.com/users/Foxfanmedium/received_events","type":"User","site_admin":false},"html_url":"https://github.com/Foxfanmedium/Algorithms","description":null,"fork":false,"url":"https://api.github.com/repos/Foxfanmedium/Algorithms","forks_url":"https://api.github.com/repos/Foxfanmedium/Algorithms/forks","keys_url":"https://api.github.com/repos/Foxfanmedium/Algorithms/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Foxfanmedium/Algorithms/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Foxfanmedium/Algorithms/teams","hooks_url":"https://api.github.com/repos/Foxfanmedium/Algorithms/hooks","issue_events_url":"https://api.github.com/repos/Foxfanmedium/Algorithms/issues/events{/number}","events_url":"https://api.github.com/repos/Foxfanmedium/Algorithms/events","assignees_url":"https://api.github.com/repos/Foxfanmedium/Algorithms/assignees{/user}","branches_url":"https://api.github.com/repos/Foxfanmedium/Algorithms/branches{/branch}","tags_url":"https://api.github.com/repos/Foxfanmedium/Algorithms/tags","blobs_url":"https://api.github.com/repos/Foxfanmedium/Algorithms/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Foxfanmedium/Algorithms/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Foxfanmedium/Algorithms/git/refs{/sha}","trees_url":"https://api.github.com/repos/Foxfanmedium/Algorithms/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Foxfanmedium/Algorithms/statuses/{sha}","languages_url":"https://api.github.com/repos/Foxfanmedium/Algorithms/languages","stargazers_url":"https://api.github.com/repos/Foxfanmedium/Algorithms/stargazers","contributors_url":"https://api.github.com/repos/Foxfanmedium/Algorithms/contributors","subscribers_url":"https://api.github.com/repos/Foxfanmedium/Algorithms/subscribers","subscription_url":"https://api.github.com/repos/Foxfanmedium/Algorithms/subscription","commits_url":"https://api.github.com/repos/Foxfanmedium/Algorithms/commits{/sha}","git_commits_url":"https://api.github.com/repos/Foxfanmedium/Algorithms/git/commits{/sha}","comments_url":"https://api.github.com/repos/Foxfanmedium/Algorithms/comments{/number}","issue_comment_url":"https://api.github.com/repos/Foxfanmedium/Algorithms/issues/comments{/number}","contents_url":"https://api.github.com/repos/Foxfanmedium/Algorithms/contents/{+path}","compare_url":"https://api.github.com/repos/Foxfanmedium/Algorithms/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Foxfanmedium/Algorithms/merges","archive_url":"https://api.github.com/repos/Foxfanmedium/Algorithms/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Foxfanmedium/Algorithms/downloads","issues_url":"https://api.github.com/repos/Foxfanmedium/Algorithms/issues{/number}","pulls_url":"https://api.github.com/repos/Foxfanmedium/Algorithms/pulls{/number}","milestones_url":"https://api.github.com/repos/Foxfanmedium/Algorithms/milestones{/number}","notifications_url":"https://api.github.com/repos/Foxfanmedium/Algorithms/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Foxfanmedium/Algorithms/labels{/name}","releases_url":"https://api.github.com/repos/Foxfanmedium/Algorithms/releases{/id}","deployments_url":"https://api.github.com/repos/Foxfanmedium/Algorithms/deployments","created_at":"2018-08-24T03:24:55Z","updated_at":"2018-08-30T16:46:52Z","pushed_at":"2018-09-17T05:16:31Z","git_url":"git://github.com/Foxfanmedium/Algorithms.git","ssh_url":"git@github.com:Foxfanmedium/Algorithms.git","clone_url":"https://github.com/Foxfanmedium/Algorithms.git","svn_url":"https://github.com/Foxfanmedium/Algorithms","homepage":null,"size":45,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":3,"license":null,"forks":0,"open_issues":3,"watchers":0,"default_branch":"master"}},"base":{"label":"Foxfanmedium:master","ref":"master","sha":"5853339867b664acef42787b440c13853eb016ad","user":{"login":"Foxfanmedium","id":32788485,"node_id":"MDQ6VXNlcjMyNzg4NDg1","avatar_url":"https://avatars3.githubusercontent.com/u/32788485?v=4","gravatar_id":"","url":"https://api.github.com/users/Foxfanmedium","html_url":"https://github.com/Foxfanmedium","followers_url":"https://api.github.com/users/Foxfanmedium/followers","following_url":"https://api.github.com/users/Foxfanmedium/following{/other_user}","gists_url":"https://api.github.com/users/Foxfanmedium/gists{/gist_id}","starred_url":"https://api.github.com/users/Foxfanmedium/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Foxfanmedium/subscriptions","organizations_url":"https://api.github.com/users/Foxfanmedium/orgs","repos_url":"https://api.github.com/users/Foxfanmedium/repos","events_url":"https://api.github.com/users/Foxfanmedium/events{/privacy}","received_events_url":"https://api.github.com/users/Foxfanmedium/received_events","type":"User","site_admin":false},"repo":{"id":145937417,"node_id":"MDEwOlJlcG9zaXRvcnkxNDU5Mzc0MTc=","name":"Algorithms","full_name":"Foxfanmedium/Algorithms","private":false,"owner":{"login":"Foxfanmedium","id":32788485,"node_id":"MDQ6VXNlcjMyNzg4NDg1","avatar_url":"https://avatars3.githubusercontent.com/u/32788485?v=4","gravatar_id":"","url":"https://api.github.com/users/Foxfanmedium","html_url":"https://github.com/Foxfanmedium","followers_url":"https://api.github.com/users/Foxfanmedium/followers","following_url":"https://api.github.com/users/Foxfanmedium/following{/other_user}","gists_url":"https://api.github.com/users/Foxfanmedium/gists{/gist_id}","starred_url":"https://api.github.com/users/Foxfanmedium/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Foxfanmedium/subscriptions","organizations_url":"https://api.github.com/users/Foxfanmedium/orgs","repos_url":"https://api.github.com/users/Foxfanmedium/repos","events_url":"https://api.github.com/users/Foxfanmedium/events{/privacy}","received_events_url":"https://api.github.com/users/Foxfanmedium/received_events","type":"User","site_admin":false},"html_url":"https://github.com/Foxfanmedium/Algorithms","description":null,"fork":false,"url":"https://api.github.com/repos/Foxfanmedium/Algorithms","forks_url":"https://api.github.com/repos/Foxfanmedium/Algorithms/forks","keys_url":"https://api.github.com/repos/Foxfanmedium/Algorithms/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Foxfanmedium/Algorithms/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Foxfanmedium/Algorithms/teams","hooks_url":"https://api.github.com/repos/Foxfanmedium/Algorithms/hooks","issue_events_url":"https://api.github.com/repos/Foxfanmedium/Algorithms/issues/events{/number}","events_url":"https://api.github.com/repos/Foxfanmedium/Algorithms/events","assignees_url":"https://api.github.com/repos/Foxfanmedium/Algorithms/assignees{/user}","branches_url":"https://api.github.com/repos/Foxfanmedium/Algorithms/branches{/branch}","tags_url":"https://api.github.com/repos/Foxfanmedium/Algorithms/tags","blobs_url":"https://api.github.com/repos/Foxfanmedium/Algorithms/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Foxfanmedium/Algorithms/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Foxfanmedium/Algorithms/git/refs{/sha}","trees_url":"https://api.github.com/repos/Foxfanmedium/Algorithms/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Foxfanmedium/Algorithms/statuses/{sha}","languages_url":"https://api.github.com/repos/Foxfanmedium/Algorithms/languages","stargazers_url":"https://api.github.com/repos/Foxfanmedium/Algorithms/stargazers","contributors_url":"https://api.github.com/repos/Foxfanmedium/Algorithms/contributors","subscribers_url":"https://api.github.com/repos/Foxfanmedium/Algorithms/subscribers","subscription_url":"https://api.github.com/repos/Foxfanmedium/Algorithms/subscription","commits_url":"https://api.github.com/repos/Foxfanmedium/Algorithms/commits{/sha}","git_commits_url":"https://api.github.com/repos/Foxfanmedium/Algorithms/git/commits{/sha}","comments_url":"https://api.github.com/repos/Foxfanmedium/Algorithms/comments{/number}","issue_comment_url":"https://api.github.com/repos/Foxfanmedium/Algorithms/issues/comments{/number}","contents_url":"https://api.github.com/repos/Foxfanmedium/Algorithms/contents/{+path}","compare_url":"https://api.github.com/repos/Foxfanmedium/Algorithms/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Foxfanmedium/Algorithms/merges","archive_url":"https://api.github.com/repos/Foxfanmedium/Algorithms/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Foxfanmedium/Algorithms/downloads","issues_url":"https://api.github.com/repos/Foxfanmedium/Algorithms/issues{/number}","pulls_url":"https://api.github.com/repos/Foxfanmedium/Algorithms/pulls{/number}","milestones_url":"https://api.github.com/repos/Foxfanmedium/Algorithms/milestones{/number}","notifications_url":"https://api.github.com/repos/Foxfanmedium/Algorithms/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Foxfanmedium/Algorithms/labels{/name}","releases_url":"https://api.github.com/repos/Foxfanmedium/Algorithms/releases{/id}","deployments_url":"https://api.github.com/repos/Foxfanmedium/Algorithms/deployments","created_at":"2018-08-24T03:24:55Z","updated_at":"2018-08-30T16:46:52Z","pushed_at":"2018-09-17T05:16:31Z","git_url":"git://github.com/Foxfanmedium/Algorithms.git","ssh_url":"git@github.com:Foxfanmedium/Algorithms.git","clone_url":"https://github.com/Foxfanmedium/Algorithms.git","svn_url":"https://github.com/Foxfanmedium/Algorithms","homepage":null,"size":45,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":3,"license":null,"forks":0,"open_issues":3,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Foxfanmedium/Algorithms/pulls/6"},"html":{"href":"https://github.com/Foxfanmedium/Algorithms/pull/6"},"issue":{"href":"https://api.github.com/repos/Foxfanmedium/Algorithms/issues/6"},"comments":{"href":"https://api.github.com/repos/Foxfanmedium/Algorithms/issues/6/comments"},"review_comments":{"href":"https://api.github.com/repos/Foxfanmedium/Algorithms/pulls/6/comments"},"review_comment":{"href":"https://api.github.com/repos/Foxfanmedium/Algorithms/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Foxfanmedium/Algorithms/pulls/6/commits"},"statuses":{"href":"https://api.github.com/repos/Foxfanmedium/Algorithms/statuses/a4926ddbd7c62984b0a39e6254eb235f6dc50c8f"}},"author_association":"OWNER"}}
{"actor":{"display_login":"Dzhoker1"}}