示例#1
0
        /// <summary>
        /// Checks if the Node is odd and adds a copy of the Left Node of The Last Node to the List
        /// </summary>
        public List <Node> CheckIfNodeCountIsOdd(List <Node> nodesToBeLayered)
        {
            if (!(nodesToBeLayered.Count == 1))
            {
                if (nodesToBeLayered.Count % 2 != 0)
                {
                    nodesToBeLayered.Add(Leaves.Last());
                }
            }

            return(nodesToBeLayered);
        }