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
16
Listen/Implementierung
public void removeLast(){
      if (erstes == null){
         throw new Exception;
      } else if (erstes.naechst.naechst == null){
         erstes =null;
      } else {
          ListElem e = erstes;
          while (e.naechst != null){
                 e = e.naechst;
          }
          e.naechst = null;
}


public void removeFirst(){
      if (erstes == null){
          Exception;
      }else if (erstes.naechst == null){
          erstes = null;
      } else {
           erstes = erstes.naechst;
      }
}
--
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