#include "linkedlist.h"
#include "node.h"
#include <iostream>
#include <vector>

using namespace std;

void test2(){
  LinkedList l;

  // add some numbers to the linked list
  for( int i = 0; i < 10; i++ ){
    l.addFirst(i);
  }

  // create another linked list
  LinkedList l2 = l;

  // set the value at index 5 to 100 for l
  l.set(5, 100);

  // empty and print out l
  cout << "L:";

  while( !l.isEmpty() ){
    cout << " " << l.removeFirst();
  }

  cout << endl;

  // empty and print out l2
  cout << "L2:";

  while( !l2.isEmpty() ){
    cout << " " << l2.removeFirst();
  }

  cout << endl;
}

int main(){
  test2();

  return 0;
}
