seg Tree Algorithm

The formal title" Segregated Witness (Consensus layer)" had Bitcoin Improvement Proposal number BIP141.The declared purpose was to prevent nonintentional bitcoin transaction malleability, let optional data transmission, and to bypass certain protocol restrictions (such as the block size limit) with a soft fork.

seg Tree source code, pseudocode and analysis