{"action":"created","comment":{"url":"https://api.github.com/repos/edeandae/javaScriptExcersisses/pulls/comments/119989885","pull_request_review_id":41923171,"id":119989885,"diff_hunk":"@@ -0,0 +1,56 @@\n+\n+/*Given a string return the longest palindrome that can be constructed by removing or shuffling characters. \n+Example: \n+'aha' -> 'aha' \n+'ttaatta' -> ' ttaaatt' \n+'abc' -> 'a' or 'b' or 'c' \n+'gggaaa' -> 'gaaag' or 'aggga' \n+Note if there are multiple correct answers you only need to return 1 palindrome.\n+*/\n+var word = \"aabczRc\";\n+var wordDict = {};\n+var leftPalindrome = [];\n+var rigthPalindrome = [];\n+var palindrome;\n+\n+function dictionaryCreator(word){\n+  for(var index in word){\n+    var letter = word[index];\n+    if(wordDict[letter]){\n+      wordDict[letter]++;\n+    }\n+    else{\n+      wordDict[letter] = 1;\n+    }\n+  }\n+};\n+\n+dictionaryCreator(word)\n+console.log(wordDict)\n+palindromeConstructor(wordDict)\n+console.log(wordDict)\n+console.log(palindrome)\n+console.log(rigthPalindrome)\n+\n+\n+function palindromeConstructor (wordDict){\n+\tfor(var index in wordDict) {\n+\t\tfor(var i=wordDict[index]; i>1;i-=2){\n+\t\t\twordDict[index] = wordDict[index]-2;\n+\t\t\tleftPalindrome.push(index);\n+\t\t\trigthPalindrome.push(index);\n+\t\t}\n+\t}\n+\tfor(var index in wordDict){\n+\t\tif(wordDict[index]===1){\n+\t\t\tleftPalindrome.push(index)\n+\t\t\tbreak","path":"greatestPalindrome.js","position":47,"original_position":47,"commit_id":"f2027f06e9de54b2e265006abd715a4ac1dd4921","original_commit_id":"f2027f06e9de54b2e265006abd715a4ac1dd4921","user":{"login":"13DeAnda","id":9054489,"avatar_url":"https://avatars3.githubusercontent.com/u/9054489?v=3","gravatar_id":"","url":"https://api.github.com/users/13DeAnda","html_url":"https://github.com/13DeAnda","followers_url":"https://api.github.com/users/13DeAnda/followers","following_url":"https://api.github.com/users/13DeAnda/following{/other_user}","gists_url":"https://api.github.com/users/13DeAnda/gists{/gist_id}","starred_url":"https://api.github.com/users/13DeAnda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/13DeAnda/subscriptions","organizations_url":"https://api.github.com/users/13DeAnda/orgs","repos_url":"https://api.github.com/users/13DeAnda/repos","events_url":"https://api.github.com/users/13DeAnda/events{/privacy}","received_events_url":"https://api.github.com/users/13DeAnda/received_events","type":"User","site_admin":false},"body":";","created_at":"2017-06-03T16:34:12Z","updated_at":"2017-06-03T16:35:05Z","html_url":"https://github.com/edeandae/javaScriptExcersisses/pull/4#discussion_r119989885","pull_request_url":"https://api.github.com/repos/edeandae/javaScriptExcersisses/pulls/4","_links":{"self":{"href":"https://api.github.com/repos/edeandae/javaScriptExcersisses/pulls/comments/119989885"},"html":{"href":"https://github.com/edeandae/javaScriptExcersisses/pull/4#discussion_r119989885"},"pull_request":{"href":"https://api.github.com/repos/edeandae/javaScriptExcersisses/pulls/4"}}},"pull_request":{"url":"https://api.github.com/repos/edeandae/javaScriptExcersisses/pulls/4","id":123181600,"html_url":"https://github.com/edeandae/javaScriptExcersisses/pull/4","diff_url":"https://github.com/edeandae/javaScriptExcersisses/pull/4.diff","patch_url":"https://github.com/edeandae/javaScriptExcersisses/pull/4.patch","issue_url":"https://api.github.com/repos/edeandae/javaScriptExcersisses/issues/4","number":4,"state":"open","locked":false,"title":"greatest Difference: returns the greatest difference you can get by s…","user":{"login":"edeandae","id":18018480,"avatar_url":"https://avatars1.githubusercontent.com/u/18018480?v=3","gravatar_id":"","url":"https://api.github.com/users/edeandae","html_url":"https://github.com/edeandae","followers_url":"https://api.github.com/users/edeandae/followers","following_url":"https://api.github.com/users/edeandae/following{/other_user}","gists_url":"https://api.github.com/users/edeandae/gists{/gist_id}","starred_url":"https://api.github.com/users/edeandae/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edeandae/subscriptions","organizations_url":"https://api.github.com/users/edeandae/orgs","repos_url":"https://api.github.com/users/edeandae/repos","events_url":"https://api.github.com/users/edeandae/events{/privacy}","received_events_url":"https://api.github.com/users/edeandae/received_events","type":"User","site_admin":false},"body":"…ubtracting anytwo of those numbers.\r\n\r\ngreatestPalindrome: creates the longest possible palindrome with the given string","created_at":"2017-05-31T02:32:55Z","updated_at":"2017-06-03T16:35:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fb179620f7da7a004cd3f118a57dbcbe06bbfca1","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/edeandae/javaScriptExcersisses/pulls/4/commits","review_comments_url":"https://api.github.com/repos/edeandae/javaScriptExcersisses/pulls/4/comments","review_comment_url":"https://api.github.com/repos/edeandae/javaScriptExcersisses/pulls/comments{/number}","comments_url":"https://api.github.com/repos/edeandae/javaScriptExcersisses/issues/4/comments","statuses_url":"https://api.github.com/repos/edeandae/javaScriptExcersisses/statuses/f2027f06e9de54b2e265006abd715a4ac1dd4921","head":{"label":"edeandae:greatestPalindrome","ref":"greatestPalindrome","sha":"f2027f06e9de54b2e265006abd715a4ac1dd4921","user":{"login":"edeandae","id":18018480,"avatar_url":"https://avatars1.githubusercontent.com/u/18018480?v=3","gravatar_id":"","url":"https://api.github.com/users/edeandae","html_url":"https://github.com/edeandae","followers_url":"https://api.github.com/users/edeandae/followers","following_url":"https://api.github.com/users/edeandae/following{/other_user}","gists_url":"https://api.github.com/users/edeandae/gists{/gist_id}","starred_url":"https://api.github.com/users/edeandae/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edeandae/subscriptions","organizations_url":"https://api.github.com/users/edeandae/orgs","repos_url":"https://api.github.com/users/edeandae/repos","events_url":"https://api.github.com/users/edeandae/events{/privacy}","received_events_url":"https://api.github.com/users/edeandae/received_events","type":"User","site_admin":false},"repo":{"id":91753383,"name":"javaScriptExcersisses","full_name":"edeandae/javaScriptExcersisses","owner":{"login":"edeandae","id":18018480,"avatar_url":"https://avatars1.githubusercontent.com/u/18018480?v=3","gravatar_id":"","url":"https://api.github.com/users/edeandae","html_url":"https://github.com/edeandae","followers_url":"https://api.github.com/users/edeandae/followers","following_url":"https://api.github.com/users/edeandae/following{/other_user}","gists_url":"https://api.github.com/users/edeandae/gists{/gist_id}","starred_url":"https://api.github.com/users/edeandae/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edeandae/subscriptions","organizations_url":"https://api.github.com/users/edeandae/orgs","repos_url":"https://api.github.com/users/edeandae/repos","events_url":"https://api.github.com/users/edeandae/events{/privacy}","received_events_url":"https://api.github.com/users/edeandae/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/edeandae/javaScriptExcersisses","description":null,"fork":false,"url":"https://api.github.com/repos/edeandae/javaScriptExcersisses","forks_url":"https://api.github.com/repos/edeandae/javaScriptExcersisses/forks","keys_url":"https://api.github.com/repos/edeandae/javaScriptExcersisses/keys{/key_id}","collaborators_url":"https://api.github.com/repos/edeandae/javaScriptExcersisses/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/edeandae/javaScriptExcersisses/teams","hooks_url":"https://api.github.com/repos/edeandae/javaScriptExcersisses/hooks","issue_events_url":"https://api.github.com/repos/edeandae/javaScriptExcersisses/issues/events{/number}","events_url":"https://api.github.com/repos/edeandae/javaScriptExcersisses/events","assignees_url":"https://api.github.com/repos/edeandae/javaScriptExcersisses/assignees{/user}","branches_url":"https://api.github.com/repos/edeandae/javaScriptExcersisses/branches{/branch}","tags_url":"https://api.github.com/repos/edeandae/javaScriptExcersisses/tags","blobs_url":"https://api.github.com/repos/edeandae/javaScriptExcersisses/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/edeandae/javaScriptExcersisses/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/edeandae/javaScriptExcersisses/git/refs{/sha}","trees_url":"https://api.github.com/repos/edeandae/javaScriptExcersisses/git/trees{/sha}","statuses_url":"https://api.github.com/repos/edeandae/javaScriptExcersisses/statuses/{sha}","languages_url":"https://api.github.com/repos/edeandae/javaScriptExcersisses/languages","stargazers_url":"https://api.github.com/repos/edeandae/javaScriptExcersisses/stargazers","contributors_url":"https://api.github.com/repos/edeandae/javaScriptExcersisses/contributors","subscribers_url":"https://api.github.com/repos/edeandae/javaScriptExcersisses/subscribers","subscription_url":"https://api.github.com/repos/edeandae/javaScriptExcersisses/subscription","commits_url":"https://api.github.com/repos/edeandae/javaScriptExcersisses/commits{/sha}","git_commits_url":"https://api.github.com/repos/edeandae/javaScriptExcersisses/git/commits{/sha}","comments_url":"https://api.github.com/repos/edeandae/javaScriptExcersisses/comments{/number}","issue_comment_url":"https://api.github.com/repos/edeandae/javaScriptExcersisses/issues/comments{/number}","contents_url":"https://api.github.com/repos/edeandae/javaScriptExcersisses/contents/{+path}","compare_url":"https://api.github.com/repos/edeandae/javaScriptExcersisses/compare/{base}...{head}","merges_url":"https://api.github.com/repos/edeandae/javaScriptExcersisses/merges","archive_url":"https://api.github.com/repos/edeandae/javaScriptExcersisses/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/edeandae/javaScriptExcersisses/downloads","issues_url":"https://api.github.com/repos/edeandae/javaScriptExcersisses/issues{/number}","pulls_url":"https://api.github.com/repos/edeandae/javaScriptExcersisses/pulls{/number}","milestones_url":"https://api.github.com/repos/edeandae/javaScriptExcersisses/milestones{/number}","notifications_url":"https://api.github.com/repos/edeandae/javaScriptExcersisses/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/edeandae/javaScriptExcersisses/labels{/name}","releases_url":"https://api.github.com/repos/edeandae/javaScriptExcersisses/releases{/id}","deployments_url":"https://api.github.com/repos/edeandae/javaScriptExcersisses/deployments","created_at":"2017-05-19T01:38:53Z","updated_at":"2017-05-19T01:46:05Z","pushed_at":"2017-06-01T06:57:31Z","git_url":"git://github.com/edeandae/javaScriptExcersisses.git","ssh_url":"git@github.com:edeandae/javaScriptExcersisses.git","clone_url":"https://github.com/edeandae/javaScriptExcersisses.git","svn_url":"https://github.com/edeandae/javaScriptExcersisses","homepage":null,"size":9,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"edeandae:master","ref":"master","sha":"5c71022d1e3294de29ccf13cdead5028d84424e3","user":{"login":"edeandae","id":18018480,"avatar_url":"https://avatars1.githubusercontent.com/u/18018480?v=3","gravatar_id":"","url":"https://api.github.com/users/edeandae","html_url":"https://github.com/edeandae","followers_url":"https://api.github.com/users/edeandae/followers","following_url":"https://api.github.com/users/edeandae/following{/other_user}","gists_url":"https://api.github.com/users/edeandae/gists{/gist_id}","starred_url":"https://api.github.com/users/edeandae/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edeandae/subscriptions","organizations_url":"https://api.github.com/users/edeandae/orgs","repos_url":"https://api.github.com/users/edeandae/repos","events_url":"https://api.github.com/users/edeandae/events{/privacy}","received_events_url":"https://api.github.com/users/edeandae/received_events","type":"User","site_admin":false},"repo":{"id":91753383,"name":"javaScriptExcersisses","full_name":"edeandae/javaScriptExcersisses","owner":{"login":"edeandae","id":18018480,"avatar_url":"https://avatars1.githubusercontent.com/u/18018480?v=3","gravatar_id":"","url":"https://api.github.com/users/edeandae","html_url":"https://github.com/edeandae","followers_url":"https://api.github.com/users/edeandae/followers","following_url":"https://api.github.com/users/edeandae/following{/other_user}","gists_url":"https://api.github.com/users/edeandae/gists{/gist_id}","starred_url":"https://api.github.com/users/edeandae/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edeandae/subscriptions","organizations_url":"https://api.github.com/users/edeandae/orgs","repos_url":"https://api.github.com/users/edeandae/repos","events_url":"https://api.github.com/users/edeandae/events{/privacy}","received_events_url":"https://api.github.com/users/edeandae/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/edeandae/javaScriptExcersisses","description":null,"fork":false,"url":"https://api.github.com/repos/edeandae/javaScriptExcersisses","forks_url":"https://api.github.com/repos/edeandae/javaScriptExcersisses/forks","keys_url":"https://api.github.com/repos/edeandae/javaScriptExcersisses/keys{/key_id}","collaborators_url":"https://api.github.com/repos/edeandae/javaScriptExcersisses/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/edeandae/javaScriptExcersisses/teams","hooks_url":"https://api.github.com/repos/edeandae/javaScriptExcersisses/hooks","issue_events_url":"https://api.github.com/repos/edeandae/javaScriptExcersisses/issues/events{/number}","events_url":"https://api.github.com/repos/edeandae/javaScriptExcersisses/events","assignees_url":"https://api.github.com/repos/edeandae/javaScriptExcersisses/assignees{/user}","branches_url":"https://api.github.com/repos/edeandae/javaScriptExcersisses/branches{/branch}","tags_url":"https://api.github.com/repos/edeandae/javaScriptExcersisses/tags","blobs_url":"https://api.github.com/repos/edeandae/javaScriptExcersisses/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/edeandae/javaScriptExcersisses/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/edeandae/javaScriptExcersisses/git/refs{/sha}","trees_url":"https://api.github.com/repos/edeandae/javaScriptExcersisses/git/trees{/sha}","statuses_url":"https://api.github.com/repos/edeandae/javaScriptExcersisses/statuses/{sha}","languages_url":"https://api.github.com/repos/edeandae/javaScriptExcersisses/languages","stargazers_url":"https://api.github.com/repos/edeandae/javaScriptExcersisses/stargazers","contributors_url":"https://api.github.com/repos/edeandae/javaScriptExcersisses/contributors","subscribers_url":"https://api.github.com/repos/edeandae/javaScriptExcersisses/subscribers","subscription_url":"https://api.github.com/repos/edeandae/javaScriptExcersisses/subscription","commits_url":"https://api.github.com/repos/edeandae/javaScriptExcersisses/commits{/sha}","git_commits_url":"https://api.github.com/repos/edeandae/javaScriptExcersisses/git/commits{/sha}","comments_url":"https://api.github.com/repos/edeandae/javaScriptExcersisses/comments{/number}","issue_comment_url":"https://api.github.com/repos/edeandae/javaScriptExcersisses/issues/comments{/number}","contents_url":"https://api.github.com/repos/edeandae/javaScriptExcersisses/contents/{+path}","compare_url":"https://api.github.com/repos/edeandae/javaScriptExcersisses/compare/{base}...{head}","merges_url":"https://api.github.com/repos/edeandae/javaScriptExcersisses/merges","archive_url":"https://api.github.com/repos/edeandae/javaScriptExcersisses/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/edeandae/javaScriptExcersisses/downloads","issues_url":"https://api.github.com/repos/edeandae/javaScriptExcersisses/issues{/number}","pulls_url":"https://api.github.com/repos/edeandae/javaScriptExcersisses/pulls{/number}","milestones_url":"https://api.github.com/repos/edeandae/javaScriptExcersisses/milestones{/number}","notifications_url":"https://api.github.com/repos/edeandae/javaScriptExcersisses/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/edeandae/javaScriptExcersisses/labels{/name}","releases_url":"https://api.github.com/repos/edeandae/javaScriptExcersisses/releases{/id}","deployments_url":"https://api.github.com/repos/edeandae/javaScriptExcersisses/deployments","created_at":"2017-05-19T01:38:53Z","updated_at":"2017-05-19T01:46:05Z","pushed_at":"2017-06-01T06:57:31Z","git_url":"git://github.com/edeandae/javaScriptExcersisses.git","ssh_url":"git@github.com:edeandae/javaScriptExcersisses.git","clone_url":"https://github.com/edeandae/javaScriptExcersisses.git","svn_url":"https://github.com/edeandae/javaScriptExcersisses","homepage":null,"size":9,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/edeandae/javaScriptExcersisses/pulls/4"},"html":{"href":"https://github.com/edeandae/javaScriptExcersisses/pull/4"},"issue":{"href":"https://api.github.com/repos/edeandae/javaScriptExcersisses/issues/4"},"comments":{"href":"https://api.github.com/repos/edeandae/javaScriptExcersisses/issues/4/comments"},"review_comments":{"href":"https://api.github.com/repos/edeandae/javaScriptExcersisses/pulls/4/comments"},"review_comment":{"href":"https://api.github.com/repos/edeandae/javaScriptExcersisses/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/edeandae/javaScriptExcersisses/pulls/4/commits"},"statuses":{"href":"https://api.github.com/repos/edeandae/javaScriptExcersisses/statuses/f2027f06e9de54b2e265006abd715a4ac1dd4921"}}}}
{"actor":{"display_login":"13DeAnda"}}