Author Archive

Some More about Recursion

Written by Raza. Posted in C++

recursion in programming

 

Deviating a little from our series of discussion on Sorting Algorithms, this time and maybe the next one too, we would be plunging into certain other core concepts considered vital and important to good programming. Last time, we carried out the Selection Sort using the recursive technique. As recursion is a tricky and fundamental topic and a very powerful tool as well, we would be having some more discussion on recursion now.

Pointer Hazards in C++

Written by Raza. Posted in C++

Pointer Hazards in C++

Working in C++ is considered relatively difficult because the programmer is faced with many additional headaches; biggest of them being the memory management and the consequent pointer hazards. The allocation and de-allocation of memory at the appropriate time is not an easy job. But this very feature makes C++ one of the fastest and efficient Programming Languages. Pointers are used to access the memory blocks in C++. I assume that you are already familiar with the pointers. So I shall explain some of the dangers you might be in while working with pointers. Then gradually we shall advance towards more advanced usage and hazards.

Class Templates in C++

Written by Raza. Posted in C++

Cloud Computing Technology

Just like function templates, we can also make and use class templates in our program. With the help of class templates, a whole class could be made generic. Each function declared within the class is a template function by default. Class templates behave much like the function templates though there is a lot more to be associated and understood with them. Class templates can also be specialized like specializing function templates. For this article, I would explain only how to make a simple class, a template class. 

Binary Search Algorithm in C++

Written by Raza. Posted in C++

Binary Search Algorithm C++

Linear search, as described last time is ineffective for method for finding piece of information, the key from a large list. If you have a database of one hundred thousand people living in Los Angeles, you would surely have a headache if you were to look at each and every element of that database to look for your key. In such situations, Binary Search comes into play. Binary search is a very efficient searching algorithm especially for large amount of data. For binary search to perform, data in the list has to be sorted beforehand. 

The Insertion Sort Algorithm

Written by Raza. Posted in C++

The Insertion Sort Algorithm

Over the month, we have been inching towards more efficient sorting techniques. Insertion Sort is yet another Sorting Algorithm which works on the principle of In-place sorting. It is the most efficient Sorting Algorithm for small Lists but not very good when the size becomes increasingly large. You would be surprised to hear that Insertion sort uses Bubble Sort in its complete procedure as well. So let us see and try to understand its basics.