CoboCards App FAQ & Wishes Feedback
Language: English Language
Sign up for free  Login

This flashcard is just one of a free flashcard set. See all flashcards!

All main topics / Informatik / Algorithmen & Datenstrukturen / ADS
5
Binäre Suche (rekursiv)
static boolean binaer(int [] array, int unter, int oben, int key){
         if (unten > oben){
            return false;
         } else {
                  int mitte = (unten + oben)/2;
                  if(array[mitte]==key){
                      return true;
                   } else if(array[mitte] < key){
                       return binaer(array, mitte +1, oben, key)
                   } else{
                        return binaer (array, unter, mitte - 1, key)
                   }
}
                      
                     
New comment
Flashcard info:
Author: hristiana86
Main topic: Informatik
Topic: Algorithmen & Datenstrukturen
School / Univ.: HS
City: Mannheim
Published: 14.06.2010

Cancel
Email

Password

Login    

Forgot password?
Deutsch  English