Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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 :)



An array is a data structure that can be accessed using the Array operator `[]`. C# will allow overloading the operator, Java will not.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: