Back it will return the back value
()
| 51 | |
| 52 | // Back it will return the back value |
| 53 | func (lq *LQueue) Back() (any, error) { |
| 54 | if !lq.Empty() { |
| 55 | val := lq.queue.Back().Value |
| 56 | return val, nil |
| 57 | } |
| 58 | |
| 59 | return "", fmt.Errorf("error queue is empty") |
| 60 | } |
| 61 | |
| 62 | // Len it will return the length of list |
| 63 | func (lq *LQueue) Len() int { |