Today we will read on this page -Policemen catch thieves in C ++, we are given an array of n elements. Each element of the array has a policeman or a thief, a thief can be caught by a cop and we have to find the maximum number of thieves who can be caught by ..
Category : C & C ++ Interview Q&A
Today we will read on this page – polar () function for complex numbers in C ++ The polar () function is defined in a complex header file in c ++. It takes the magnitude and phase angle of a complex number and generates a complex number using these values. Syntax polar(mag, phase); Example #include<iostream> ..
Today we will read on this page – point to the next higher value node in a linked list with an arbitrary pointer in C ++ To solve this problem, we will use the merge sort algorithm to sort the elements and use the sort as a linked list for arbitrary pointer. For this we ..
We will read this article on syntax and examples of C ++ STL of std :: count_if () function. What is std :: count_if ()? The std :: count_if () function is an inbuilt function in C ++ STL, defined in the <algorithm> header file. count_if () is used to get the number of elements ..
Today we will read on this page Remove duplicate characters from a string in c ++ We will learn this in two ways. The first is simple and uses a brute force approach (simply using a temporal array). And the other is by using a set from STL. The latter has less time complexity than ..
Today we will read on this page how to solve string problem – strong password in C ++ program? If the password is AiTechtonic. It is then easy to note that the password is longer than 6, but does not contain any special characters. Nor does it contain any digits. So the minimum character required ..
Today we will read on this page how to calculate the number of Nice Subareas in a C ++ program? If we have an array of integer numbers and the integer k. If there is a contemporary number then it is known as odd numbers. We have to find the number of good sub-arrays. So ..
Today we will read on this page how to remove Interval in C ++ Program. If we have a sorted list of unsatisfied intervals, each interval interval [i] = [a, b] represents a set of numbers x such that <= x <b. We must remove the intersections between the interval and any interval in the ..
Today we will read on this page how to do Iterator for combining in C ++ program? If we have to design an Iterator class, which includes some operations – Define a constructor that takes the combination of a string character of individual lowercase letters sorted and a number as a parameter. Further define a ..
Today we will read on this page how to remove the gaps covered in C ++ programs? If we have a list of intervals, we must remove all the intervals covered by another interval in the list. Here the interval [A, B) is covered by the interval [C, D) if and only if C <= ..