© 2023 Hashnode
#sorting
This article is all about writing a sortable table with reusable software modules in Stimulus and the Ruby on Rails backend too. The result and its limitations We will pass a certain sort key via a q…
When sorting an array, if you are like me the first thing that comes to mind is sort(). An hour before writing this, I was having a great Sunday and decided to do some of the easy katas in codewars. O…
Photo credit to Chrissy Jarvis on Unsplash Algorithm Determine the value range of input values and create a count array of zeros of size equal to the range, as well as an output array of equal size …
A common feature in apps is to allow users to sort a list of items based on various criteria such as name, date, or size. While SwiftUI provides built-in support for sorting by a single property, impl…
Heap sort is a sorting algorithm that uses a binary heap data structure to sort an array or a list of elements. In heap sort, the input array is first converted into a binary heap, and then the maximu…
Merge sort is a popular sorting algorithm that uses the divide-and-conquer approach to sort an array or a list of elements. In merge sort, the input array is divided into two halves, sorted recursivel…
Quicksort is a popular and efficient sorting algorithm that uses a divide-and-conquer approach to sort an array. Quicksort is a divide-and-conquer algorithm that works by dividing an unsorted array in…
Insertion sort is a simple sorting algorithm that builds the final sorted array one item at a time. It works by repeatedly taking an element from the unsorted portion of the array and inserting it int…
Bubble sort is a simple sorting algorithm to understand. It works by repeatedly swapping adjacent elements if they are in the wrong order. It starts at the beginning of the array and compares each pai…
Sorting is a fundamental operation in computer science and is used in various real-world applications. One of the popular sorting algorithms is Merge Sort, which is efficient and easy to implement. In…