I would like to implement selection sort using LinkedList in Java. I know how to do it with ArrayList, please don’t comment that I should use it instead. I am interested in demonstrating the advantages (fast insertion and removal) and disadvantages of linked lists compared to arrays. I know how to do this in C where I have pointers and
Tag: selection-sort
Why isn’t my selection sort program working?
I am trying to create my own program to do selection sort on an array of integers. I have come up with the following program, which works on some arrays, but not on others, such as this one. I have been trying to trace the problem, and I think it might have to do with where I am placing the
Create an algorithm that arranges them in order to form the largest possible integer
I am struggling with this coding problem in Java. It has to be solved using an algorithm. It is supposed to give me the largest possible inter that can be formed with the numbers in the array: {10, 7, 76, 415}. I tried to solve it using selection sort. So far I have is this code below but it’s giving