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

Sort ExerciseList to display for GUI #103

Closed
Yonggiee opened this issue Mar 27, 2020 · 5 comments
Closed

Sort ExerciseList to display for GUI #103

Yonggiee opened this issue Mar 27, 2020 · 5 comments
Assignees
Labels
priority.High Must do type.Epic A big feature which can be broken down into smaller stories e.g. search
Milestone

Comments

@Yonggiee
Copy link

No description provided.

@Yonggiee Yonggiee added type.Epic A big feature which can be broken down into smaller stories e.g. search priority.High Must do labels Mar 27, 2020
@AaronCQL
Copy link

Proposed idea: use JavaFX's TableView to sort the rows instead.

@AaronCQL AaronCQL added this to the v1.3 milestone Mar 28, 2020
@AaronCQL
Copy link

A custom insertion sort has been written in UniqueExerciseList, under the addToSorted method. This method will do a single pass of the internal list to insert the element at the correct position. This assumes that the internal list is initially sorted (which it should be, since reading from storage will do an initial sort on it).

This custom insertion sort will guarantee an O(n) time complexity to insert the element correctly. This is as efficient as it gets as any insertion will already incur an O(n) time complexity to first check if the internal list contains the exercise to be added.

@Yonggiee
Copy link
Author

R u writing for me ;)

@AaronCQL
Copy link

R u writing for me ;)

Of course

@Yonggiee
Copy link
Author

copied ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority.High Must do type.Epic A big feature which can be broken down into smaller stories e.g. search
Projects
None yet
Development

No branches or pull requests

2 participants