Click here to Skip to main content
Click here to Skip to main content
Articles » Languages » C# » General » Downloads
 
Add your own
alternative version
Go to top

A Link to LINQ and a Look at the Binary Search Tree

, 19 Apr 2010
A Comprehensive Look at LINQ and the Binary Search Tree Data Structure
BinaryTreeLibrary.zip
BinaryTreeLibrary
BinaryTreeLibrary.suo
BinaryTreeLibrary
bin
Release
BinaryTreeLibrary.dll
BinaryTreeLibrary.pdb
Properties
TreeTest
bin
Debug
BinaryTreeLibrary.dll
TreeTest.exe
TreeTest.vshost.exe
TreeTest.vshost.exe.manifest
Properties
using System;
using BinaryTreeLibrary;

public class TreeTest
{
    public static void Main(string[] args)
    {
        Tree tree = new Tree();
        int insertValue;

        Console.WriteLine("Inserting Values:  ");
        Random random = new Random();
        for (int i = 1; i <= 10; i++)
        {
            insertValue = random.Next(100);
            Console.Write(insertValue + " ");
            tree.insertNode(insertValue);
        }

        Console.WriteLine("\n\nPreorder traversal");
        tree.PreorderTraversal();

        Console.WriteLine("\n\nInorder traversal");
        tree.InorderTraversal();

        Console.WriteLine("\n\nPostorder traversal");
        tree.PostorderTraversal();
        Console.WriteLine();
    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

logicchild
Other Pref. Trust
United States United States
I started electronics training at age 33. I began studying microprocessor technology in an RF communications oriented program. I am 43 years old now. I have studied C code, opcode (mainly x86 and AT+T) for around 3 years in order to learn how to recognize viral code and the use of procedural languages. I am currently learning C# and the other virtual runtime system languages. I guess I started with the egg rather than the chicken. My past work would indicate that my primary strength is in applied mathematics.

| Advertise | Privacy | Mobile
Web01 | 2.8.140926.1 | Last Updated 20 Apr 2010
Article Copyright 2010 by logicchild
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid