Tree Builder: Exercise requires sorting of results, but this is not mentioned in the description

Open
#2,037 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Documentation
Clarity
Mostly clear
Activity status
Stale
Tech stack
go

Research direction

Start by reviewing the Tree Builder exercise description and the linked Go merge request, then determine whether the specification should require ordered children or whether track tests should ignore order. Done means the chosen behavior is agreed and applied consistently to the description or affected tests.

Written by the indexing model from the issue text.

Description

Hi, I was send here after creating a MR in the go repository.

Currently the tests of the tree builder exercise assume an order of a node's children, however the description does not specify anything about the order.

Example:
Build for test case "three nodes in order" returned 0:[2:[] 1:[]] but was expected to return 0:[1:[] 2:[]].

I think this could be solved in two ways:

  • Adding the requirement of sorting the results to the description
  • Make the tests agnostic to the order (for example by sorting actual and expected nodes in the tests before comparing them). However (afaik) this would require adapting the tests in each track, eg what I've done in the linked MR for go.

I'm happy to expand the description if this is the preferred solution, just let me know.

Dominant language
Ruby
Stars
362
Forks
566
Avg merge
15h 13m
Merged PRs (30d)
8

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

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.

More from exercism/problem-specifications

All issues in exercism/problem-specifications

Similar issues

More Ruby issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.