## Longest subsequence consisting of alternate vowels and consonants

Given a non-empty string S, the task is to print the longest subsequence from the string S which contains alternating vowels and consonants. Note: If… Read More »

- Must do Math for Competitive Programming
- Which C++ libraries are useful for competitive programming?
- Breadth First Search without using Queue
- Which Java libraries are useful for competitive programming?
- Minimize the maximum difference between adjacent elements in an array
- 7 Best Coding Challenge Websites in 2020
- Which Python Modules are useful for competitive programming?
- Speed up Code executions with help of Pragma in C/C++
- Basic Algorithm Techniques Not Taught in Academics
- Setting up a C++ Competitive Programming Environment
- Writing code faster during Competitive Programming in C++
- Check if sum of Fibonacci elements in an Array is a Fibonacci number or not
- Count of subarrays of an Array having all unique digits
- Logarithm tricks for Competitive Programming
- Move all zeroes to end of array using Two-Pointers
- Default values in a Map in C++ STL
- Sum of GCD of all possible sequences
- How To Approach A Coding Problem ?
- Minimize the maximum difference of adjacent elements after at most K insertions
- Maximum LCM among all pairs (i, j) from the given Array
- Count of subarrays which start and end with the same element
- Kth most frequent Character in a given String
- Submatrix of given size with maximum 1's
- Longest Mountain Subarray
- Length of the smallest substring which contains all vowels
- Count of substrings of length K with exactly K distinct characters
- Count the number of ways to construct the target string
- Find distance between two nodes in the given Binary tree for Q queries
- Queries for elements having values within the range A to B in the given index range using Segment Tree
- Find maximum subset sum formed by partitioning any subset of array into 2 partitions with equal sum

Given a non-empty string S, the task is to print the longest subsequence from the string S which contains alternating vowels and consonants. Note: If… Read More »

Given an array arr[] of integers, the task is to check if it is possible to obtain a subsequence of K elements from the array… Read More »

Given a non-negative integer N, the task is to find the Nth row of Pascal’s Triangle. Note: The row index starts from 0. Pascal’s Triangle:… Read More »

Given three integers N, K and M representing the Number of boxes (aligned horizontally from 1 to N), total numbers of allowed jumps and total… Read More »

Given a string str consist of only lowercase alphabets and an integer K, the task is to count the number of substrings of size K… Read More »

Given an array arr[] of N integers, the task is to split the array into two subsets such that the absolute difference between the maximum… Read More »

Given an array arr[] of N integers, the task is to delete the element from the given array if element to it’s left is smaller… Read More »

Given an unsorted array arr[] having N elements, the task is to find out the median of the array in linear time complexity. Examples: Input:… Read More »

Given a positive integer N, the task is to find the average of cubes of first N natural numbers. Examples: Input: N = 2 Output: 4.5 Explanation: For integer… Read More »

Given a string str of lowercase alphabets and an integer K, the task is to count all substrings of length K which have exactly K… Read More »

Given an array arr[] of positive integers of size N and a positive integer K, the task is to find the maximum possible length of… Read More »

Given a directed graph and a source vertex in the graph, the task is to find the shortest distance and path from source to target… Read More »

Pre-requisite: Merge Sort, Insertion Sort Merge Sort: is an external algorithm and based on divide and conquer strategy. In this sorting: The elements are split… Read More »

Given two strings A and B, the task is to split the string A into the minimum number of substrings such that each substring is… Read More »

Pre-requisite: Policy based data structure Given an array arr[], the task is to find the number of inversions for each element of the array. Inversion… Read More »