"This notebook was prepared by [Donne Martin](https://github.com/donnemartin). Source and license info is on [GitHub](https://github.com/donnemartin/interactive-coding-challenges)."
]
},
{
"cell_type":"markdown",
"metadata":{},
"source":[
"# Challenge Notebook"
]
},
{
"cell_type":"markdown",
"metadata":{},
"source":[
"## Problem: Return all subsets of a set.\n",
"\n",
"* [Constraints](#Constraints)\n",
"* [Test Cases](#Test-Cases)\n",
"* [Algorithm](#Algorithm)\n",
"* [Code](#Code)\n",
"* [Unit Test](#Unit-Test)\n",
"* [Solution Notebook](#Solution-Notebook)"
]
},
{
"cell_type":"markdown",
"metadata":{},
"source":[
"## Constraints\n",
"\n",
"* Should the resulting subsets be unique?\n",
" * Yes, treat 'ab' and 'bc' as the same\n",
"* Is the empty set included as a subset?\n",
" * Yes\n",
"* Are the inputs unique?\n",
" * No\n",
"* Can we assume the inputs are valid?\n",
" * No\n",
"* Can we assume this fits memory?\n",
" * Yes"
]
},
{
"cell_type":"markdown",
"metadata":{},
"source":[
"## Test Cases\n",
"\n",
"<pre>\n",
"* None -> None\n",
"* [] -> [[]]\n",
"* ['a'] -> [[], \n",
" ['a']]\n",
"* ['a', 'b'] -> [[], \n",
" ['a'], \n",
" ['b'], \n",
" ['a', 'b']]\n",
"* ['a', 'b', 'c'] -> [[], \n",
" ['a'], \n",
" ['b'], \n",
" ['c'],\n",
" ['a', 'b'], \n",
" ['a', 'c'], \n",
" ['b', 'c'],\n",
" ['a', 'b', 'c']]\n",
"</pre>"
]
},
{
"cell_type":"markdown",
"metadata":{},
"source":[
"## Algorithm\n",
"\n",
"Refer to the [Solution Notebook](). If you are stuck and need a hint, the solution notebook's algorithm discussion might be a good place to start."