.

Why did Gidgiddoni, the Leader of the Nephite Armies, Hang the Gadianton Robbers leader Zemnarihah, on a tree?

"And there were many thousands who did yield themselves up prisoners unto the Nephites, and the remainder of them were slain. And their leader, Zemnarihah, was taken and hanged upon a tree...yea, even upon the top thereof until he was dead."  (3 Nephi 4:27-29)   21-22 A.D.

 ---------------------
Answer: 
The Nephite people were obeying the Law of Moses that was given to them as recorded upon the brass plates.
---------------------   

"Yea, and I also thought that they could not keep the commandments of the Lord according to the law of Moses, save they should have the law.  And I also knew that the law was engraven upon the plates of brass."  (1 Nephi 4:15-16)  600-592 B.C.

Note: The law that was written upon the brass plates was the same law that was given to the prophet Moses, as follows:

“And if a man have committed a sin worthy of death, and he be to be put to death, and thou hang him on a tree.”  (Deuteronomy 21:22)