JuliaCollections / JuliaCollections/DataStructures.jl

Implement constructor for Deque from iterable

Open
#735 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Julia
Stars
745
Forks
261
PR merge metrics
No merged PRs in 30d

Description

At present a Deque (and Stack/Queue) can only be created empty.

A constructor method should be added to enable the creation of a Deque from an iterable such as an array.
At present Deque([1,2,3]) errors.

A few issues to discuss

  • What Deque Block Size to choose by default when given an array/iterable?
  • Should a user be able to pass both an array and a blocksize? (at the moment Deque(x::Int) creates an empty Deque with block size of x). We could add a Deque(array,blocksize) method or similar to allow specification.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by inspecting the existing Deque constructor, especially the Deque(x::Int) form, and the related Stack and Queue constructors. Determine the default block size and whether an iterable may be combined with an explicit block size; done means iterable-based construction works for Deque and the related types with documented, tested behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
data
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.