I think the question is a bit ambiguous.

In the presentation, Huffman tree was defined by "a binary tree whose leaves represent letters ,and the path from the root to a leave represents the encoding of the letter, considering left as 0, and right as 1". However, the requirements regards weights is not well defined. From the example of algorithm we saw in class, one might define that "all letters are coded in order of their frequency in the corpus for the shortest possible binary string that is prefix-free and injective." Which is corresponded with both the algorithm we saw and the problem itself. In the question, you only require Huffman tree to be driven from the weights, with arbitrary choice in terms of left/right order and repeating weights, however you did not explain what the **meaning in practice** of been " driven from the weights", and this question could be answered in many different ways.you did not mention a general algorithm for any Huffman tree.

In fact, the left Huffman tree in question 6 example is not correlated with " Huffman code: Specification" slide in the presentations, defining the output to be" **variable length**, prefix free, code"