## Mobile Numeric Keypad Problem: Solution in C++

Here we will understand the Mobile Numeric Keypad problem, then we will understand the solution and then write a Program in C++ to implement the solution: GIVEN: A mobile numeric keypad as below: PROBLEM: A digit is given, we have to find the number of possible numbers of given digits can be formed, using the … Read more

## How to count number of non repeating digits in a Range C++

Here we will write a program to count the number of non repeating digits in a given range. Let’s start with understanding the problem. Given: A Range starting from L till R. Problem: Find the count of total numbers such that they do not have any repeated digits. Like 123 has no repeated digits but 121, 122, … Read more

## Maximum points from top left to bottom right of Matrix

Given: Matrix of size MxN, consists of ‘#’, ‘.’ and ‘*’, where: # means blocked path . means walkable path * means points to collect. Problem: To find the maximum points you can grab to reach bottom right of the matrix from top left. Consider you are at the top left of the matrix, you have … Read more

## Highway Billboard Problem: Dynamic Programming

In this post we will understand the problem of Highway Billboard Problem and then we will implement the solution using Dynamic Programming. Problem: Let’s suppose we got a job to place billboards (advertising hoarding) on a National Highway of length M miles. The possible site for billboards are given by numbers x1 < x2 < ….. < … Read more

## Find length of the longest sub-sequence in C++

In this post first we are going to understand the problem to find the length of longest sub-sequence of an array and then we will write a C++ program to implement the same. Let’s understand the problem first: Given: An array arr[ ] of N integers. Problem: To find the length of the longest subsequence … Read more

## Implement K stacks in single Array C++

Here first we are going to understand the problem of how to efficiently implement K Stacks in a single array, then we will discuss a solution and then finally we can implement the same in C++. Implement K Queues in single Array in C++ Problem: Create a data structure kStacks that represents k stacks. Implementation … Read more