Chetan Dattachetan77.hashnode.dev·Dec 1, 2023Arrays Easy - Part II (Rotations)I. Left Rotate an Array by One Problem Statement Given an array of N integers, left rotate the array by one place. (link) Optimal Approach To perform a left rotation of the array by one element involves shifting each element to the left by one positi...DiscussLeetcodearrays
Elucian MoiseforProgramming Languagessagecode.hashnode.dev·Nov 28, 2023Ada: ArraysArrays are a fundamental data structure in Ada, used to store a collection of elements of the same type. They are versatile and widely used in various programming scenarios. In Ada, you cannot declare an array without declaring the data type of its e...DiscussAda LanguageADA
Aayush Dhakalayushdhakal.hashnode.dev·Nov 28, 2023Arrays in JavaScriptSimilar to most programming languages, arrays in javascript are also created to store multiple data in a single variable, removing the tedious task of declaring multiple variables for multiple different data. In JavaScript, there are primitives and o...Discussarray in js
Stephen Kwame Twumkwamedev.hashnode.dev·Nov 25, 2023Demystifying Algorithms and Data Structures: A beginner's guideWelcome to my inaugural blog post! This guide will introduce you to the fundamental concepts of algorithms and data structures, complete with easy-to-understand examples. Part 1: Algorithms Algorithms are like recipes for programmers and computers. T...Discuss·1 like·44 readsalgorithms
ROSHAN CSE0026roshanjha23.hashnode.dev·Nov 8, 2023Unveiling the Magic of JavaScript Array Methods: A Journey Through Elegance and EfficiencyIntroduction: In the enchanting realm of JavaScript, arrays play a pivotal role, serving as the backbone of countless operations. However, it’s the array of methods that truly elevate the language’s allure, weaving a tapestry of elegance and efficie...DiscussJavaScript
Devinterview.iodevinterview.hashnode.dev·Nov 1, 2023Arrays in Tech Interviews 2024: Essential Questions & AnswersArrays are contiguous memory data structures that store elements of the same type, allowing efficient access via indices. In coding interviews, questions about arrays evaluate a candidate's ability to work with sequential data storage and optimize so...Discuss·1 likearray
aditya kumaradityakmr.hashnode.dev·Oct 30, 2023Operation on ArraysIn this article and upcoming articles, we are going to discuss operation on an array. Searching First, in this article let's discuss searching an element in an unsorted array. Here we have an array. Input as follows See below code // Input arr[] = {...Discussarray
Kallol Bairagikallolbairagi.hashnode.dev·Oct 26, 2023#11.Container With Most Water [LeetCode Grind 75 in Java]class Solution { public int maxArea(int[] height) { //two pointer approach int l = 0; int r = height.length - 1; int maxAr = 0; while(l < r){ int area = (r - l) * Math.min(height[l], height[r])...DiscussLeetCode Grind 75 in JavaDSA
Kallol Bairagikallolbairagi.hashnode.dev·Oct 26, 2023#78.Subsets [LeetCode Grind 75 in Java]class Solution { private List<List<Integer>> ans; public void generate(int i, int[] nums, int n, ArrayList<Integer> cur){ if(i == n){ //store final formed subset ArrayList<Integer> st = new ArrayList<>(); ...DiscussLeetCode Grind 75 in JavaDSA
Kallol Bairagikallolbairagi.hashnode.dev·Oct 21, 2023#53.Maximum Subarray [LeetCode Grind 75 in Java]class Solution { public int maxSubArray(int[] nums) { //sliding window int maxSum = nums[0]; int curSum = nums[0]; int n = nums.length; for(int i = 1 ; i < n ; i ++){ curSum = Math.max(nums[i]...DiscussLeetCode Grind 75 in JavaJava