Tutorials

What are B-Trees?

B-tree is another very popular search tree. The node in a binary tree like AVL tree contains only one record. AVL tree is commonly stored in primary memory. In database application, where huge volume of data is handled, the search tree cannot be accommodated in primary memory. B-trees are primarily meant for secondary storage. A …

What are B-Trees? Read More »

How to Convert a Recursive Function or Algorithm to Non-Recursive?

Any recursive function can be converted to non-recursive function through use of a stack as explained below. A recursive call is similar to a call to another function. Any call to a function requires that the function has storage area where it can store its local variables and actual parameters. Return address must be saved …

How to Convert a Recursive Function or Algorithm to Non-Recursive? Read More »

How to Swap Two Numbers Without Using Temporary Variable or Arithmetic Operators?

You have done swapping of two numbers using temporary variable or by using arithmetic operators. It can be done in following way. Lets take two numbers a=5 and b=7. Using Temporary Variable temp=a;            //temp becomes 5 a=b;                 //a becomes 7 b=temp;            //b becomes 5 Also Read: C++ program to swap two numbers using pointers Also Read: C++ …

How to Swap Two Numbers Without Using Temporary Variable or Arithmetic Operators? Read More »