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
Rahul Vishwakarmamanzilxf.hashnode.dev·Sep 13, 2023Creating 2D array by different ways?// 1) Simple One to Create 2D array int arr[3][2]={{1,2}, {3,4}, {5,6}}; for (int i = 0; i < 3; i++) { for (int j = 0; j < 2; j++) { cout<<arr[i][j]<<" "; } cout<<endl; } // ...Discuss·1 likearray
Mazharul Islammazhar.hashnode.dev·Sep 11, 2023The sum of a range in JavaScriptI am writing a range function that takes two arguments (start, and end). It will return an array containing all the numbers from start up to end. I am making the sum of the range function by a few steps. Step 1: Making the range function called myRan...DiscussJavaScript
Shreyas Ananthshreyasananth.hashnode.dev·Sep 1, 2023Before You .map(), Read This!1. What is a map()? In a very crude definition, in JavaScript, the .map() function goes through each item in a list (called an array). It makes some changes to each item and gives you a new list with those changed items. 2. Why is it required? The pu...Discussmap
Vikram Singhaniavikrams.hashnode.dev·Aug 31, 2023Exploring Single Dimensional Arrays in JavaIntroduction to Single Dimensional Arrays In the world of Java programming, arrays are a fundamental concept that allows us to store and manipulate collections of elements efficiently. A single dimensional array, often simply referred to as an array,...DiscussJava
Pelumi Adebayopswith.me·Aug 30, 2023Decoding the Multidimensional Matrix SearchUnderstanding Multidimensional Array Multidimensional arrays play a significant role in problem-solving, especially in computer programming and data manipulation tasks. They provide a way to organize and store data in a structured manner with multipl...Discuss·10 likes·83 readsAlgorithm & Data Structurealgorithms
Pranjit Medhipranjitmedhi.hashnode.dev·Aug 27, 2023Inserting an element in an Array at Any PositionArrays are fixed-size data structures that can contain only homogeneous elements. Inserting an element in an array is one of the basic operations done in an array.To insert an element at the end of an array is easy we can directly insert the element ...Discussarray
Abid ullahabidullah786.hashnode.dev·Aug 26, 2023P3 _ Mastering Essential JavaScript Array Methods: include(), indexOf(), isArray()This blog was originally published on my Blog website, where you can find the full version with detailed insights and examples. Click the link below to read the complete article and explore more tech-related content!👉 Click Here Introduction JavaSc...DiscussJavaScript Array MethodsFrontend Development