Timeline for Solidity - Is it possible to sort an Array of Structs? - UnimplementedFeatureError
Current License: CC BY-SA 4.0
6 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Nov 28, 2018 at 21:23 | comment | added | Felix Dolderer | True! I don't even know why I put it there in the first place. It should work fine without the -1. I edited the response accordingly | |
Nov 28, 2018 at 21:22 | history | edited | Felix Dolderer | CC BY-SA 4.0 |
change line: var lengthSortedArray = sortedArray.length;
|
Nov 28, 2018 at 18:20 | comment | added | Matt Lovan |
cheers, thanks! I think this line: var lengthSortedArray = sortedArray.length - 1; needs to be changed to this to prevent underflow: var lengthSortedArray = sortedArray.length ;
|
|
Nov 28, 2018 at 17:14 | history | edited | Felix Dolderer | CC BY-SA 4.0 |
I added comments for people who are interested in the topic but don't know sorting algorithms. And removed an unnecessary step.
|
Nov 28, 2018 at 17:03 | vote | accept | Matt Lovan | ||
Nov 28, 2018 at 16:29 | history | answered | Felix Dolderer | CC BY-SA 4.0 |