Algorithms icon indicating copy to clipboard operation
Algorithms copied to clipboard

A collection of algorithms and data structures

Results 143 Algorithms issues
Sort by recently updated
recently updated
newest added

Quickselect is a selection algorithm to find the kth smallest element in an unsorted list.

1. If I understand the algorithm correctly, since we need to do relaxation n-1 times shouldn't the loop run from i=0; i

The relaxation should be running n-1 times. We don't need to run the algo again n-1 times but only once on each edge to see if the value decreases and...

Signed-off-by: Afshin Paydar Issue https://github.com/williamfiset/Algorithms/issues/314

I have also added some Error Exceptions to be able to track some errors within the "pop()", "push()" and "peek()" methods.

The introduced methods are: set() to change the value of a currently existing node of the Linked List with a desired data at a specified index; and get() to obtain...