-
-
Notifications
You must be signed in to change notification settings - Fork 100
Add Binary Search Tree exercise #54
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Binary Search Tree specification doesn't have a canonical-data.json. In fact, there's a PR to include it.
We should follow Exercism precedence and wait until the json cases are implemented.
Given comments in exercism/problem-specifications#555 (comment) I think we should figure out how to order this. It's a complicated problem compared to the rest. I think we will need more exercises that can build up to this. I'm fine with adding it, but we probably should be mindful of the varying difficulties and balance them out as much as we can. |
@Stargator I've made a PR for adding the required canonical data but it's still open and needs opinions. I'd keep this PR open until that one is resolved. And then reorder the tests accordingly. Apart from tests I'd like your review on the implementation. It's been a hectic week, it's Diwali season in India. Diwali is in 4 days there's all sorts of preparations pending. So my contributions will be slow this week. |
No worries. Thanks. |
@Stargator Will start working on this one as soon as i get more time , this probably only needs updating tests, maybe a few changes in the example.dart and until config.json changes are figured out for this one. It'll probably be on standby. |
@Stargator @devkabiir does it make more sense to do other exercises first that involved data structures but are less complicated than binary trees? Are there available exercises to implement that deal with like... Maps or Lists? |
@jvarness Probably, we may even already have some that could use List in the solution. But we haven't looked at specific ones that deal with those types explicitly in the problem. Also, most of the proposed exercise implementations are not from some high-level plan, it's just whatever each person decided to spend time on. We could hold off on the binary tree implementations until we add a few more exercises that may make t easier for newcomers. We just have't had that discussion, yet. This PR could serve well in that regard. If interested, this repo contains all the specifications for current exercises that can be applied to any track. Each exercise should have a defined specification before a track implements it. |
This probably needs a full re-write (tests and example) as per updated canonical-json and all other major changes, I'll work on this probably next weekend. |
beadb73
to
5cb44c4
Compare
Rewrote it compliant with the new canonical-data.json. I left config.json untouched on purpose. We should discuss the that. |
62cd7da
to
5b77aa5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Congratz @devkabiir It's been a long road for you on this!
For config.json
:
{
"slug": "binary-search-tree",
"uuid": "597f86bc-6717-4a4c-a2c6-58241ac3d6cb",
"core": true,
"unlocked_by": null,
"difficulty": 5,
"topics": [
"inheritance",
"classes",
"trees", "algorithms", "logic", "searching", "object_oriented_programming"
]
}
@jvarness @devkabiir Note the topics, these are just what I choose from a look at the TOPICS.txt file. Feel free to discuss and bring up your own.
5b77aa5
to
41aad19
Compare
Signed-off-by: devkabiir <[email protected]>
41aad19
to
860fadc
Compare
Need a little help here, Running |
Made a few notable changes:
I wanted to use |
@devkabiir From the root directory of the repo, I ran And this is the response I got: I was using Dart 2.0, but 1.24.3 should work too. Though, Dart 1.24.3 didn't give me a response, must be due to differences in the SDK. To answer your question, the issue seems to be that |
Hey @devkabiir do you think you can complete this by April 30th? That's the deadline for the New Batch of Exercises milestone |
Closed in #187 |
This exercise:
I left the config.json untouched on purpose.