## Maximum Subarray Sum Excluding Certain Elements

Given an array of A of n integers and an array B of m integers find the Maximum Contiguous Subarray Sum of array A such… Read More »

## Binary Search in PHP

Binary Search is a searching technique used to search an element in a sorted array. In this article, we will learn about how to implement… Read More »

## Stella Octangula Number

Given a number n, check it is the Stella Octangula number or not. A number of the form where n is a whole number(0, 1,… Read More »

## Binary Search on Singly Linked List

Given a singly linked list and a key, find key using binary search approach. To perform a Binary search based on Divide and Conquer Algorithm,… Read More »

## Find square root of number upto given precision using binary search

Given a positive number n and precision p, find the square root of number upto p decimal places using binary search. Note : Prerequisite :… Read More »

## Sparse Search

Given a sorted array of strings which is interspersed with empty strings, write a method to find the location of a given string. Examples: Input… Read More »

## Count pairs from two sorted matrices with given sum

Given two sorted matrices mat1 and mat2 of size n x n of distinct elements. Given a value x. The problem is to count all… Read More »

## Find a Fixed Point (Value equal to index) in a given array | Duplicates Allowed

Given an array of n integers sorted in ascending order, write a function that returns a Fixed Point in the array, if there is any… Read More »

## Count elements smaller than or equal to x in a sorted matrix

Given a n x n strictly sorted matrix and a value x. The problem is to count the elements smaller than or equal to x… Read More »

## Count items common to both the lists but with different prices

Given two lists list1 and list2 containing m and n items respectively. Each item is associated with two fields: name and price. The problem is… Read More »

## Find k maximum elements of array in original order

Given an array arr[] and an integer k, we need to print k maximum elements of given array. The elements should printed in the order… Read More »

Binary search is a popular method of searching in a sorted array or list. It simply divides the list into two halves and discard the… Read More »

## Value of k-th index of a series formed by append and insert MEX in middle

Given two integers, n and k. Initially we have a sequence consisting of a single number 1. We need to consider series formed after n… Read More »

## Numbers whose factorials end with n zeros

Given an integer n, we need to find the number of positive integers whose factorial ends with n zeros. Examples: Input : n = 1… Read More »

## The painter’s partition problem | Set 2

We have to paint n boards of length {A1, A2, .. An}. There are k painters available and each takes 1 unit time to paint… Read More »