# Quick sort algorithm in binary tree (by using linked listed objects)

Email
 Submitted on: 1/2/2015 4:54:00 AM By: Cengiz YILMAZ (from psc cd) Level: Beginner User Rating: By 3 Users Compatibility: C# Views: 995

The main purpose of this code is to sort elements without given any predefined value. Therefore result is like a binary tree.

code:
Can't Copy and Paste this?
 ``` //************************************** // Name: Quick sort algorithm in binary tree (by using linked listed objects) // Description:The main purpose of this code is to sort elements without given any predefined value. Therefore result is like a binary tree. // By: Cengiz YILMAZ (from psc cd) // // Inputs:number of elements you want to sort and elements // // Returns:Sorted elements // // Side Effects:no side effects //************************************** /* * This program sorts the given number of elements * by using quick sort algorthim. But this algorithm * applies to like a linked listed objects instead of * contigous array. Therefore results of this algorithm * gives you a binary tree and you can sort any number of * elements. */ using System; namespace quicksort { /// /// Summary description for Class1. /// class Class1 { /// /// The main entry point for the application. /// [STAThread] static void Main(string[] args) { int j,k; Node nd=new Node(); //Number of sorting element is entered here Console.WriteLine("Please Enter number of sorting element"); j=Int32.Parse(Console.ReadLine()); //all elements is writen in a node object. Node object have next and previous attributes also in node object. nd=valueread(nd,j); k=nd.getnextnode().getvalue(); //sorting algorithm is called here nd=qsort(nd); Console.WriteLine("Results are below"+nd.getvalue()); showresult(nd); Console.ReadLine(); } //This function reads the datas and writes them to a linked list node object public static Node valueread(Node nd,int i) { Node parnt=new Node(); parnt=nd; for(int k=0;k

Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

What do you think of this code (in the Beginner category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor (See voting log ...)