Binary Search Tree Implementation

February 7, 2007 12:29pm CST
hi,somebody help me how to code BST in C# , i have Concept of bst but not know how to code it in c#?
3 responses
@erikssion (109)
• Philippines
7 Mar 07
for the sake of implementing binary search from scratch, it might be faster to use pointers. they are unsafe in C# though.
@thor78 (45)
• Philippines
12 Apr 07
Yeah... You have to declare most of your pointers with the keyword "unsafe".
• United States
23 Oct 07
If you want to play with pointers why not use C++. Using unsafe is not a good idea in C#. You would end up with buch of issues.
• United States
8 Feb 07
C# .NET provides a way to use a binary search without coding it from scratch. If you use System.Collections.ArrayList you can call the BinarySearch method from an ArrayList. You might want to check out the following article on CodeProject too: Good luck.