Given an array of integers, write a function that returns true if there is a triplet (a, b, c) that satisfies a2+b2=c2 Example: Input: arr[] = {8, 1, 4, 6, 10} Output: Read more →
C++ Programs
155 postsGiven a string find the character which occurs a minimum number of times. Note: If multiple such characters exist output anyone. Example: Input: S = abbccdd Output: a As frequency of every Read more →
Write an efficient C program to find the sum of contiguous subarray within a one-dimensional array of numbers which has the largest sum. Examples: Input : {-2, -3, 4, -1, -2, 1, Read more →
Given a string A, compute the minimum number of characters you need to delete to make resulting string a palindrome. Examples: Input : baca Output : 1 Input : cplusplus Output : Read more →
Given a binary array consisting of only 0s and 1s, find the maximum distance between two elements with value 0 in a subarray {l,r}. Examples: Input : arr = {1,0,0,1}, l=0, r=3 Read more →
C++ is Object-Oriented Programming (OOP) language. C++ is easy to understand. You can learn C++ by following these steps: Writing your program in a text editor. Then saving it with the appropriate Read more →
In C/C++, the fork() function is used to generate a new process known as the child process. We can do searching within a fork() process. Problem statement – Write a program to Read more →
C++ is programming language. It is object-oriented, and generic programming paradigms. C++ is compatible with multiple platforms such as Windows, Linux, Unix, and Mac. Using Online IDE Before starting C++ programming, it Read more →
Given a multi-set of n integers. We have to select exactly k of them in a such way that the difference between any two of them is divisible by m, if it Read more →
Given an array of n elements and we have to find the standard deviation of numbers. Examples: Input : arr[] = {9, 2, 5, 4, 12, 7, 8, 11, 9, 3, 7, Read more →