.. This file is part of the OpenDSA eTextbook project. See
.. http://opendsa.org for more details.
.. Copyright (c) 2012-2020 by the OpenDSA Project Contributors, and
.. distributed under an MIT open source license.

.. avmetadata::
   :title: Link Nodes Exercises
   :author: Cliff Shaffer, Mostafa Mohammed, and Margaret Ellis
   :institution: Virginia Tech
   :requires: Pointer intro
   :satisfies:
   :topic: Link Nodes
   :keyword: Pointer; Link Node
   :naturallanguage: en
   :programminglanguage: Java
   :description: Coding exercises for practicing manipulating linked lists.


Link Nodes Practice Exercises
=============================

createList
----------

.. extrtoolembed:: 'createList'
   :workout_id: 428



One can easily write a loop to iterate through all the Links on a
chain, without needing to know how many there actually are.

.. inlineav:: linkNodes3CON ss
   :links: AV/Pointers/linkNodes3CON.css
   :scripts: AV/Pointers/linkNodes3CON.js
   :output: show
   :keyword: Pointers; Link Nodes


iterateOverList
---------------

.. extrtoolembed:: 'iterateOverList'
   :workout_id: 426



One can remove a Link from a chain.

.. inlineav:: linkNodes4CON ss
   :links: AV/Pointers/linkNodes4CON.css
   :scripts: AV/Pointers/linkNodes4CON.js
   :output: show
   :keyword: Pointers; Link Nodes


changePointeeNext1
------------------

.. extrtoolembed:: 'changePointeeNext1'
   :workout_id: 424




Finally, we can also insert new Links.

.. inlineav:: linkNodes5CON ss
   :links: AV/Pointers/linkNodes5CON.css
   :scripts: AV/Pointers/linkNodes5CON.js
   :output: show
   :keyword: Pointers; Link Nodes


addNodeAtHead
-------------

.. extrtoolembed:: 'addNodeAtHead'
   :workout_id: 429



