queue

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 24, 2026 License: BSD-3-Clause Imports: 0 Imported by: 0

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Q

type Q struct {
	// contains filtered or unexported fields
}
Example
package main

import (
	"fmt"

	"github.com/skhal/lab/iq/39/queue"
)

func main() {
	q := queue.New(1, 2, 3)
	for !q.Empty() {
		n, ok := q.Front()
		if !ok {
			break
		}
		fmt.Println(n)
		q.Pop()
	}
}
Output:
1
2
3

func New

func New(nn ...int) *Q

func (*Q) Empty

func (q *Q) Empty() bool

func (*Q) Front

func (q *Q) Front() (int, bool)

func (*Q) Pop

func (q *Q) Pop()

func (*Q) Push

func (q *Q) Push(n int)

func (*Q) Size

func (q *Q) Size() int

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL