Manish Kumarsdemanish.hashnode.dev·12 hours agoArrays in JavaScriptArrays are one of the fundamental data structures in JavaScript, allowing you to store and manipulate collections of data efficiently. In this blog post, we'll explore everything you need to know about arrays in JavaScript, from creating and manipula...DiscussJavaScriptarray
Matías Navarro-Carterblog.mnavarro.dev·15 hours agoTo Array is HumanI was just browsing LinkedIn this morning (because yeah, that's what I do on holidays apparently) and I got to this post, for which the author got a lot of undeserved criticism. I tried to jump in defense of the author, mainly because he was trying t...DiscussPet Peevesdogmatism
Arun Kumararunkumar0203.hashnode.dev·Sep 26, 2023Day 6:Binary Search AlgorithmBinary Search Overview Binary search is a fast search algorithm that works on sorted arrays. It repeatedly divides the search interval in half, reducing the search space by half with each iteration. It has a time complexity of O(log n) where "n" is...DiscussBinary Search Algorithm
Arup Debnatharup43.hashnode.dev·Sep 26, 2023Find the 2nd largest element in an arrayYou are given an array and asked to find the second-largest element in that array. arr = [2, 3, 1, 6, 4, 5] second largest element is 5 Approach 1: Brute force What comes to mind at first is that we can sort the array and return the arr[n - 2]. But ...DiscussArrayarray
Arun Kumararunkumar0203.hashnode.dev·Sep 25, 2023Day 5:Linear Search Algorithm + LeetCodeCertainly! Here are some notes on implementing a linear search algorithm in Java: Linear Search Overview Linear search is a basic searching algorithm that sequentially checks each element in a list or array until a match is found. It's straightforw...Discuss·1 likeJava
Arun Kumararunkumar0203.hashnode.dev·Sep 24, 2023Day 4:Exploring Arrays and ArrayListWhy do we need Array? Arrays are essential data structures in programming because they allow us to store and manage collections of elements efficiently. They provide a way to group related data under a single variable name, simplifying code organizat...Discuss·1 likearray
Rubel Mehmedrubelmehmed.hashnode.dev·Sep 23, 2023Exploring JavaScript Array MethodsBy Rubel Mehmed JavaScript is a versatile and widely-used programming language, and one of its most fundamental data structures is the array. Arrays allow developers to store and manipulate collections of data efficiently. In this blog post, we'll d...Discussarray
Luqman Shabanluqmanshaban.blog·Sep 21, 2023Mastering Data Structures and Algorithms: Planting Flowers with No Adjacent BloomsIntroduction: In our ongoing journey through the exciting world of Data Structures and Algorithms (DSA), we have encountered a diverse range of challenges, from sorting algorithms to graph traversal. Today, we are continuing our exploration with a un...DiscussLeetCode 75datastructure
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
Gagan G Saralayagagang.hashnode.dev·Sep 14, 2023ArraysAn array is a container object that holds a fixed number of values of a single type. Basically A collection of similar data types stored at contiguous memory locations. The length of an array is established when the array is created. After creation, ...Discussarray