    {
     "cell_type": "markdown",
     "metadata": {},
     "source": [
      "## Clarifying Questions\n",
      "\n",
      "* Is this a singly or doubly linked list?\n",
      "    * Singly\n",
      "* Is this a circular list?\n",
      "    * No\n",
 
</s> remove     "* [Clarifying Questions](#Clarifying-Questions)\n",
 </s> add     "* [Constraints and Assumptions](#Constraints-and-Assumptions)\n", </s> remove     "* [Code](#Code)"
 </s> add     "* [Code](#Code)\n",
    "* [Unit Test](#Unit-Test)" </s> remove     "            curr_node = curr_node.next"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "%run linked_list.py"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "# Test insert_to_front\n",
    "# Insert in an empty list\n",
    "linked_list = LinkedList(None)\n",
    "linked_list.insert_to_front(10)\n",
    "linked_list.print_list()\n",
    "# Insert a NULL\n",
    "linked_list.insert_to_front(None)\n",
    "linked_list.print_list()\n",
    "# Insert in a list with one element or more elements\n",
    "linked_list.insert_to_front('a')\n",
    "linked_list.insert_to_front('bc')\n",
    "linked_list.print_list()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "# Test append\n",
    "# Insert in an empty list\n",
    "linked_list = LinkedList(None)\n",
    "linked_list.append(10)\n",
    "linked_list.print_list()\n",
    "# Insert a NULL\n",
    "linked_list.append(None)\n",
    "linked_list.print_list()\n",
    "# Insert in a list with one element or more elements\n",
    "linked_list.append('a')\n",
    "linked_list.append('bc')\n",
    "linked_list.print_list()"
 </s> add     "            curr_node = curr_node.next\n",
    "\n",
    "    def get_all_data(self):\n",
    "        data = []\n",
    "        curr_node = self.head\n",
    "        while curr_node is not None:\n",
    "            data.append(curr_node.data)\n",
    "            curr_node = curr_node.next\n",
    "        return data" </s> remove    "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
 </s> add    "cell_type": "markdown",
   "metadata": {}, </s> remove    "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
 </s> add    "cell_type": "markdown",
   "metadata": {},
    "## Constraints and Assumptions\n",
    "\n",
    "*Problem statements are often intentionally ambiguous.  Identifying constraints and stating assumptions can help to ensure you code the intended solution.*\n",
    {
     "cell_type": "markdown",
     "metadata": {},
     "source": [
    "## Constraints and Assumptions\n",
    "\n",
    "*Problem statements are often intentionally ambiguous.  Identifying constraints and stating assumptions can help to ensure you code the intended solution.*\n",
      "\n",
      "* Is this a singly or doubly linked list?\n",
      "    * Singly\n",
      "* Is this a circular list?\n",
      "    * No\n",
keep keep keep keep replace keep keep keep keep keep
 Reworked notebook: Added more detail to constraints and test cases.  Reworked algorithm discussion, code, and unit test. 
linked-lists/linked-list.ipynb