Advertisement
cwchen

[Go][excerpt] List class

Nov 21st, 2017
498
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Go 0.22 KB | None | 0 0
  1. // Excerpt
  2. // List holds the internal structure of a doubly-linked list
  3. type List struct {
  4.     head *node
  5.     tail *node
  6. }
  7.  
  8. // Internal struct as a node
  9. type node struct {
  10.     data interface{}
  11.     next *node
  12.     prev *node
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement