Posts by HARI HARAN B
Author Biographical Info: Not available
Sorting a sequence is a problem of great importance in computer science and software development. This article describes the methods to sort both a normal array and the STL array c.... Read More
Finding the index of the largest element in an unsorted array is done through brute force search. If the array is sorted the task is trivial and the index is the length-1 if it’s.... Read More
Swapping elements in an array is handy in many standard algorithms like bubble sort. In this article, we shall look at the basic principles of swapping and swapping positions in an.... Read More
Generating random strings will be helpful in many applications. As strings are arrays of characters and characters are stored as numbers the problem comes down to generating random.... Read More
The normal (static ) arrays have their size initialized in compile time. Although, they are useful in some cases most of the time it is required to initialize arrays size in runtim.... Read More
The new[] operator is used to dynamically allocate a required amount of storage in the free store. The dynamically allocated memory has to be deleted properly and the delete operat.... Read More
The std::map sorts the elements based on the key value and this sorting is usually done in descending order for most fundamental datatypes. The key values are compared using the st.... Read More
Obtaining the current date and time is crucial in many programs. The C++ STL provides the <chrono> library which can be used with <ctime> from c to get the current time.... Read More