This is more like theoretical question. Looking at first picture at:http://www.programmersheaven.com/2/Art_Huffman_p2

Can anyone explain to me:

1. is there only frequency measure for sorting, or allso something else ? I mean if bottom line is 'c d a b', wouldnt be the same thing if it was 'a b c d' ?
or any other posible sort order.

2. In case presented there, in binary tree there are only used characters from short sample string. If our string is of x lenght, we dont know which characters appear in it(and we don't parse source string before encoding, by definition of dynamic encoding). Do we put in binary tree allso characters that does not appear in our source string (for example all first 127 ASCII characters) ?

Thanks for replays.