Divide et Impera
Quiz
•
Computers
•
11th Grade - University
•
Practice Problem
•
Easy
+1
Standards-aligned
Marilena Vilciu
Used 5+ times
FREE Resource
Enhance your content in a minute
12 questions
Show all answers
1.
FILL IN THE BLANK QUESTION
30 sec • 1 pt
void suma(int v[], int s, int d){
if( s>d) return ...?...;
else
return suma(v,s, (s+d)/2-1) + v[(s+d)/2]+
suma (v, (s+d)/2 +1, d);
}
Tags
suma
2.
FILL IN THE BLANK QUESTION
45 sec • 1 pt
void suma(int v[], int s, int d){
if( s>d) return 0;
else
return suma(v,s, ...?...) + v[(s+d)/2]+
suma (v, (s+d)/2 +1, d);
}
Tags
suma
3.
FILL IN THE BLANK QUESTION
30 sec • 1 pt
void suma(int v[], int s, int d){
if( s>d) return 0;
else
return suma(v,s, (s+d)/2-1) ...?... v[(s+d)/2]...?...
suma (v, (s+d)/2 +1, d);
}
Tags
suma
4.
FILL IN THE BLANK QUESTION
30 sec • 1 pt
int nr(int v[], int x, int s, int d){
if(...?...) return 0;
else {
int m; m=(s+d)/2;
if ( v[m]==x )
return
1 + nr(v,x,s, m-1) +nr(v, x, m+1,d);
else
nr(v,x,s, m-1) +nr(v, x, m+1,d);
}
}
Tags
numarare
5.
FILL IN THE BLANK QUESTION
30 sec • 1 pt
int nr(int v[], int x, int s, int d){
if(s>d) return 0;
else {
int m; m=(s+d)/2;
if ( v[m]==x )
return ...?... + nr( v, x, s, m-1) +nr (v, x, m+1,d);
else
return nr (v, x, s, m-1) +nr (v, x, m+1,d);
}
}
Tags
numarare
6.
FILL IN THE BLANK QUESTION
30 sec • 1 pt
int nr(int v[], int x, int s, int d){
if(s>d) return 0;
else {
int m; m=(s+d)/2;
if ( v[m]==x )
return 1 + nr(v,x,s,...?...) +nrAp(v, x, m+1,d);
else
return nr(v,x,s,...?...) +nrAp(v, x, m+1,d);
}
}
Tags
numarare
7.
FILL IN THE BLANK QUESTION
1 min • 1 pt
int maxim(int v[], int s, int d){
if (s==d) return ...?...;
else if(s+1==d) if(v[s]>v[d]) return v[s];
else return v[d];
else {
int m1, m2;
m1=maxim(v,s,(s+d)/2);
m2=maxim(v,(s+d)/2+1,d);
if(m1>m2)return m1;
else return m2;
}
}
Tags
maxim
Create a free account and access millions of resources
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
15 questions
Cyber Security KS4
Quiz
•
8th - 12th Grade
15 questions
Excel
Quiz
•
10th - 12th Grade
13 questions
வகுப்பு 12 - அடோப் இன்டிசைன் CC 2019
Quiz
•
12th Grade
9 questions
Structured/Traditional SDM
Quiz
•
University
10 questions
Java: repetition control structure for & while
Quiz
•
10th - 12th Grade
11 questions
Tutorium 1 - Prog2
Quiz
•
University
10 questions
Teoria General de los Sistemas IF1300
Quiz
•
University
10 questions
Java Fundamentals
Quiz
•
12th Grade
Popular Resources on Wayground
10 questions
Forest Self-Management
Lesson
•
1st - 5th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
30 questions
Thanksgiving Trivia
Quiz
•
9th - 12th Grade
30 questions
Thanksgiving Trivia
Quiz
•
6th Grade
11 questions
Would You Rather - Thanksgiving
Lesson
•
KG - 12th Grade
48 questions
The Eagle Way
Quiz
•
6th Grade
10 questions
Identifying equations
Quiz
•
KG - University
10 questions
Thanksgiving
Lesson
•
5th - 7th Grade
Discover more resources for Computers
30 questions
Thanksgiving Trivia
Quiz
•
9th - 12th Grade
11 questions
Would You Rather - Thanksgiving
Lesson
•
KG - 12th Grade
10 questions
Identifying equations
Quiz
•
KG - University
18 questions
Thanksgiving Trivia
Quiz
•
4th - 12th Grade
20 questions
Thanksgiving
Quiz
•
KG - 12th Grade
36 questions
Benchmark 2 Review (LEAP)
Quiz
•
11th Grade
28 questions
Ser vs estar
Quiz
•
9th - 12th Grade
10 questions
hands washing
Quiz
•
5th - 12th Grade
