# Topic:CPP

### Wildcard Pattern Matching using Dynamic Programming

Wildcard Pattern Matching - Given a text of length n and a wildcard pattern of length m, we are supposed to find whether the wildcard pattern matches the actual string. The pattern will consist of 2 wildcard character '?' and...

### Inorder Successor of a Node in Binary Search Tree

Given a pointer to a node of a Binary Search Tree(BST), we have to find the next node, which is the Inorder successor of the given node (assume a pointer to a parent node is already given).

### Check if a Binary Tree is a Binary Search Tree

Given a Binary Tree, we have to validate whether it is a valid Binary Search Tree(BST) or not. Print true, if given Binary Tree is a valid BST else print false. Let's understand this problem better with an example ...

### Design an algorithm to create a linked list of all the nodes at each depth

Given a binary tree, we have to design an algorithm that will create a linked list of all the nodes at each depth or level. For example, if we have a tree with depth D, then there...

### Print all unique permutations of a string with duplicate characters

A permutation is an act of rearranging or reordering elements of a set or string uniquely etc.For n elements, n! (n factorial) permutations are possible if there is no repetition.For n elements, permutations are possible, where ak represents the...

### Find all possible subset of a given set

Given a set (of n elements), Print all possible subset (2^n) of this set. Example: Set = {a,b,c}, Power set of S, P(S) = {Φ, {a}, {b}, {c}, {a,b}, {b,c}, {a,c}, {a,b,c}}  Note: A set of n elements will have 2^n...

### Find if a path is possible for reaching bottom right from the top left in a nxm grid

A robot sitting on the upper left corner(0,0) of a grid with r rows and c columns. The robot can only move in two directions: right or down, but certain cells are "off-limits" such that the robot cannot step on...

### Count number of ways to reach the nth stair by climbing 1, 2 or 3 steps

A child is running up a staircase with n steps and can hop either 1 step, 2 steps, or 3 steps at a time. Implement a method to Count number of ways to reach the nth stair by climbing 1,... 