lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


> > For the sake of the poor newbies who do not realize that Pascal is
> > being sarcastic: Roberto means "O(1) per item", of course.
> 
> In the same sake, expressing O() for space hardly makes sense. I don't
> know any datastructure where this isn't 1 and suppose any other than 1
> would be ridiculous.

Storing a sparse matrix can be done in O(rows*cols) or in O(n) (where n is the number of entries).