{"action":"created","comment":{"url":"https://api.github.com/repos/faheel/Algos/pulls/comments/216141354","pull_request_review_id":153565474,"id":216141354,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxNjE0MTM1NA==","diff_hunk":"@@ -0,0 +1,73 @@\n+#ifndef LONGEST_DECREASING_SUBSEQUENCE\n+#define LONGEST_DECREASING_SUBSEQUENCE\n+\n+/*\n+Longest Decreasing Subsequence\n+---------------------\n+This algorithm finds the longest decreasing  subsequence in a sequence of numbers\n+It follows the principals of dynamic programming\n+\n+Time complexity\n+----------------\n+O(n logn) where n is the number of elements in the initial list\n+\n+Space complexity\n+---------------\n+O(n)\n+\n+*/\n+\n+#include <iostream>\n+#include <vector>\n+\n+int longest_decreasing_subsequence(std::vector<int>& input,  const bool to_show_state = true) {//order of 1 means increasing subsequence, -1 for decreasing subsequence\n+    int elements = input.size();//number of elements in the vector","path":"C++/include/algorithm/dynamic_programming/longest_decreasing_subsequence.hpp","position":24,"original_position":24,"commit_id":"0e100b3f5c8ebd8da20560d9540eb39f79a1db4d","original_commit_id":"0e100b3f5c8ebd8da20560d9540eb39f79a1db4d","user":{"login":"alxmjo","id":1656106,"node_id":"MDQ6VXNlcjE2NTYxMDY=","avatar_url":"https://avatars0.githubusercontent.com/u/1656106?v=4","gravatar_id":"","url":"https://api.github.com/users/alxmjo","html_url":"https://github.com/alxmjo","followers_url":"https://api.github.com/users/alxmjo/followers","following_url":"https://api.github.com/users/alxmjo/following{/other_user}","gists_url":"https://api.github.com/users/alxmjo/gists{/gist_id}","starred_url":"https://api.github.com/users/alxmjo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alxmjo/subscriptions","organizations_url":"https://api.github.com/users/alxmjo/orgs","repos_url":"https://api.github.com/users/alxmjo/repos","events_url":"https://api.github.com/users/alxmjo/events{/privacy}","received_events_url":"https://api.github.com/users/alxmjo/received_events","type":"User","site_admin":false},"body":"Please leave a white space between semicolon and inline comment.\r\n\r\n`int example = 1; // like this`","created_at":"2018-09-08T21:38:35Z","updated_at":"2018-09-08T21:42:57Z","html_url":"https://github.com/faheel/Algos/pull/199#discussion_r216141354","pull_request_url":"https://api.github.com/repos/faheel/Algos/pulls/199","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/faheel/Algos/pulls/comments/216141354"},"html":{"href":"https://github.com/faheel/Algos/pull/199#discussion_r216141354"},"pull_request":{"href":"https://api.github.com/repos/faheel/Algos/pulls/199"}}},"pull_request":{"url":"https://api.github.com/repos/faheel/Algos/pulls/199","id":214114578,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE0MTE0NTc4","html_url":"https://github.com/faheel/Algos/pull/199","diff_url":"https://github.com/faheel/Algos/pull/199.diff","patch_url":"https://github.com/faheel/Algos/pull/199.patch","issue_url":"https://api.github.com/repos/faheel/Algos/issues/199","number":199,"state":"open","locked":false,"title":"Longest decreasing subsequence","user":{"login":"ColeSeverson","id":40706895,"node_id":"MDQ6VXNlcjQwNzA2ODk1","avatar_url":"https://avatars2.githubusercontent.com/u/40706895?v=4","gravatar_id":"","url":"https://api.github.com/users/ColeSeverson","html_url":"https://github.com/ColeSeverson","followers_url":"https://api.github.com/users/ColeSeverson/followers","following_url":"https://api.github.com/users/ColeSeverson/following{/other_user}","gists_url":"https://api.github.com/users/ColeSeverson/gists{/gist_id}","starred_url":"https://api.github.com/users/ColeSeverson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ColeSeverson/subscriptions","organizations_url":"https://api.github.com/users/ColeSeverson/orgs","repos_url":"https://api.github.com/users/ColeSeverson/repos","events_url":"https://api.github.com/users/ColeSeverson/events{/privacy}","received_events_url":"https://api.github.com/users/ColeSeverson/received_events","type":"User","site_admin":false},"body":"<!-- Enter a brief description of the changes you've made in the next line -->\r\n\r\n<!-- Check the following boxes, if applicable, by replacing the space inside\r\n\t\"[ ]\" with an \"x\", eg. [x] -->\r\n- [X] Read the [contribution guidelines][contrib-guidelines]\r\n- [X] Added [unit tests][unit-tests] (or unit tests have already been added)\r\n- [X] Updated the [Contents][contents]\r\n\r\n<!-- If this PR closes an existing issue, write \"Closes #123\" in the next line,\r\n        where 123 is the issue number (for example) -->\r\n\r\n\r\n\r\n[contrib-guidelines]: https://github.com/faheel/Algos/blob/master/CONTRIBUTING.md\r\n[unit-tests]: https://github.com/faheel/Algos/blob/master/C%2B%2B/UNIT_TESTS.md\r\n[contents]: https://github.com/faheel/Algos/tree/master/C%2B%2B#contents\r\n","created_at":"2018-09-08T21:07:05Z","updated_at":"2018-09-08T21:42:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7ede24850424846449812f3e9054a67dd50d2a27","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/faheel/Algos/pulls/199/commits","review_comments_url":"https://api.github.com/repos/faheel/Algos/pulls/199/comments","review_comment_url":"https://api.github.com/repos/faheel/Algos/pulls/comments{/number}","comments_url":"https://api.github.com/repos/faheel/Algos/issues/199/comments","statuses_url":"https://api.github.com/repos/faheel/Algos/statuses/0e100b3f5c8ebd8da20560d9540eb39f79a1db4d","head":{"label":"ColeSeverson:longest_decreasing_subsequence","ref":"longest_decreasing_subsequence","sha":"0e100b3f5c8ebd8da20560d9540eb39f79a1db4d","user":{"login":"ColeSeverson","id":40706895,"node_id":"MDQ6VXNlcjQwNzA2ODk1","avatar_url":"https://avatars2.githubusercontent.com/u/40706895?v=4","gravatar_id":"","url":"https://api.github.com/users/ColeSeverson","html_url":"https://github.com/ColeSeverson","followers_url":"https://api.github.com/users/ColeSeverson/followers","following_url":"https://api.github.com/users/ColeSeverson/following{/other_user}","gists_url":"https://api.github.com/users/ColeSeverson/gists{/gist_id}","starred_url":"https://api.github.com/users/ColeSeverson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ColeSeverson/subscriptions","organizations_url":"https://api.github.com/users/ColeSeverson/orgs","repos_url":"https://api.github.com/users/ColeSeverson/repos","events_url":"https://api.github.com/users/ColeSeverson/events{/privacy}","received_events_url":"https://api.github.com/users/ColeSeverson/received_events","type":"User","site_admin":false},"repo":{"id":146227380,"node_id":"MDEwOlJlcG9zaXRvcnkxNDYyMjczODA=","name":"Algos","full_name":"ColeSeverson/Algos","owner":{"login":"ColeSeverson","id":40706895,"node_id":"MDQ6VXNlcjQwNzA2ODk1","avatar_url":"https://avatars2.githubusercontent.com/u/40706895?v=4","gravatar_id":"","url":"https://api.github.com/users/ColeSeverson","html_url":"https://github.com/ColeSeverson","followers_url":"https://api.github.com/users/ColeSeverson/followers","following_url":"https://api.github.com/users/ColeSeverson/following{/other_user}","gists_url":"https://api.github.com/users/ColeSeverson/gists{/gist_id}","starred_url":"https://api.github.com/users/ColeSeverson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ColeSeverson/subscriptions","organizations_url":"https://api.github.com/users/ColeSeverson/orgs","repos_url":"https://api.github.com/users/ColeSeverson/repos","events_url":"https://api.github.com/users/ColeSeverson/events{/privacy}","received_events_url":"https://api.github.com/users/ColeSeverson/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ColeSeverson/Algos","description":"Implementation of well-known (and some rare) algorithms, mostly in C++","fork":true,"url":"https://api.github.com/repos/ColeSeverson/Algos","forks_url":"https://api.github.com/repos/ColeSeverson/Algos/forks","keys_url":"https://api.github.com/repos/ColeSeverson/Algos/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ColeSeverson/Algos/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ColeSeverson/Algos/teams","hooks_url":"https://api.github.com/repos/ColeSeverson/Algos/hooks","issue_events_url":"https://api.github.com/repos/ColeSeverson/Algos/issues/events{/number}","events_url":"https://api.github.com/repos/ColeSeverson/Algos/events","assignees_url":"https://api.github.com/repos/ColeSeverson/Algos/assignees{/user}","branches_url":"https://api.github.com/repos/ColeSeverson/Algos/branches{/branch}","tags_url":"https://api.github.com/repos/ColeSeverson/Algos/tags","blobs_url":"https://api.github.com/repos/ColeSeverson/Algos/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ColeSeverson/Algos/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ColeSeverson/Algos/git/refs{/sha}","trees_url":"https://api.github.com/repos/ColeSeverson/Algos/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ColeSeverson/Algos/statuses/{sha}","languages_url":"https://api.github.com/repos/ColeSeverson/Algos/languages","stargazers_url":"https://api.github.com/repos/ColeSeverson/Algos/stargazers","contributors_url":"https://api.github.com/repos/ColeSeverson/Algos/contributors","subscribers_url":"https://api.github.com/repos/ColeSeverson/Algos/subscribers","subscription_url":"https://api.github.com/repos/ColeSeverson/Algos/subscription","commits_url":"https://api.github.com/repos/ColeSeverson/Algos/commits{/sha}","git_commits_url":"https://api.github.com/repos/ColeSeverson/Algos/git/commits{/sha}","comments_url":"https://api.github.com/repos/ColeSeverson/Algos/comments{/number}","issue_comment_url":"https://api.github.com/repos/ColeSeverson/Algos/issues/comments{/number}","contents_url":"https://api.github.com/repos/ColeSeverson/Algos/contents/{+path}","compare_url":"https://api.github.com/repos/ColeSeverson/Algos/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ColeSeverson/Algos/merges","archive_url":"https://api.github.com/repos/ColeSeverson/Algos/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ColeSeverson/Algos/downloads","issues_url":"https://api.github.com/repos/ColeSeverson/Algos/issues{/number}","pulls_url":"https://api.github.com/repos/ColeSeverson/Algos/pulls{/number}","milestones_url":"https://api.github.com/repos/ColeSeverson/Algos/milestones{/number}","notifications_url":"https://api.github.com/repos/ColeSeverson/Algos/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ColeSeverson/Algos/labels{/name}","releases_url":"https://api.github.com/repos/ColeSeverson/Algos/releases{/id}","deployments_url":"https://api.github.com/repos/ColeSeverson/Algos/deployments","created_at":"2018-08-27T00:29:04Z","updated_at":"2018-08-27T00:29:06Z","pushed_at":"2018-09-08T21:06:24Z","git_url":"git://github.com/ColeSeverson/Algos.git","ssh_url":"git@github.com:ColeSeverson/Algos.git","clone_url":"https://github.com/ColeSeverson/Algos.git","svn_url":"https://github.com/ColeSeverson/Algos","homepage":null,"size":424,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"faheel:reorganise","ref":"reorganise","sha":"78d024d2ed7abd5e12e2e5d4f6c9deff0ab684f9","user":{"login":"faheel","id":11466676,"node_id":"MDQ6VXNlcjExNDY2Njc2","avatar_url":"https://avatars2.githubusercontent.com/u/11466676?v=4","gravatar_id":"","url":"https://api.github.com/users/faheel","html_url":"https://github.com/faheel","followers_url":"https://api.github.com/users/faheel/followers","following_url":"https://api.github.com/users/faheel/following{/other_user}","gists_url":"https://api.github.com/users/faheel/gists{/gist_id}","starred_url":"https://api.github.com/users/faheel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/faheel/subscriptions","organizations_url":"https://api.github.com/users/faheel/orgs","repos_url":"https://api.github.com/users/faheel/repos","events_url":"https://api.github.com/users/faheel/events{/privacy}","received_events_url":"https://api.github.com/users/faheel/received_events","type":"User","site_admin":false},"repo":{"id":76900154,"node_id":"MDEwOlJlcG9zaXRvcnk3NjkwMDE1NA==","name":"Algos","full_name":"faheel/Algos","owner":{"login":"faheel","id":11466676,"node_id":"MDQ6VXNlcjExNDY2Njc2","avatar_url":"https://avatars2.githubusercontent.com/u/11466676?v=4","gravatar_id":"","url":"https://api.github.com/users/faheel","html_url":"https://github.com/faheel","followers_url":"https://api.github.com/users/faheel/followers","following_url":"https://api.github.com/users/faheel/following{/other_user}","gists_url":"https://api.github.com/users/faheel/gists{/gist_id}","starred_url":"https://api.github.com/users/faheel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/faheel/subscriptions","organizations_url":"https://api.github.com/users/faheel/orgs","repos_url":"https://api.github.com/users/faheel/repos","events_url":"https://api.github.com/users/faheel/events{/privacy}","received_events_url":"https://api.github.com/users/faheel/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/faheel/Algos","description":"Implementation of well-known (and some rare) algorithms, mostly in C++","fork":false,"url":"https://api.github.com/repos/faheel/Algos","forks_url":"https://api.github.com/repos/faheel/Algos/forks","keys_url":"https://api.github.com/repos/faheel/Algos/keys{/key_id}","collaborators_url":"https://api.github.com/repos/faheel/Algos/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/faheel/Algos/teams","hooks_url":"https://api.github.com/repos/faheel/Algos/hooks","issue_events_url":"https://api.github.com/repos/faheel/Algos/issues/events{/number}","events_url":"https://api.github.com/repos/faheel/Algos/events","assignees_url":"https://api.github.com/repos/faheel/Algos/assignees{/user}","branches_url":"https://api.github.com/repos/faheel/Algos/branches{/branch}","tags_url":"https://api.github.com/repos/faheel/Algos/tags","blobs_url":"https://api.github.com/repos/faheel/Algos/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/faheel/Algos/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/faheel/Algos/git/refs{/sha}","trees_url":"https://api.github.com/repos/faheel/Algos/git/trees{/sha}","statuses_url":"https://api.github.com/repos/faheel/Algos/statuses/{sha}","languages_url":"https://api.github.com/repos/faheel/Algos/languages","stargazers_url":"https://api.github.com/repos/faheel/Algos/stargazers","contributors_url":"https://api.github.com/repos/faheel/Algos/contributors","subscribers_url":"https://api.github.com/repos/faheel/Algos/subscribers","subscription_url":"https://api.github.com/repos/faheel/Algos/subscription","commits_url":"https://api.github.com/repos/faheel/Algos/commits{/sha}","git_commits_url":"https://api.github.com/repos/faheel/Algos/git/commits{/sha}","comments_url":"https://api.github.com/repos/faheel/Algos/comments{/number}","issue_comment_url":"https://api.github.com/repos/faheel/Algos/issues/comments{/number}","contents_url":"https://api.github.com/repos/faheel/Algos/contents/{+path}","compare_url":"https://api.github.com/repos/faheel/Algos/compare/{base}...{head}","merges_url":"https://api.github.com/repos/faheel/Algos/merges","archive_url":"https://api.github.com/repos/faheel/Algos/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/faheel/Algos/downloads","issues_url":"https://api.github.com/repos/faheel/Algos/issues{/number}","pulls_url":"https://api.github.com/repos/faheel/Algos/pulls{/number}","milestones_url":"https://api.github.com/repos/faheel/Algos/milestones{/number}","notifications_url":"https://api.github.com/repos/faheel/Algos/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/faheel/Algos/labels{/name}","releases_url":"https://api.github.com/repos/faheel/Algos/releases{/id}","deployments_url":"https://api.github.com/repos/faheel/Algos/deployments","created_at":"2016-12-19T21:51:27Z","updated_at":"2018-09-08T12:45:33Z","pushed_at":"2018-09-08T21:07:06Z","git_url":"git://github.com/faheel/Algos.git","ssh_url":"git@github.com:faheel/Algos.git","clone_url":"https://github.com/faheel/Algos.git","svn_url":"https://github.com/faheel/Algos","homepage":null,"size":419,"stargazers_count":184,"watchers_count":184,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":183,"mirror_url":null,"archived":false,"open_issues_count":68,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":183,"open_issues":68,"watchers":184,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/faheel/Algos/pulls/199"},"html":{"href":"https://github.com/faheel/Algos/pull/199"},"issue":{"href":"https://api.github.com/repos/faheel/Algos/issues/199"},"comments":{"href":"https://api.github.com/repos/faheel/Algos/issues/199/comments"},"review_comments":{"href":"https://api.github.com/repos/faheel/Algos/pulls/199/comments"},"review_comment":{"href":"https://api.github.com/repos/faheel/Algos/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/faheel/Algos/pulls/199/commits"},"statuses":{"href":"https://api.github.com/repos/faheel/Algos/statuses/0e100b3f5c8ebd8da20560d9540eb39f79a1db4d"}},"author_association":"NONE"}}
{"actor":{"display_login":"alxmjo"}}