Added the same changes to test cases in the challenge notebook

This commit is contained in:
Ashhar Hasan 2015-10-30 03:15:27 +05:30
parent ef77603f9b
commit eb44aae3f5

View File

@ -18,7 +18,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## Problem: Compress a string such that 'AAABCCDDDD' becomes 'A3B1C2D4'. Only compress the string if it saves space.\n",
"## Problem: Compress a string such that 'AAABCCDDDD' becomes 'A3BCCD4'. Only compress the string if it saves space.\n",
"\n",
"* [Constraints](#Constraints)\n",
"* [Test Cases](#Test-Cases)\n",
@ -52,7 +52,7 @@
"* None -> None\n",
"* '' -> ''\n",
"* 'AABBCC' -> 'AABBCC'\n",
"* 'AAABCCDDDD' -> 'A3B1C2D4'"
"* 'AAABCCDDDD' -> 'A3BCCD4'"
]
},
{
@ -118,7 +118,7 @@
" assert_equal(func(None), None)\n",
" assert_equal(func(''), '')\n",
" assert_equal(func('AABBCC'), 'AABBCC')\n",
" assert_equal(func('AAABCCDDDD'), 'A3B1C2D4')\n",
" assert_equal(func('AAABCCDDDD'), 'A3BCCD4')\n",
" print('Success: test_compress')\n",
"\n",
"\n",
@ -143,21 +143,21 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 2",
"display_name": "Python 3",
"language": "python",
"name": "python2"
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 2
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.10"
"pygments_lexer": "ipython3",
"version": "3.4.3"
}
},
"nbformat": 4,