Product
Introducing License Enforcement in Socket
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
github.com/shreya901/golang-doubly-linked-list
Node
have the following fields and functions:
Val
: the node's value (we will use interface{}
).Next()
: pointer to the next node.Prev()
: pointer to the previous node.First()
: pointer to the first node (head).Last()
: pointer to the last node (tail).List
have the following fields and functions:
NewList(args ...interface{}) *List
: creates a new linked list preserving the order of the values.First()
: pointer to the first node (head).Last()
: pointer to the last node (tail).PushBack(v interface{})
: insert value at back.PopBack() (interface{}, error)
: remove value at back.PushFront(v interface{})
: insert value at front.PopFront() (interface{}, error)
: remove value at front.Reverse()
: reverse the linked list.To run the tests run the command go test
from within the exercise directory.
If the test suite contains benchmarks, you can run these with the --bench
and --benchmem
flags:
go test -v --bench . --benchmem
FAQs
Unknown package
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
Product
We're launching a new set of license analysis and compliance features for analyzing, managing, and complying with licenses across a range of supported languages and ecosystems.
Product
We're excited to introduce Socket Optimize, a powerful CLI command to secure open source dependencies with tested, optimized package overrides.