What do you want to save?
Add Code snippet
New code examples
-
C++ 2022-03-15 06:55:06
segment tree complexity
// C++ program to show segment tree operations like construction, query // and update #include <bits/stdc++.h> using namespace std; // A utility function to get the middle index from corner indexes. int getMid(int s, int e) { return s + (e -s)... Add solution -
Other 2022-03-07 23:25:02
clang: error: linker command failed with exit code 1 (use -v to see invocation)
This happened to me simply because one function type did not match when called recursively. I know there are other types of faults that might cause it. But this is what happened to me. Notice the Delete_Aux(t->left, item) recursive function calling.... Add solution -
C++ 2022-03-03 05:00:01
how to find hcf in c++
// C++ program to find GCD of two numbers #include <iostream> using namespace std; // Recursive function to return gcd of a and b int gcd(int a, int b) { if (b == 0) return a; return gcd(b, a % b); } // Driver program to test above ... Add solution -
C++ 2022-02-11 18:05:34
show a 2d vector in c++
// A recursive function able to print a vector // of an arbitrary amount of dimensions. template<typename T> static void show(T vec) { std::cout << vec; } template<typename T> static void show(std::vector<T> vec) { int size =... Add solution -
Lisp 2022-01-29 07:37:42
Write a function that computes the sum of all proper divisors of a given number lisp
(defun proper-divisors-recursive (product &optional (results '(1))) "(int,list)->list::Function to find all proper divisors of a +ve integer." (defun smallest-divisor (x) "int->int::Find the smallest divisor of an i... Add solution -
C++ 2022-01-24 03:50:27
how to compare the biggest node with the same level BST node c++
// C++ program to find largest // value on each level of binary tree. #include <bits/stdc++.h> using namespace std; /* A binary tree node has data, pointer to left child and a pointer to right child */ struct Node { int val; struct Node *left, *r... Add solution -
-
C++ 2021-11-21 23:47:13
show a vector in c++
// A recursive function able to print a vector // of an arbitrary amount of dimensions. template<typename T> static void show(T vec) { std::cout << vec; } template<typename T> static void show(std::vector<T> vec) { int size =... Add solution -
VBA 2021-11-18 01:12:19
xl-vba how to return result from a function
'In VBA, you assign the return value to the name of the function. 'This is different from many languages that use the 'return' keyword: Function Yesterday() As Date Yesterday = Date() - 1 End Function 'VBA functions can be called from other VBA code: ... Add solution