It's worth talking about, I think, the distinction between a "linked
list" and a "list".

First, why would you prefer a linked list over a list?  Efficiency?
If so, note that regular lists can have performance an order of
magnitude better than linked lists in many contexts.  The efficiency
of linked lists comes into play when your algorithms are designed to
be efficient for a linked list and inefficient for a flat list.

Hashes are similar, but even more complex (as a general rule, hashes
have extremely bad worst case behavior, and there have been a variety
of denial of service attacks for web servers because of this issue -
nowadays, a robust web server randomizes its hashing algorithm to make
it hard to guess how to break it).

In other words, both of these are typically examples of complex
solutions - it's probably a mistake to start here, and probably wiser
to start with specific applications.  (Though, if your applications
are simply designed to require these kinds of data structures, it's
not clear why you would be using J to implement them.)

Or... that's my current understanding of these issues.

FYI,

-- 
Raul

On Sat, Feb 16, 2013 at 12:57 PM, Y-01 <[email protected]> wrote:
> hi@all
>
> I have some basic questions on which i can't find any answers
>
> 1. How we can create a linked list with push_back complexity =~ O(1) in J ?
> we need to save a poinet to last element
>
> 2. is it right that these examples correspond to linked lists?
>
> 1;<2
> 1;<(2;<3)
> 1;<(2;<(3;<4))
>
> 3. And what about hashmap? Is it right that there is no any builtined
> hashmap struct? Maybe there is a popular aside addon/lib (smth like
> hash.ijs) ?
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to