# Tag Archives: Arrays

## Find the closest pair from two arrays

Problem Given two sorted arrays and an integer X, find one number from each array such that the sum of these two numbers is the lowest possible. Approach 1 Since the arrays are sorted, we can decrement values one by one from the first array and find the remaining element in the second array. For example, if the… Read More »

## Find maximum sum path involving elements of given arrays

Problem Given two sorted arrays, where the arrays may share some elements. Find the largest sum path from the beginning of any array to the end of either of the two arrays. Only at common items may we transition from one array to another. Approach The concept is to compute the sum of elements between all common locations… Read More »

## JavaScript Arrays

Arrays in JavaScript are used to store multiple values using a single variable name. In this JavaScript tutorial, you will learn how to create and use Arrays in JavaScript. What are Arrays? An array is a collection of multiple values under a single variable name. In the previous tutorials, we learned about JavaScript primitive data types such as… Read More »

## How to Declare, Initialize and Populate Java int Arrays?

In Java, int arrays are used to store integers. In this article, we will see the different ways in which we can create and manage integer or int arrays. However, before that, let us explain what is declaration, initialization, and populating array values in Java. Declaring an int array indicates that we want to create an array of… Read More »

## PHP – Arrays

PHP – Arrays Arrays are a type of data structure that allows you to store a number of elements having the same data type using a variable. By using an array the use of multiple variables for each value can be avoided. Arrays are easy to use and parse using an index value. You can easily handle when… Read More »

## C++ Arrays

An Array is a collection of similar data types (homogenous data type) elements that store at a contiguous memory location and using the indices or index values we can access the random element from that collection. An array is only capable of storing similar data type which means if we have an array of integer, so only integer… Read More »

## Python Arrays: How to Create, Add, and Delete Elements?

In this tutorial, we will discuss Python arrays and how they are different from the Python list. We will also cover some examples of Python arrays.