# Category Archives: PHP Programs

Given an n x n matrix in the given matrix, you have to print the elements of the matrix in the snake pattern. Examples:  Input… Read More
Given an array of n integers. You are given q queries. Write a program to print the floor value of mean in range l to… Read More
Given an array A[] of size N. Solve Q queries. Find the product in the range [L, R] under modulo P ( P is Prime). … Read More
Given a square matrix and the task is to check the matrix is in lower triangular form or not. A square matrix is called lower… Read More
Given a square matrix of order n*n, find the maximum and minimum from the matrix given.  Examples:  Input : arr[][] = {5, 4, 9, 2,… Read More
Given two positive integers x and y, check if one integer is obtained by rotating bits of other. Input constraint: 0 < x, y <… Read More
Given a 2D array, print it in reverse spiral form. We have already discussed Print a given matrix in spiral form. This article discusses how… Read More
Given a square matrix and the task is to check the matrix is in upper triangular form or not. A square matrix is called upper… Read More
Given a large positive number as string, count all rotations of the given number which are divisible by 8. Examples:  Input: 8 Output: 1 Input:… Read More
A matrix is a two-dimensional data object having m rows and n columns, therefore a total of m*n values. If most of the values of… Read More
An array is given of n length, and problem is that we have to find the length of shortest unordered {neither increasing nor decreasing} sub… Read More
A square matrix is said to be symmetric matrix if the transpose of the matrix is same as the given matrix. Symmetric matrix can be… Read More
Given an array arr[]. Find the maximum value of prefix sum which is also suffix sum for index i in arr[]. Examples :  Input :… Read More
Given an array of even number of elements, form groups of 2 using these array elements such that the difference between the group with highest… Read More
Given an array and split it from a specified position, and move the first part of array add to the end.   Examples:   Input : arr[]… Read More