3 ms·
For #1, it really depends on what you mean by "array" and what you need to use it for. Sounds like an XY problem. If you take it to mean a more abstract concep
by testplzignore 7y ago
For #1, it really depends on what you mean by "array" and what you need to use it for. Sounds like an XY problem.
If you take it to mean a more abstract concept of a list of things that can be iterated and accessed by index, then the fastest implementation is O(1): build no data structure at all - just implement the iterator and index functions.
If you take it to mean physically manipulating atoms on a chip to be in a certain state, then you'll actually have to do something :)
- zyx321 7y agoAn array is a data structure that can be accessed using the Array operator `[]`. C# will allow overloading the operator, Java will not.