Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int busca_b (int v[], aluno chave.ra, int de, int ate) {
- int meio, media;
- if (de>ate){
- return -1;
- }
- meio = de + (ate - de)/2;
- if(v[meio]==chave){
- return meio;
- }
- if(chave < v[meio]){
- return busca-b (v,chave,meio+1,ate);
- }
- else{
- return busca-b(v,chave,meio+1,ate);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement