Forum: C Mar 6th, 2007 |
| Replies: 4 Views: 1,957 Big O Notation is used to denote the complexity of the algorithm ( worst case complexity)...
for example
the following code has complexity O(n)
for(int i=1;i<=n; ++i )
{
// do... |
Forum: C Oct 6th, 2006 |
| Replies: 4 Views: 1,477 Thank You ~S.o.S~ & Ancient Dragon for your help finally i learn how to calculate the polynomial complexity.....
for( int i=0; i<n; ++i )
for( int j=0; j<i; ++j )
... |
Forum: C Oct 3rd, 2006 |
| Replies: 4 Views: 1,477 i want to calculate the complexity of the following code snippet
for(int k=0;k<n; ++k)
for(int j=0; j<k; ++j)
for(int i=0; i<j; ++i)
cout<< "Hello World"... |
Forum: C Aug 11th, 2006 |
| Replies: 3 Views: 2,419 You can get the effect of Virtual Constructor by using Factory design pattern...... which doesn't violates the objected oriented rules specifically inheritance structure........ but its helpful. and... |
Forum: C Aug 10th, 2006 |
| Replies: 2 Views: 2,081 The problem you've described might consists of pair of key value... using pair< T1,T2> template is agood choice .....then.
I totally agree with salem, every Data Structure has some advantages... |
Forum: C Jul 16th, 2006 |
| Replies: 5 Views: 2,278 Amazing Article :). Thanks from my side :). |
Forum: C Jul 8th, 2006 |
| Replies: 1 Views: 1,568 I've gone through several books they explain Upcasting as
Base class pointer pointing to Drived class Object
this definition is correct.
Downcasting:
i got a bit confused.....not... |
Forum: C Jul 8th, 2006 |
| Replies: 5 Views: 2,347 Sorry for late replying! was busy! hmmmZ. sending you a snippet of code that might help you :). concentrate on the technique of reading and writing to file you can Edit any record ~!.Check the... |
Forum: C Jul 7th, 2006 |
| Replies: 7 Views: 1,620 Swapping two variables is an easy stuff if you are using temporary variable
void swap(int& a,int& b)
{
int temp=a;
a=b;
b=temp;
} |
Forum: C Jul 6th, 2006 |
| Replies: 5 Views: 2,278 Pointer to function are the pointers which have the ability to call the function pointed to by them.As the ordinary pointers take the address of variable and can change the value pointed by them, the... |
Forum: C Jul 4th, 2006 |
| Replies: 5 Views: 2,347 Editing is a trick in File based databases.........you can use several ways to achieve this....
1. Use the array of Structure and read the entire file in array of structure.......... and do... |
Forum: C Jul 3rd, 2006 |
| Replies: 4 Views: 1,321 Inheritance simply means Reusing the Interface of the base class. Two classes have something in common for example consider the following example. There are two classess Shape(a base/parent class) ... |