What do you want to save?
Add Code snippet
New code examples
-
C++ 2021-11-10 14:30:20
How to find the suarray with maximum sum using divide and conquer
#include <stdio.h> #include <limits.h> // Utility function to find maximum of two numbers int max(int x, int y) { return (x > y) ? x : y; } // Function to find maximum subarray sum using divide and conq... Add solution -
C++ 2021-11-10 13:42:29
how to find the mode of a vector c++
//copied from GeeksForGeeks #include <bits/stdc++.h> using namespace std; // Function that sort input array a[] and // calculate mode and median using counting // sort. void printMode(int a[], int n) { int b[n]; int max = *max_el... Add solution -
TypeScript 2021-10-18 06:57:10
number of elements in c++ array
#include <iostream> using std::cout; int a[] = { 1, 2, 3, 4, 5 }; int counta() { return sizeof( a ) / sizeof( a[ 0 ] ); // works, since a[] is an array } int countb( int b[] ) { return sizeof( b ) / sizeof( b[ 0 ] ); // fails, since b[... Add solution
Best helpers
Ranking is empty