{"action":"created","issue":{"url":"https://api.github.com/repos/dabaitu/300/issues/12","labels_url":"https://api.github.com/repos/dabaitu/300/issues/12/labels{/name}","comments_url":"https://api.github.com/repos/dabaitu/300/issues/12/comments","events_url":"https://api.github.com/repos/dabaitu/300/issues/12/events","html_url":"https://github.com/dabaitu/300/issues/12","id":59198582,"number":12,"title":"Help with problem","user":{"login":"dabaitu","id":3894166,"avatar_url":"https://avatars.githubusercontent.com/u/3894166?v=3","gravatar_id":"","url":"https://api.github.com/users/dabaitu","html_url":"https://github.com/dabaitu","followers_url":"https://api.github.com/users/dabaitu/followers","following_url":"https://api.github.com/users/dabaitu/following{/other_user}","gists_url":"https://api.github.com/users/dabaitu/gists{/gist_id}","starred_url":"https://api.github.com/users/dabaitu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dabaitu/subscriptions","organizations_url":"https://api.github.com/users/dabaitu/orgs","repos_url":"https://api.github.com/users/dabaitu/repos","events_url":"https://api.github.com/users/dabaitu/events{/privacy}","received_events_url":"https://api.github.com/users/dabaitu/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-02-27T07:03:30Z","updated_at":"2015-03-04T21:53:11Z","closed_at":null,"body":"https://github.com/dabaitu/300/blob/master/recursion_dp/permutationsOfString/python/solution.py\r\n\r\nThe way I tried to do that problem is by building a permutations tree. However, somehow it seems building the tree only builds the left most branch. I'm lost. Help.\r\n\r\n@cmooney3\r\n@quinnbaetz "},"comment":{"url":"https://api.github.com/repos/dabaitu/300/issues/comments/77257716","html_url":"https://github.com/dabaitu/300/issues/12#issuecomment-77257716","issue_url":"https://api.github.com/repos/dabaitu/300/issues/12","id":77257716,"user":{"login":"cmooney3","id":3894415,"avatar_url":"https://avatars.githubusercontent.com/u/3894415?v=3","gravatar_id":"","url":"https://api.github.com/users/cmooney3","html_url":"https://github.com/cmooney3","followers_url":"https://api.github.com/users/cmooney3/followers","following_url":"https://api.github.com/users/cmooney3/following{/other_user}","gists_url":"https://api.github.com/users/cmooney3/gists{/gist_id}","starred_url":"https://api.github.com/users/cmooney3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cmooney3/subscriptions","organizations_url":"https://api.github.com/users/cmooney3/orgs","repos_url":"https://api.github.com/users/cmooney3/repos","events_url":"https://api.github.com/users/cmooney3/events{/privacy}","received_events_url":"https://api.github.com/users/cmooney3/received_events","type":"User","site_admin":false},"created_at":"2015-03-04T21:53:11Z","updated_at":"2015-03-04T21:53:11Z","body":"I was a little confused by how you did it, to be honest.  I *think* it can be done simpler, so instead of trying to debug that, I've uploaded my approach right now.  (If you don't like it feel free to revert it, but it seemed like the easiest way to submit my attempt.  I really don't mean to clobber your work!).\r\n\r\nI traverse the tree implicitly to reduce how much storage is used instead of actually building the tree.  It also allows you to avoid using that global variable by pushing the helper functions into the scope of the wrapper function.  This is a really good candidate for Python's \"yield\" as well since if you are iterating over the permutations you may not need them all at once.  If you're not familiar with that look up \"python generators\" they're really nice"}}