## Check if a string matches with a given wildcard pattern

Given a string and a pattern containing wildcard characters, write an efficient algorithm to check if the input string matches with the wildcard pattern or not.

## Pots of Gold Game using Dynamic Programming

In Pots of gold game, there are two players A & B and pots of gold arranged in a line, each containing some gold coins. The players can see how many coins are there in each gold pot and each player gets alternating turns in which the player can pick a pot from one of …

## Division of Two Numbers using Binary Search Algorithm

In this post, we will discuss division of two numbers (integer or decimal) using Binary Search Algorithm.

## Find Floor and Ceil of a number in a sorted array (Recursive solution)

Given a sorted array of integers, find floor and ceil of a given number in it. The floor and ceiling map the given number to the largest previous or the smallest following integer, respectively.

## Build Binary Tree from given Parent array

Given an array A which represents a binary tree such that the parent-child relationship is defined by (A[i], i) for every index i in the array A, build binary tree out of it. The value of root node will be i if -1 is present at index i in the array. It may be assumed …

## Word Break Problem | Using Trie Data Structure

Given a string and a dictionary of words, determine if string can be segmented into a space-separated sequence of one or more dictionary words.

## Merge M sorted lists of variable length

Given M sorted lists of variable length, print them in sorted order efficiently.

## Find maximum length sequence of continuous ones (Using Sliding Window)

Given a binary array, find the index of 0 to be replaced with 1 to get maximum length sequence of continuous ones.

## Count total possible combinations of N-digit numbers in a mobile keypad

Given a mobile keypad having digits from [0-9] associated with each key, count total possible combinations of digits having length n. We can start with any digit and press only four adjacent keys of any digit. Keypad also contains * and # key which we are not allowed to press.

## All combinations of elements satisfying given constraints

Given a positive number N, find all combinations of 2*N elements such that every element from 1 to N appears exactly twice and distance between its two appearances is exactly equal to value of the element.

## Find maximum length sequence of continuous ones

Given a binary array, find the index of 0 to be replaced with 1 to get maximum length sequence of continuous ones.

## Wildcard Pattern Matching

Wildcard Pattern Matching: Given a string and a pattern containing wildcard characters i.e. ‘*’ and ‘?’, where ‘?’ can match to any single character in input string and ‘*’ can match to any number of characters including zero characters, design an efficient algorithm to find if the pattern matches with the complete input string or …