What do you want to save?
Add Code snippet
New code examples
-
Other 2022-02-03 02:15:48
algorithm to fing the rank of the matrix
const double EPS = 1E-9; int compute_rank(vector<vector<double>> A) { int n = A.size(); int m = A[0].size(); int rank = 0; vector<bool> row_selected(n, false); for (int i = 0; i < m; ++i) { int j; ... Add solution -
C++ 2022-02-02 22:01:36
distinct char string c++
#include<stdio.h> #include<string.h> // function to return the number of unique // characters in str[] int count_unique_char(char* str) { int hash[128] = { 0 }; int i, c = 0; // reading each character of str[] for (i = 0; i < strlen(... Add solution -
Java 2022-02-02 21:50:47
converting temperature from fahrenheit to celsius
import java.util.Scanner; public class Main { public static void main(String args[]) { Scanner sc = new Scanner(System.in); int far = sc.nextInt(); int cel = (far - 32) * 5/9; System.out.printf("%d Fahrenheit is ... Add solution -
Java 2022-02-02 19:42:29
android studio find all views in layout
LinearLayout rootLinearLayout = (LinearLayout) findViewById(R.id.rootLinearLayout); int count = rootLinearLayout.getChildCount(); for (int i = 0; i < count; i++) { View v = rootLinearLayout.getChildAt(i); if (v instanceof LinearLayout) { ... Add solution -
C++ 2022-02-02 17:45:33
array declaration c++
#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
Gabi Purcaru
+5
L. Samson
+5
Yoyo
+5
Mladenka
+5
Skry
+5
Pooria Han
+5
Colocvial
+5
Gouri
+5
Sarah witte
+5
Leosar
+5
Tobiak777
+5
Tjd
+5