Пример #1
0
        public bool Equals(BalancedTree <T> tree)
        {
            if (tree == null)
            {
                return(false);
            }

            if (this == tree)
            {
                return(true);
            }

            var thisListShape  = this.GetPreOrderList();
            var otherListShape = tree.GetPreOrderList();

            return(thisListShape.SequenceEqual(otherListShape));
        }