user323: I am wondering - is it possible to delete a single element of an array in Ethereum without having to create a new array and copying the entire array? Reading some of the documentation, I can't seem to find any good way of doing this.

user26726: If you want the operation of removing an element from a list to be efficient (i.e. without having to copy the list), you have to use a different data structure, e.g. a linked list or a mapping with a reverse index. Note that delete arr[ind] does not rearrange the array but only resets the array element.

user5848: Refer to the documentation:
delete myArray[arrayIndex];


323: <p>I am wondering - is it possible to delete a single element of an array in Ethereum without having to create a new array and copying the entire array? Reading <a href="https://github.com/ethereum/wiki/wiki/Solidity-Tutorial" rel="nofollow">some of the documentation</a>, I can't seem to find any good way of doing this.</p>
 26726: <p>If you want the operation of removing an element from a list to be efficient (i.e. without having to copy the list), you have to use a different data structure, e.g. a linked list or a mapping with a reverse index. Note that <code>delete arr[ind]</code> does not rearrange the array but only resets the array element.</p>
 5848: <p>Refer to <a href="https://github.com/ethereum/wiki/wiki/Solidity-Tutorial#arrays" rel="nofollow">the documentation</a>:</p>

<pre><code>delete myArray[arrayIndex];
</code></pre>
