Posts by Sakshi Gupta

Author Biographical Info: Not available

Find maximum k elements from given elements in C++

By Sakshi Gupta

In this tutorial, we will learn how to find maximum k elements from given elements in C++. This is a really tricky one and below is an interesting solution based on heaps. For exam.... Read More

To compare two strings in C++

By Sakshi Gupta

In this tutorial, we will learn how to compare two strings in C++. We will check whether they are equal or not. For example- str1=”codespeedy” str2=”codespeedy.... Read More

Sort a linked list using recursion in C++

By Sakshi Gupta

In this tutorial, we will learn how to sort a linked list in C++ using recursion. A Linked list is a data structure. It is made up of nodes that are created using self-referential .... Read More

Count the number of words in a string in C++

By Sakshi Gupta

In this tutorial, we will learn how to count the number of words in a string in C++. There can be various ways to do this. The following is a simple one. Given a string, words can .... Read More

In-place rotation of a matrix by 90 degrees in C++

By Sakshi Gupta

In this tutorial, we will learn In-place rotation of a matrix by 90 degrees in c++. There are many ways to do it. We will be learning in-place rotation in this article. In-place ro.... Read More

Delete the middle element of a stack in C++

By Sakshi Gupta

In this tutorial, we will learn how to delete the middle element of a stack in C++. We can use the STL (Standard template library) stack and have to delete the middle element. This.... Read More

Postfix to Prefix Conversion in C++

By Sakshi Gupta

In this tutorial, we will learn Postfix to Prefix Conversion in C++. Postfix: If the operator appears in the expression after the operands, then it is called a postfix expression. .... Read More

Merge 3 arrays in sorted order in C++

By Sakshi Gupta

In this tutorial, we will learn how to merge 3 arrays in sorted order in C++. Below is an interesting solution based on min-heap implemented by using a priority queue. For example-.... Read More