
Divide et Impera
Authored by Marilena Vilciu
Computers
11th Grade - University
suma covered
Used 5+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
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
Access all questions and much more by creating a free account
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
10 questions
CodeMonkey for B.Ed IT
Quiz
•
University
10 questions
Microsoft Word 3ºB
Quiz
•
12th Grade
15 questions
Vocabulary of Computer
Quiz
•
12th Grade
10 questions
Bài 25 tin 10
Quiz
•
9th Grade - University
12 questions
Tin học 2
Quiz
•
11th Grade
10 questions
Understanding Email, Contacts and Calendaring
Quiz
•
University
10 questions
Intro to Windows Server 2012
Quiz
•
12th Grade
10 questions
Tree and Planar Graph
Quiz
•
University
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
54 questions
Analyzing Line Graphs & Tables
Quiz
•
4th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade