MCPcopy Create free account
hub / github.com/Ayush7614/Daily-Coding-DS-ALGO-Practice / solve

Method solve

Codechef/Java/xor_folding.java:33–50  ·  view source on GitHub ↗
(String[] arr,int len,int m)

Source from the content-addressed store, hash-verified

31}
32
33 static int solve(String[] arr,int len,int m) {
34
35 int res=0;
36 for(int i=0;i<len;i++)
37 {
38 for(int j=0;j<m;j++){
39 if(arr[i].charAt(j)=='0')//checking for 0 and 1
40 {
41 res=res^0;
42 }
43 else
44 {
45 res=res^1;}
46 }
47
48 }
49 return res;
50 }
51}
52
53/*

Callers 1

mainMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected