Path: csiph.com!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Ben Bacarisse Newsgroups: comp.lang.javascript Subject: Re: Counter or Index? Date: Sat, 02 Sep 2017 15:32:55 +0100 Organization: A noiseless patient Spider Lines: 28 Message-ID: <87r2vpyxuw.fsf@bsb.me.uk> References: <2274405e-c00f-4c91-9b6b-0c4ab7577be8@googlegroups.com> <553d4a12-4ab8-44c3-8d16-9a29b53919ea@googlegroups.com> <98e08a5a-80ac-4691-8a16-2a24e7502eb4@googlegroups.com> <5cc7477b-1e70-4d07-aa2d-8bd76b85a200@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="d5595e0e6643871eaada005572d21220"; logging-data="2781"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/pz8+RHDaobCchxfe3OtaSLiF+Sy1/wOc=" Cancel-Lock: sha1:rP6Ovwd3Yx4NfANBCMaW1BZ28hQ= sha1:q1qkZAHntehN2XeS2S9irFtFlmA= X-BSB-Auth: 1.45af0bd2b54bc4a7d822.20170902153255BST.87r2vpyxuw.fsf@bsb.me.uk Xref: csiph.com comp.lang.javascript:33940 jonas.thornvall@gmail.com writes: > Lets see who can first can write an algorithm in head "or javascript > ;)" that read out all the words in alpahbetical order. > > [b[a[l[l*]][n[a[n[a*]]]][t*]][u[n*][t[t*] What does this notation mean? > Is there a name for this type of branching string datastructure? > I mean it does not need to store words, it could store chessgames or > whatever branching structure, so it must be known. Well it certainly > not a binary tree it is a branching tree, so what is the name? When used for searching, any branching tree is simply called a search tree. There are many much more specific terms depending on how the data are organised in the tree. There are AVL trees, red-black trees, suffix trees and so on. For words, I suspect the one you are looking for is called a trie. I don't think there is a standard name for a tree where the number of possible branches varies depending on where in the tree a node appears (as one might use for chess games). It's just the tree of possible moves. -- Ben.