No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
i want to apply a technique of sorting the numbers using binary search tree . Average case of building a tree is O(lg n) and then if i apply Inorder traversal , i could get sorted output. So, can this technique be used over others like mergesort , quicksort etc. … |
|
Re:
[CODE]class A { public: int a; A() : a(100) { } }; class B : public A { public: int b; B() : b(200){ } }; int main() { A a; B *ptrB =(B*)&a; cout<<ptrB->b<<endl; // Is there a way to get this to print 200?? }[/CODE] |
|
what is meant by infinite time complexity??? i mean, does it imply that the problem cannot be solved by the algorithm as it takes infinite time..??:?: |