Skip to content

Category Archives: C++

Given a string S, remove duplicates in this string using STL in C++ Examples: Input: Geeks for geeks Output: Gefgkors Input: aaaaabbbbbb Output: ab Recommended:… Read More
This function returns a direct reference to the last character of the string. This shall only be used on non-empty strings. This can be used… Read More
It is used to access the first character from the string. It returns a reference to the first character of the string. Unlike member string::begin,… Read More
Given a string S, remove all the consecutive duplicates in this string using STL in C++ Examples: Input: Geeks for geeks Output: Geks for geks… Read More
Given a tree, and the weights of all the nodes and an integer x, the task is to find a node i such that weight[i]… Read More
Salt-and-pepper noise is a form of noise sometimes seen on images. It is also known as impulse noise. This noise can be caused by sharp… Read More
When allocation of memory is done dynamically using dynamic memory allocator new in a constructor, it is known as dynamic constructor. By using this, we… Read More
In C++ there are number of stream classes for defining various streams related with files and for doing input-output operations. All these classes are defined… Read More
Prerequisite: OpenMP | Introduction with Installation GuideIn C/C++/Fortran, parallel programming can be achieved using OpenMP. In this article, we will learn how to create a… Read More
Odd-Even Transposition Sort is a parallel sorting algorithm. It is based on the Bubble Sort technique, which compares every 2 consecutive numbers in the array… Read More
Prerequisite: C signal handling, IPC through shared memory A signal is used in the UNIX system to notify a process that a particular event has… Read More
I had a phone interview, then an onsite interview at Intel in Folsom, California, for the position of Graphics Software Engineer. They mostly asked questions… Read More
After a long thirst for parallelizing highly regular loops in matrix-oriented numerical programming, OpenMP was introduced by OpenMP Architecture Review Board (ARB) on 1997. In… Read More
Given a straight line which passes through a given point (x0, y0) such that this point bisects the line segment in two equal line segments.… Read More
Given an array arr[] of N integers, the task is to find the maximum difference between any two elements of the array.Examples:  Input: arr[] =… Read More