-
Notifications
You must be signed in to change notification settings - Fork 272
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
Comparing Data Structures #401
Comments
It would to good to discuss, how to show this comparison? A document? And all the metrics that can be used to compare data structures. Some initial metrics (CRUD):
|
I was wondering if we can compare the common methods of two data structures or algorithms. Technically, what I mean is that comparing two APIs which perform the same function. Say, for example if we want to compare two trees, AVL Tree and Red Black Tree, then there are two classes in Say there is a class, Let me know what you think. |
Yes that's very accurate. I do have few more points that we can talk about:
Thoughts on this? |
Agreed. In fact that would help in making the APIs consistent.
We can discuss and document the design here in this thread. We can edit the original post with the final design.
Yes. We can show that in JSON format for each data structure. For two arguments the comparison would be more detailed (ratios, which one is how much percent better than the other, etc.) and for multiple ones, we can just sort the data structures with respect to the time and space of each common method. For example if there are 3 common methods between ds1, ds2 and ds3 then, we would receive, 3 x 2 orders for each common method's time and space. Anyways, this is just speculation, once we start implementing it the output format will become more clear.
Agreed. |
Hi, In order to compare data structures, it is essential to give the features or functions which are not in one of the data structures. I think that we can compare the data structures on the basic operations such as insertion, deletion, traversing to get element at a position and extra operations that can be done by one data structure which other can't with the same dataset with its time and space. Any suggestions or thoughts on this? |
I think comparison should be done for the set of operations which are common to both the data structures. If nothing is common then an empty JSON output along with a warning that no operation is common between the desired data structures. |
Description of the problem
Feature Request: As there are multiple data structures available to solve a particular problem, this feature allows one to choose the most optimized data structure for a particular problem.
Example of the problem
Array vs Stack
References/Other comments
The example given here is very generic and basic, there can be multiple metrics to compare data structures.
The text was updated successfully, but these errors were encountered: