Skip to content

Category Archives: C++

Given two integer arrays arr1[] and arr2[] sorted in ascending order and an integer k. Find k pairs with smallest sums such that one element… Read More
Given a Linked List and a number n, write a function that returns the value at the n’th node from the end of the Linked… Read More
Given a string of size n, write functions to perform the following operations on a string- Left (Or anticlockwise) rotate the given string by d… Read More
In C/C++, strcat() is a predefined function used for string handling, under string library (string.h in C, and cstring in C++). This function appends the… Read More
Given a linked list, write a function to reverse every alternate k nodes (where k is an input to the function) in an efficient way.… Read More
In C++ input and output are performed in the form of a sequence of bytes or more commonly known as streams. cerr and clog both… Read More
An Array is a collection of items stored at contiguous memory locations. The idea is to store multiple items of the same type together. Vectors… Read More
Given a 2D array, print it in reverse spiral form. We have already discussed Print a given matrix in spiral form. This article discusses how… Read More
Member Function: It is a function that can be declared as members of a class. It is usually declared inside the class definition and works… Read More
Given an array of positive and negative numbers, find if there is a subarray (of size at-least one) with 0 sum. Examples :  Input: {4,… Read More
Switch case statements are a substitute for long if statements that compare a variable to several integral values. The switch statement is a multiway branch… Read More
Prerequisites: lvalue reference rvalue reference Copy Semantics (Copy Constructor) References: In C++ there are two types of references- lvalue reference: An lvalue is an expression… Read More
The lower_bound() method of C++ returns the index of the first element in the array which has a value not less than the key. This… Read More
Incedo Inc. visited our college, SRM Institute of Science and Technology in August’21, and everything was conducted in virtual mode. I applied for the role… Read More
Given an array arr[ ] of size N and an integer p, the task is to find maximum possible value of rightmost element of array… Read More

Start Your Coding Journey Now!