Skip to content

Instantly share code, notes, and snippets.

@katychuang
Last active January 10, 2020 14:56
Show Gist options
  • Save katychuang/0ab8240132056316737b4ec730ae77a7 to your computer and use it in GitHub Desktop.
Save katychuang/0ab8240132056316737b4ec730ae77a7 to your computer and use it in GitHub Desktop.

Revisions

  1. katychuang renamed this gist Jan 10, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion LinkedListStructure.java → LinkedList.java
    Original file line number Diff line number Diff line change
    @@ -11,7 +11,7 @@ public Node(int i) { /* blank for now */ }
    public void displayLink() { /* blank for now */ }
    }

    class LinkedListStructure {
    class LinkedList {
    // uses Node class
    private Node first; // private link to the first element
    public void LinkedList(){} // constructor sets first to null
  2. katychuang renamed this gist Jan 10, 2020. 1 changed file with 3 additions and 2 deletions.
    5 changes: 3 additions & 2 deletions LinkedList.java → LinkedListStructure.java
    Original file line number Diff line number Diff line change
    @@ -11,8 +11,9 @@ public Node(int i) { /* blank for now */ }
    public void displayLink() { /* blank for now */ }
    }

    class LinkedList {
    private Node first; // private link to the first element
    class LinkedListStructure {
    // uses Node class
    private Node first; // private link to the first element
    public void LinkedList(){} // constructor sets first to null
    public boolean isEmpty(){} // returns true if list is empty
    }
  3. katychuang renamed this gist Jan 10, 2020. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  4. katychuang created this gist Jan 10, 2020.
    18 changes: 18 additions & 0 deletions linked_list0.java
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,18 @@
    /* Linked List (empty), shows structure of classes and initial members */

    class Node {
    public int value;
    public Node next;

    // Constructor
    public Node(int i) { /* blank for now */ }

    // Method
    public void displayLink() { /* blank for now */ }
    }

    class LinkedList {
    private Node first; // private link to the first element
    public void LinkedList(){} // constructor sets first to null
    public boolean isEmpty(){} // returns true if list is empty
    }