Comment on Ask HN: What is the most complicated Algorithm you came up with yourself?Comments−vunderba7moThe collapse sort "algorithm". A = [2, 7, 1, 8, 28, 18] sort = A => A.reduce((B, x) => (B[x] = x, B), []).filter(x => x) Nothing says efficiency like a sorting algorithm where Big O is more influenced by the largest element's value rather than the number of elements in the array. /s
Comments
The collapse sort "algorithm".
Nothing says efficiency like a sorting algorithm where Big O is more influenced by the largest element's value rather than the number of elements in the array. /s