Skip to content

Category Archives: C++ Programs

Given a 2-D matrix, find the element having maximum value using multi-threading. Prerequisite : Multithreading Examples : Input : {{1, 5, 3, 6}, {22, 10,… Read More
Fast inverse square root is an algorithm that estimates , the reciprocal (or multiplicative inverse) of the square root of a 32-bit floating-point number x in… Read More
Given a triangular structure of numbers, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the… Read More
Given a text txt[0..n-1] and a pattern pat[0..m-1], write a function that prints all occurrences of pat[] in txt[]. You may assume that n >… Read More
We are given an array of elements and we have to check the whether each element is even or not.  Examples: Input : [2, 4,… Read More
Given a password entered by the user, check its strength and suggest some password if it is not strong. Criteria for strong password is as… Read More
We are given an integer n and n-th term in a series as expressed below:   Tn = n2 - (n-1)2 We need to find Sn… Read More
Festival of Holi is around the corner and to all the coding geeks around there, let it be more than just a holiday and learn… Read More
In our previous post on fibonacci series, we have seen many approaches to generate fibonacci numbers. In this approach, we shall be generating fibonacci numbers… Read More
Given a file and a line number n, the task is to delete nth line from the given text file. Suppose the initial content of… Read More
Given a number, check if it is a perfect square or not.  Examples :  Input : 2500 Output : Yes Explanation: 2500 is a perfect… Read More
This valentine, gift your loved ones a heart with a message written within it to express what you feel about them. Don’t miss the moment… Read More
In hashing there is a hash function that maps keys to some values. But these hashing function may lead to collision that is two or… Read More
Given the number of rows and columns, print the corresponding swastika pattern using loops.  Note: The number of rows and columns should be the same… Read More
Given an IP Address and task is to change the IP address equivalent the hexadecimal value. Examples: Input : 127.0.0.1 Output : 0x7f000001 Input :… Read More

Start Your Coding Journey Now!