Skip to content

Tree traversal: Julia implementation deprecated #841

Closed
@stormofice

Description

@stormofice

Bug Report

Description

The Julia implementation of the tree traversal chapter relies upon the DataCollections.jl package.
Since version v0.17.7 front() and top() were deprecated or removed entirely resulting in the example not working if you have the newest (default) version installed.

Error:

┌ Warning: `top` is deprecated, use `first` instead.
│   caller = DFS_stack(::Node) at Tree.jl:50
└ @ Main ~/algorithm-archive/contents/tree_traversal/code/julia/Tree.jl:50
ERROR: LoadError: UndefVarError: front not defined

Steps to Reproduce

Steps to reproduce the behavior:

  1. Install Julia and the Data Structures package (with version >= 0.17.7, newest is the default)
  2. Try to run the example
  3. See error

Expected behavior

The example working without explicitly using an older package version.
Will be fixed by #842.

Environment

  • OS: Ubuntu
  • OS Version: 20.04
  • Julia Version: 1.4.1

Additional context

This can be easily fixed by changing front() and top() to first().

For Algorithm Archive Developers

  • The bug can be reproduced
  • The bug can be fixed (if not, please explain why not in a comment below)
  • There is a timeline to fix the bug
  • The bug has been fixed (Please link the PR)

Metadata

Metadata

Assignees

No one assigned

    Labels

    ProblemThis is a problem in the archive or an implementation.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions