Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Queue data structure #60

Closed
Closed
Assignees
Labels
enhancementNew feature or request
@TheSTL

Description

Need following functions in queue:

File location - Queue

  1. empty() – Returns whether the queue is empty.
  2. size() – Returns the size of the queue.
  3. front() – Function returns a the first element of the queue.
  4. back() – Function returns a the last element of the queue.
  5. push(g) – Function adds the element ‘g’ at the end of the queue.
  6. pop() – Function deletes the first element of the queue.

Example:

Queue q = [1,2,3,4,5,6];
q.empty() false
q.size() 6
q.front() 1
q.back() 6
q.push(10) [1, 2, 3, 4, 5, 6, 10]
q.pop() [2, 3, 4, 5, 6, 10]

Metadata

Metadata

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      AltStyle によって変換されたページ (->オリジナル) /