Posts by Abhishek Sharma

Author Biographical Info: Not available

Convert a map to a vector in C++

By Abhishek Sharma

This is a tutorial on how to convert a map to a vector in C++. Maps are used to store key-value pairs in an ordered way. And so, to store these we need a vector of paired values. S.... Read More

How to clear/empty priority_queue of objects in C++

By Abhishek Sharma

In this tutorial, I will show you how you can clear/empty priority_queue of objects in C++. Since there is no inbuilt function in priority_queue to clear/empty it, thus we will see.... Read More

Rearrange array such that elements at even positions are greater than odd in C++

By Abhishek Sharma

Hello there! In this tutorial, we will rearrange elements of an array such that elements at even positions are greater than odd positions. e.g. int arr[]={15,12,13,18,5,9}; // for .... Read More