# Category Archives: PHP

Given a n Ã— m binary matrix, count the number of sets where a set can be formed one or more same values in aâ€¦ Read More
Given a 4 x 4 matrix, we have to interchange the elements of first and last row and show the resulting matrix.Examples :   Input :â€¦ Read More
An array is given, find length of the subarray having maximum sum. Examples :Â  Input : a[] = {1, -2, 1, 1, -2, 1} Outputâ€¦ Read More
Given a 2D square matrix, find the sum of elements in Principal and Secondary diagonals. For example, consider the following 4 X 4 input matrix. â€¦ Read More
Given a matrix, the task is to find the maximum element of each row.Examples:   Input : [1, 2, 3] [1, 4, 9] [76, 34, 21]â€¦ Read More
Given an array of integers, you have to find three numbers such that the sum of two elements equals the third element.Examples: Input: {5, 32,â€¦ Read More
An array consisting of N integers is given. There are several Right Circular Rotations of range[L..R] that we perform. After performing these rotations, we needâ€¦ Read More
In mathematics, a square matrix is said to be diagonally dominant if for every row of the matrix, the magnitude of the diagonal entry inâ€¦ Read More
Given an array of size N, the task is to determine whether its possible to sort the array or not by just one shuffle. Inâ€¦ Read More
Given an array of sorted integers. We need to find the closest value to the given number. Array may contain duplicate values and negative numbers. â€¦ Read More
Given an array arr[], count number of pairs arr[i], arr[j] such that arr[i] + arr[j] is maximum and i < j. Example : Input :â€¦ Read More
Given an array of N distinct integers. The task is to write a program to check if this array is sorted and rotated counter-clockwise. Aâ€¦ Read More
In PHP, the array is a type of data structure that allows us to store similar types of data under a single variable. The arrayâ€¦ Read More
Given an array, right rotate it by k elements.   After K=3 rotation   Examples:   Input: arr[] = {1, 2, 3, 4, 5, 6, 7, 8, 9,â€¦ Read More
Given a square matrix, turn it by 90 degrees in anti-clockwise direction without using any extra space.Examples :   Input: Matrix: 1 2 3 4 5â€¦ Read More