mirror of
https://github.com/donnemartin/interactive-coding-challenges
synced 2026-01-10 19:38:02 +00:00
Set solution to blank for unique chars challenge.
This commit is contained in:
@@ -76,20 +76,15 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 3,
|
"execution_count": null,
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"collapsed": false
|
"collapsed": false
|
||||||
},
|
},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
"def unique_chars(string):\n",
|
"def unique_chars(string):\n",
|
||||||
" chars_set = set()\n",
|
" # TODO: Implement me\n",
|
||||||
" for char in string:\n",
|
" pass"
|
||||||
" if char in chars_set:\n",
|
|
||||||
" return False\n",
|
|
||||||
" else:\n",
|
|
||||||
" chars_set.add(char)\n",
|
|
||||||
" return True"
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -108,19 +103,11 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 4,
|
"execution_count": null,
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"collapsed": false
|
"collapsed": false
|
||||||
},
|
},
|
||||||
"outputs": [
|
"outputs": [],
|
||||||
{
|
|
||||||
"name": "stdout",
|
|
||||||
"output_type": "stream",
|
|
||||||
"text": [
|
|
||||||
"Success: test_unique_chars\n"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"source": [
|
"source": [
|
||||||
"# %load test_unique_chars.py\n",
|
"# %load test_unique_chars.py\n",
|
||||||
"from nose.tools import assert_equal\n",
|
"from nose.tools import assert_equal\n",
|
||||||
|
|||||||
Reference in New Issue
Block a user