Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
dirkkul opened this issue May 13, 2022 · 0 comments

Comments

@dirkkul
Copy link
Contributor

dirkkul commented May 13, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant