Added info about the pythonic code not being in-place.

This commit is contained in:
Donne Martin 2015-05-08 16:46:03 -04:00
parent e5ad1f468b
commit ef6c382a90

View File

@ -10,7 +10,7 @@
"* [Test Cases](#Test-Cases)\n",
"* [Algorithm](#Algorithm)\n",
"* [Code](#Code)\n",
"* [Pythonic-Code](#Pythonic-Code)"
"* [Pythonic-Code: Not In-Place](#Pythonic-Code:-Not-In-Place)"
]
},
{
@ -22,7 +22,7 @@
"* Based on the function signature, it seems you have to implement this in C/C++?\n",
" * Yes\n",
"* Can you use additional data structures?\n",
" * No"
" * No, do the operation in-place"
]
},
{
@ -117,7 +117,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## Pythonic Code\n",
"## Pythonic-Code: Not In-Place\n",
"\n",
"The following code is Pythonic, but requires using additional data structures as Python strings are immutable. You could use a bytearray or a list instead of a string to simulate manipulating an array of characters."
]