Changed Queue and Stack to LinkedList