Skip to content

Category Archives: PHP

mysql_connect() Function: The mysql_connect() function is used to establish a new connection with the database. This connection is established when the script starts its execution.… Read More
In this article, we will see how to get specific key values from the given array. PHP array is a collection of items that are… Read More
Given an array of n non-negative integers. The task is to find frequency of a particular element in the arbitrary range of array[]. The range… Read More
Given an array of numbers, arrange them in a way that yields the largest value. For example, if the given numbers are {54, 546, 548,… Read More
You can navigate to WordPress permalink settings by going to Dashboard -> Settings -> Permalink. It looks something like the picture below. ( my WordPress… Read More
Given n numbers (both +ve and -ve), arranged in a circle, find the maximum sum of consecutive numbers.  Examples:  Input: a[] = {8, -8, 9,… Read More
Given a sorted array of n distinct integers where each integer is in the range from 0 to m-1 and m > n. Find the… Read More
Given a matrix of n X n. The task is to calculate the absolute difference between the sums of its diagonal.Examples:   Input : mat[][] =… Read More
A helper is considered to be a collection of functions that are aligned under a single particular category. Helpers are easily available in the CodeIgniter… Read More
The following article indicates the differences between the two inbuilt functions array_keys() and array_key_exists() in PHP. array_keys() Function: The array_keys() function is used to return… Read More
Given two arrays that are duplicates of each other except one element, that is one element from one of the array is missing, we need… Read More
An element in a sorted array can be found in O(log n) time via binary search. But suppose we rotate an ascending order sorted array… Read More
Given a matrix of n*n size, the task is to find whether all rows are circular rotations of each other or not.  Examples:  Input: mat[][]… Read More
Given a positive integer n which represents the dimensions of a 4n x 4n matrix with values from 1 to n filled from left to… Read More
Given an array arr[] of size n and integer k such that k Output:  Subarray between [3, 5] has minimum average Time Complexity: O(n) Auxiliary Space:… Read More

Start Your Coding Journey Now!