dsa

Data Structures & Algorithms - Spring 2018
Log | Files | Refs | README

Main.java (585B)


      1 package lab4;
      2 
      3 public class Main {
      4 
      5     public static void main(String[] args) {
      6         ListCDLSBased list = new ListCDLSBased();
      7 
      8         list.add(0, 1);
      9         System.out.println(list.get(0));
     10         list.add(1,5);
     11         System.out.println(list.get(1));
     12         list.add(2,7);
     13         System.out.println(list.get(2));
     14         list.add(3,10);
     15         System.out.println(list.get(3));
     16         list.add(4,20);
     17         System.out.println(list.get(4));
     18         list.add(5, 30);
     19         System.out.println(list.get(5));
     20 
     21 
     22         System.out.println();
     23         list.remove(3);
     24     }
     25 }