## Longest substring of only 4’s from the first N characters of the infinite string

Given an integer N, the task is to find the length of the longest substring containing only 4’s from the first N characters of the… Read More »

- Lower and Upper Bound Theory
- Code Optimization Technique (logical AND and logical OR)
- Largest perfect square number in an Array
- Jump Pointer Algorithm
- Difference between Recursion and Iteration
- Algorithms | Recurrences | Set 1
- Find the repeating and the missing number using two equations
- Check whether bitwise OR of N numbers is Even or Odd
- Count all Prime Length Palindromic Substrings
- Minimum operations of the given type required to make a complete graph
- Greatest divisor which divides all natural number in range [L, R]
- Find smallest number K such that K % p = 0 and q % K = 0
- Count pairs (i,j) such that (i+j) is divisible by A and B both
- Sort the numbers according to their sum of digits
- Probability of getting two consecutive heads after choosing a random coin among two different types of coins
- Choose points from two ranges such that no point lies in both the ranges
- Maximum number of parallelograms that can be made using the given length of line segments
- Generate original array from difference between every two consecutive elements
- Longest substring of only 4's from the first N characters of the infinite string
- Find a Symmetric matrix of order N that contain integers from 0 to N-1 and main diagonal should contain only 0's

Given an integer N, the task is to find the length of the longest substring containing only 4’s from the first N characters of the… Read More »

Given an integer N. The task is to generate a symmetric matrix of order N*N having the following properties. Main diagonal should contain only 0’s… Read More »

Given N – 1 differences between two consecutive elements of an array containing N numbers which are in range of 1 to N. The task… Read More »

Given two integers p and q, the task is to find the smallest number K such that K % p = 0 and q %… Read More »

Given an array arr[] of N non-negative integers, the task is to sort these integers according to sum of their digits. Examples: Input: arr[] =… Read More »

Given two segments [L1, R1] and [L2, R2], the task is to choose two elements x and y from both the ranges (one from range… Read More »

Given a string str, the task is to count all the sub-strings of str which are palindromes and their length is prime. Examples: Input: str… Read More »

Given N vertex where N is even. Initially there is no edge between any of the vertices. You are allowed to perform operation as illustrated… Read More »

Logical AND (&&) While using && (logical AND), we must put the condition first whose probability of getting false is high so that compiler doesn’t… Read More »

Given two integers L and R, the task is to find the greatest divisor that divides all the natural numbers in the range [L, R].… Read More »

Given an array arr[] of size N, each integer from the range [1, N] appears exactly once except A which appears twice and B which… Read More »

Question 1: Which of the following is the value of T3(n) where T3(n) is defined as T3(n) = 5*T3(n-1) – 4*T3(n-2) C1*5n + C2*4n C1… Read More »

A program is called recursive when an entity calls itself. A program is call iterative when there is a loop (or repetition). Example: Program to… Read More »

Given an array of n integers. The task is to find the largest number which is a perfect square. Print -1 if there is no… Read More »

Given N line segments where the length of the ith line segment is . The task is to find the maximum number of parallelograms can… Read More »