Manas Upadhyaymanasupadhyay.hashnode.dev·Nov 23, 2023All sorting algorithms ( detailed explanation )Introduction In this article, we are going to deep dive into the sorting algorithms. Sorting algos as the name suggests are used to sort arrays. There are mainly 7 types of sorting algorithms: Selection sort Bubble sort Insertion sort Merge sort ...Discuss·10 likes·46 readsDSAsorting algorithms
Hari Krishna Anemharikrishna.hashnode.dev·Sep 19, 2023Find the second largest number in a arrayfunction findSecondLargest(arr) { // Sort the array in descending order arr.sort(function(a, b) { return b - a; }); // Return the element at index 1 (the second largest) return arr[1]; } // Example usage const numbers = [10, 5, 8, 20,...Discussarray
Grace Oluwaseguntechylawyer.hashnode.dev·Jun 5, 2023How to Sort Arrays in JavaScriptIntroduction JavaScript is the language of the web and is employed in over 90% of websites, along with HTML (Hyper Text Markup Language) and CSS (Cascading Style Sheets). Arrays in JavaScript are used for storing multiple values under one variable na...Discuss·67 readsarray
Dheeraj JhaforLet's Brush Up about Sortingsorting.hashnode.dev·May 14, 2023SortingFirst, what's sorting, Sorting is a way in which data can be in ascending(small to big) or descending(big to small) order it reduces the human effort and time to get the smallest or largest value according to need. There are various methods to do the...Discuss·1 likesorting
Mrunalini Dudhagawalisimplecodeguide.hashnode.dev·Feb 17, 2023Sorting Algorithms: Bird's eye viewSorting algorithms are a set of procedures that are used to organize a collection of items into a specific order. This process is important in computer science, as sorting is a fundamental operation that is used in many different applications. Sortin...Discuss·28 readssorting algorithms
Bello Shehucodelery.hashnode.dev·Jan 17, 2023How to sort an array of objects by one or more of their propertiesIf you have an array of objects such as people, cars etc., and you wish to sort them in a given order, the sort method of the array object is handy in doing so. The sort method is not limited to primitive values like a number and a string, it is also...Discuss·1 like·89 readssoftware development
Om Kakatkaromkakatkar.hashnode.dev·Jul 22, 2022Array Methods for Functional ProgrammingFunctional programming is a paradigm which avoids changing state and mutable data. Functional way of writing a program is using pure functions and immutable data structures. JavaScript comes with many in-bulit functions to support this functional app...Discuss·7 likes·71 readsFunctional Programming
Erdal TAŞKESENerdaltsksn.hashnode.dev·Apr 19, 2020How to list most-used commandsIf you are a developer, you’re mostly working using the command line. You may even want to find out the most used commands. fc -l 1 | awk '{CMD[$2]++;count++;}END { for (a in CMD)print CMD[a] " " CMD[a]/count*100 "% " a; }' | grep -v "./" | column -c...Discuss·141 readsBash