Detail Form
We will send your result on your email id and phone no. please fill detail
You are given two strings that are made of lowercase English alphabets. Find the number of different pairs such that the substrings are equal and the value of is minimum.
Input format
Output
Print the number of different pairs such that the substrings are equal and the value of is minimum.
Constraints
Given two integers m & n, find the number of possible sequences of length n such that each of the next element is greater than or equal to twice of the previous element but less than or equal to m.
Example 1:
Example 2:
Your Task:
You do not need to read input or print anything. Your task is to complete the function numberSequence() which takes the number m and n as input parameters and returns the number of sequences.
Expected Time Complexity: O(m*n)
Expected Auxiliary Space: O(1)
Constraints:
1 ≤ m, n ≤ 100
Given an integer N representing the number of pairs of parentheses, the task is to generate all combinations of well-formed(balanced) parentheses.
Example 1: