Skip to content

Instantly share code, notes, and snippets.

@katychuang
Last active January 10, 2020 14:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save katychuang/0ab8240132056316737b4ec730ae77a7 to your computer and use it in GitHub Desktop.
Save katychuang/0ab8240132056316737b4ec730ae77a7 to your computer and use it in GitHub Desktop.
CISC 3130 Spring 2020 OER Code Snippets for https://libguides.brooklyn.cuny.edu/cisc3130/
/* 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 {
// 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
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment