mirror of
https://github.com/donnemartin/interactive-coding-challenges.git
synced 2024-03-22 13:11:13 +08:00
Added info about the pythonic code not being in-place.
This commit is contained in:
parent
e5ad1f468b
commit
ef6c382a90
|
@ -10,7 +10,7 @@
|
||||||
"* [Test Cases](#Test-Cases)\n",
|
"* [Test Cases](#Test-Cases)\n",
|
||||||
"* [Algorithm](#Algorithm)\n",
|
"* [Algorithm](#Algorithm)\n",
|
||||||
"* [Code](#Code)\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",
|
"* Based on the function signature, it seems you have to implement this in C/C++?\n",
|
||||||
" * Yes\n",
|
" * Yes\n",
|
||||||
"* Can you use additional data structures?\n",
|
"* Can you use additional data structures?\n",
|
||||||
" * No"
|
" * No, do the operation in-place"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -117,7 +117,7 @@
|
||||||
"cell_type": "markdown",
|
"cell_type": "markdown",
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"source": [
|
"source": [
|
||||||
"## Pythonic Code\n",
|
"## Pythonic-Code: Not In-Place\n",
|
||||||
"\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."
|
"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."
|
||||||
]
|
]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user