# Category - C++ programming

## C++ Programming – Check a given sentence for a given set of simple grammer rules

A simple sentence if syntactically correct if it fulfills given rules. The following are given rules. Sentence must start with a Uppercase character.

## C++ Programming -To check if two given sets are disjoint

Given two sets represented by two arrays, how to check if the given two sets are disjoint or not? It may be assumed that the given arrays.

## C++ Programming – Minimum Number of Platforms Required for a Railway/Bus Station

Given arrival and departure times of all trains that reach a railway station, find the minimum number of platforms required.

## C++ Programming – Length of the largest subarray with contiguous elements

An array of distinct integers, find length of the longest sub array which contains numbers that can be arranged in a continuous sequence.

## 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.

## 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 – Snake and Ladder Problem

Given a snake and ladder board, find the minimum number of dice throws required to reach the destination or last cell from source or 1st cell.

## C++ Programming – Connect n ropes with minimum cost

There are given n ropes of different lengths, we need to connect these ropes into one rope. The cost to connect two ropes is equal to sum of their lengths.

## C++ Programming – number of valid parentheses expressions of given length

This is mainly an application of Catalan Numbers. Total possible valid expressions for input n is n/2’th Catalan Number if n is even and 0 if n is odd.

## 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.