{"action":"created","comment":{"url":"https://api.github.com/repos/jnware7/core-data-structures-jeff/pulls/comments/98499899","pull_request_review_id":19141953,"id":98499899,"diff_hunk":"@@ -0,0 +1,37 @@\n+'use strict'\n+export default class pQueue {\n+  constructor() {\n+    this.q = []\n+  }\n+\n+  enqueue(element, priority){\n+    // push an object to the end of the arrat\n+    // sort the array according to priority\n+    this.q[this.q.length] = {element, priority}\n+\n+    var sorted = this.q.sort(function(a,b){\n+      return parseFloat(b.priority) - parseFloat(a.priority)","path":"src/pQueue.js","position":13,"original_position":13,"commit_id":"ac232de1465cb35191dc3964fae683389b692215","original_commit_id":"ac232de1465cb35191dc3964fae683389b692215","user":{"login":"deadlyicon","id":8385,"avatar_url":"https://avatars.githubusercontent.com/u/8385?v=3","gravatar_id":"","url":"https://api.github.com/users/deadlyicon","html_url":"https://github.com/deadlyicon","followers_url":"https://api.github.com/users/deadlyicon/followers","following_url":"https://api.github.com/users/deadlyicon/following{/other_user}","gists_url":"https://api.github.com/users/deadlyicon/gists{/gist_id}","starred_url":"https://api.github.com/users/deadlyicon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deadlyicon/subscriptions","organizations_url":"https://api.github.com/users/deadlyicon/orgs","repos_url":"https://api.github.com/users/deadlyicon/repos","events_url":"https://api.github.com/users/deadlyicon/events{/privacy}","received_events_url":"https://api.github.com/users/deadlyicon/received_events","type":"User","site_admin":false},"body":"why not `parseFloat` the priority when you add it to the array so you dont have to do it a ton of tines during the sort?","created_at":"2017-01-30T17:55:27Z","updated_at":"2017-01-30T17:56:34Z","html_url":"https://github.com/jnware7/core-data-structures-jeff/pull/2#discussion_r98499899","pull_request_url":"https://api.github.com/repos/jnware7/core-data-structures-jeff/pulls/2","_links":{"self":{"href":"https://api.github.com/repos/jnware7/core-data-structures-jeff/pulls/comments/98499899"},"html":{"href":"https://github.com/jnware7/core-data-structures-jeff/pull/2#discussion_r98499899"},"pull_request":{"href":"https://api.github.com/repos/jnware7/core-data-structures-jeff/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/jnware7/core-data-structures-jeff/pulls/2","id":103029695,"html_url":"https://github.com/jnware7/core-data-structures-jeff/pull/2","diff_url":"https://github.com/jnware7/core-data-structures-jeff/pull/2.diff","patch_url":"https://github.com/jnware7/core-data-structures-jeff/pull/2.patch","issue_url":"https://api.github.com/repos/jnware7/core-data-structures-jeff/issues/2","number":2,"state":"closed","locked":false,"title":"pQueue","user":{"login":"jnware7","id":20915359,"avatar_url":"https://avatars.githubusercontent.com/u/20915359?v=3","gravatar_id":"","url":"https://api.github.com/users/jnware7","html_url":"https://github.com/jnware7","followers_url":"https://api.github.com/users/jnware7/followers","following_url":"https://api.github.com/users/jnware7/following{/other_user}","gists_url":"https://api.github.com/users/jnware7/gists{/gist_id}","starred_url":"https://api.github.com/users/jnware7/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jnware7/subscriptions","organizations_url":"https://api.github.com/users/jnware7/orgs","repos_url":"https://api.github.com/users/jnware7/repos","events_url":"https://api.github.com/users/jnware7/events{/privacy}","received_events_url":"https://api.github.com/users/jnware7/received_events","type":"User","site_admin":false},"body":"","created_at":"2017-01-24T23:55:16Z","updated_at":"2017-01-30T17:56:34Z","closed_at":"2017-01-27T20:22:23Z","merged_at":"2017-01-27T20:22:23Z","merge_commit_sha":"ac232de1465cb35191dc3964fae683389b692215","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/jnware7/core-data-structures-jeff/pulls/2/commits","review_comments_url":"https://api.github.com/repos/jnware7/core-data-structures-jeff/pulls/2/comments","review_comment_url":"https://api.github.com/repos/jnware7/core-data-structures-jeff/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jnware7/core-data-structures-jeff/issues/2/comments","statuses_url":"https://api.github.com/repos/jnware7/core-data-structures-jeff/statuses/ac232de1465cb35191dc3964fae683389b692215","head":{"label":"jnware7:PriorityQueue","ref":"PriorityQueue","sha":"ac232de1465cb35191dc3964fae683389b692215","user":{"login":"jnware7","id":20915359,"avatar_url":"https://avatars.githubusercontent.com/u/20915359?v=3","gravatar_id":"","url":"https://api.github.com/users/jnware7","html_url":"https://github.com/jnware7","followers_url":"https://api.github.com/users/jnware7/followers","following_url":"https://api.github.com/users/jnware7/following{/other_user}","gists_url":"https://api.github.com/users/jnware7/gists{/gist_id}","starred_url":"https://api.github.com/users/jnware7/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jnware7/subscriptions","organizations_url":"https://api.github.com/users/jnware7/orgs","repos_url":"https://api.github.com/users/jnware7/repos","events_url":"https://api.github.com/users/jnware7/events{/privacy}","received_events_url":"https://api.github.com/users/jnware7/received_events","type":"User","site_admin":false},"repo":{"id":79834908,"name":"core-data-structures-jeff","full_name":"jnware7/core-data-structures-jeff","owner":{"login":"jnware7","id":20915359,"avatar_url":"https://avatars.githubusercontent.com/u/20915359?v=3","gravatar_id":"","url":"https://api.github.com/users/jnware7","html_url":"https://github.com/jnware7","followers_url":"https://api.github.com/users/jnware7/followers","following_url":"https://api.github.com/users/jnware7/following{/other_user}","gists_url":"https://api.github.com/users/jnware7/gists{/gist_id}","starred_url":"https://api.github.com/users/jnware7/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jnware7/subscriptions","organizations_url":"https://api.github.com/users/jnware7/orgs","repos_url":"https://api.github.com/users/jnware7/repos","events_url":"https://api.github.com/users/jnware7/events{/privacy}","received_events_url":"https://api.github.com/users/jnware7/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jnware7/core-data-structures-jeff","description":"Tests and implementations for common data structures.","fork":true,"url":"https://api.github.com/repos/jnware7/core-data-structures-jeff","forks_url":"https://api.github.com/repos/jnware7/core-data-structures-jeff/forks","keys_url":"https://api.github.com/repos/jnware7/core-data-structures-jeff/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jnware7/core-data-structures-jeff/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jnware7/core-data-structures-jeff/teams","hooks_url":"https://api.github.com/repos/jnware7/core-data-structures-jeff/hooks","issue_events_url":"https://api.github.com/repos/jnware7/core-data-structures-jeff/issues/events{/number}","events_url":"https://api.github.com/repos/jnware7/core-data-structures-jeff/events","assignees_url":"https://api.github.com/repos/jnware7/core-data-structures-jeff/assignees{/user}","branches_url":"https://api.github.com/repos/jnware7/core-data-structures-jeff/branches{/branch}","tags_url":"https://api.github.com/repos/jnware7/core-data-structures-jeff/tags","blobs_url":"https://api.github.com/repos/jnware7/core-data-structures-jeff/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jnware7/core-data-structures-jeff/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jnware7/core-data-structures-jeff/git/refs{/sha}","trees_url":"https://api.github.com/repos/jnware7/core-data-structures-jeff/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jnware7/core-data-structures-jeff/statuses/{sha}","languages_url":"https://api.github.com/repos/jnware7/core-data-structures-jeff/languages","stargazers_url":"https://api.github.com/repos/jnware7/core-data-structures-jeff/stargazers","contributors_url":"https://api.github.com/repos/jnware7/core-data-structures-jeff/contributors","subscribers_url":"https://api.github.com/repos/jnware7/core-data-structures-jeff/subscribers","subscription_url":"https://api.github.com/repos/jnware7/core-data-structures-jeff/subscription","commits_url":"https://api.github.com/repos/jnware7/core-data-structures-jeff/commits{/sha}","git_commits_url":"https://api.github.com/repos/jnware7/core-data-structures-jeff/git/commits{/sha}","comments_url":"https://api.github.com/repos/jnware7/core-data-structures-jeff/comments{/number}","issue_comment_url":"https://api.github.com/repos/jnware7/core-data-structures-jeff/issues/comments{/number}","contents_url":"https://api.github.com/repos/jnware7/core-data-structures-jeff/contents/{+path}","compare_url":"https://api.github.com/repos/jnware7/core-data-structures-jeff/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jnware7/core-data-structures-jeff/merges","archive_url":"https://api.github.com/repos/jnware7/core-data-structures-jeff/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jnware7/core-data-structures-jeff/downloads","issues_url":"https://api.github.com/repos/jnware7/core-data-structures-jeff/issues{/number}","pulls_url":"https://api.github.com/repos/jnware7/core-data-structures-jeff/pulls{/number}","milestones_url":"https://api.github.com/repos/jnware7/core-data-structures-jeff/milestones{/number}","notifications_url":"https://api.github.com/repos/jnware7/core-data-structures-jeff/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jnware7/core-data-structures-jeff/labels{/name}","releases_url":"https://api.github.com/repos/jnware7/core-data-structures-jeff/releases{/id}","deployments_url":"https://api.github.com/repos/jnware7/core-data-structures-jeff/deployments","created_at":"2017-01-23T18:38:12Z","updated_at":"2017-01-23T19:02:48Z","pushed_at":"2017-01-27T20:22:38Z","git_url":"git://github.com/jnware7/core-data-structures-jeff.git","ssh_url":"git@github.com:jnware7/core-data-structures-jeff.git","clone_url":"https://github.com/jnware7/core-data-structures-jeff.git","svn_url":"https://github.com/jnware7/core-data-structures-jeff","homepage":null,"size":10,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"jnware7:master","ref":"master","sha":"a984f41938807398cef3dfb1ccf8525ea0171469","user":{"login":"jnware7","id":20915359,"avatar_url":"https://avatars.githubusercontent.com/u/20915359?v=3","gravatar_id":"","url":"https://api.github.com/users/jnware7","html_url":"https://github.com/jnware7","followers_url":"https://api.github.com/users/jnware7/followers","following_url":"https://api.github.com/users/jnware7/following{/other_user}","gists_url":"https://api.github.com/users/jnware7/gists{/gist_id}","starred_url":"https://api.github.com/users/jnware7/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jnware7/subscriptions","organizations_url":"https://api.github.com/users/jnware7/orgs","repos_url":"https://api.github.com/users/jnware7/repos","events_url":"https://api.github.com/users/jnware7/events{/privacy}","received_events_url":"https://api.github.com/users/jnware7/received_events","type":"User","site_admin":false},"repo":{"id":79834908,"name":"core-data-structures-jeff","full_name":"jnware7/core-data-structures-jeff","owner":{"login":"jnware7","id":20915359,"avatar_url":"https://avatars.githubusercontent.com/u/20915359?v=3","gravatar_id":"","url":"https://api.github.com/users/jnware7","html_url":"https://github.com/jnware7","followers_url":"https://api.github.com/users/jnware7/followers","following_url":"https://api.github.com/users/jnware7/following{/other_user}","gists_url":"https://api.github.com/users/jnware7/gists{/gist_id}","starred_url":"https://api.github.com/users/jnware7/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jnware7/subscriptions","organizations_url":"https://api.github.com/users/jnware7/orgs","repos_url":"https://api.github.com/users/jnware7/repos","events_url":"https://api.github.com/users/jnware7/events{/privacy}","received_events_url":"https://api.github.com/users/jnware7/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jnware7/core-data-structures-jeff","description":"Tests and implementations for common data structures.","fork":true,"url":"https://api.github.com/repos/jnware7/core-data-structures-jeff","forks_url":"https://api.github.com/repos/jnware7/core-data-structures-jeff/forks","keys_url":"https://api.github.com/repos/jnware7/core-data-structures-jeff/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jnware7/core-data-structures-jeff/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jnware7/core-data-structures-jeff/teams","hooks_url":"https://api.github.com/repos/jnware7/core-data-structures-jeff/hooks","issue_events_url":"https://api.github.com/repos/jnware7/core-data-structures-jeff/issues/events{/number}","events_url":"https://api.github.com/repos/jnware7/core-data-structures-jeff/events","assignees_url":"https://api.github.com/repos/jnware7/core-data-structures-jeff/assignees{/user}","branches_url":"https://api.github.com/repos/jnware7/core-data-structures-jeff/branches{/branch}","tags_url":"https://api.github.com/repos/jnware7/core-data-structures-jeff/tags","blobs_url":"https://api.github.com/repos/jnware7/core-data-structures-jeff/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jnware7/core-data-structures-jeff/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jnware7/core-data-structures-jeff/git/refs{/sha}","trees_url":"https://api.github.com/repos/jnware7/core-data-structures-jeff/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jnware7/core-data-structures-jeff/statuses/{sha}","languages_url":"https://api.github.com/repos/jnware7/core-data-structures-jeff/languages","stargazers_url":"https://api.github.com/repos/jnware7/core-data-structures-jeff/stargazers","contributors_url":"https://api.github.com/repos/jnware7/core-data-structures-jeff/contributors","subscribers_url":"https://api.github.com/repos/jnware7/core-data-structures-jeff/subscribers","subscription_url":"https://api.github.com/repos/jnware7/core-data-structures-jeff/subscription","commits_url":"https://api.github.com/repos/jnware7/core-data-structures-jeff/commits{/sha}","git_commits_url":"https://api.github.com/repos/jnware7/core-data-structures-jeff/git/commits{/sha}","comments_url":"https://api.github.com/repos/jnware7/core-data-structures-jeff/comments{/number}","issue_comment_url":"https://api.github.com/repos/jnware7/core-data-structures-jeff/issues/comments{/number}","contents_url":"https://api.github.com/repos/jnware7/core-data-structures-jeff/contents/{+path}","compare_url":"https://api.github.com/repos/jnware7/core-data-structures-jeff/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jnware7/core-data-structures-jeff/merges","archive_url":"https://api.github.com/repos/jnware7/core-data-structures-jeff/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jnware7/core-data-structures-jeff/downloads","issues_url":"https://api.github.com/repos/jnware7/core-data-structures-jeff/issues{/number}","pulls_url":"https://api.github.com/repos/jnware7/core-data-structures-jeff/pulls{/number}","milestones_url":"https://api.github.com/repos/jnware7/core-data-structures-jeff/milestones{/number}","notifications_url":"https://api.github.com/repos/jnware7/core-data-structures-jeff/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jnware7/core-data-structures-jeff/labels{/name}","releases_url":"https://api.github.com/repos/jnware7/core-data-structures-jeff/releases{/id}","deployments_url":"https://api.github.com/repos/jnware7/core-data-structures-jeff/deployments","created_at":"2017-01-23T18:38:12Z","updated_at":"2017-01-23T19:02:48Z","pushed_at":"2017-01-27T20:22:38Z","git_url":"git://github.com/jnware7/core-data-structures-jeff.git","ssh_url":"git@github.com:jnware7/core-data-structures-jeff.git","clone_url":"https://github.com/jnware7/core-data-structures-jeff.git","svn_url":"https://github.com/jnware7/core-data-structures-jeff","homepage":null,"size":10,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jnware7/core-data-structures-jeff/pulls/2"},"html":{"href":"https://github.com/jnware7/core-data-structures-jeff/pull/2"},"issue":{"href":"https://api.github.com/repos/jnware7/core-data-structures-jeff/issues/2"},"comments":{"href":"https://api.github.com/repos/jnware7/core-data-structures-jeff/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/jnware7/core-data-structures-jeff/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/jnware7/core-data-structures-jeff/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jnware7/core-data-structures-jeff/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/jnware7/core-data-structures-jeff/statuses/ac232de1465cb35191dc3964fae683389b692215"}}}}
{"actor":{"display_login":"deadlyicon"}}