# Tag - dynamic programming algorithm

Hashing

## C++ Programming – Longest Consecutive Subsequence

One Solution is to first sort the array and find the longest subarray with consecutive elements. Time complexity of this solution is O(nLogn).

Hashing

## C Programming – Longest Consecutive Subsequence

One Solution is to first sort the array and find the longest subarray with consecutive elements. Time complexity of this solution is O(nLogn).

## C++ Programming – Print all increasing sequences of length k from first n natural numbers

Given two positive integers n and k, print all increasing sequences of length k such that the elements in every sequence are from first n natural numbers.

## Python Programming – Given two strings, find if first string is a subsequence of second

Given two strings str1 and str2, find if str1 is a subsequence of str2. A subsequence is a sequence that can be derived from another sequence by deleting

## C++ Programming – Given two strings, find if first string is a subsequence of second

Given two strings str1 and str2, find if str1 is a subsequence of str2. A subsequence is a sequence that can be derived from another sequence by deleting

## C Programming – Given two strings, find if first string is a subsequence of second

Given two strings str1 and str2, find if str1 is a subsequence of str2. A subsequence is a sequence that can be derived from another sequence by deleting

## C++ Programming – Longest Monotonically Increasing Subsequence Size

Given an array of random numbers, find longest monotonically increasing subsequence (LIS) in the array.If you want to understand the O(NlogN) approach.

## C++ Programming – number of contiguous subsequences

C++ Programming number of contiguous subsequences - Mathematical Algorithms - Given a number as a string, write a function to find the number of substrings

## C Programming – Count ways to reach the n stair

C Programming - Count ways to reach the n stair - Mathematical Algorithms - There are n stairs, a person standing at the bottom wants to reach the top.

## C++ Programming – Count number of binary strings without consecutive 1’s

C++ Programming - Count number of binary strings without consecutive 1’s - Mathematical Algorithms - Let a[i] be the number of binary strings of length