## Longest sub-sequence of array containing Lucas numbers

Given an array arr[] of N elements, the task is to find the length of the longest sub-sequence in arr[] such that all the elements… Read More »

- How can one become good at Data structures and Algorithms easily?
- Quick Sort vs Merge Sort
- Find maximum in a stack in O(1) time and O(1) extra space
- Minimum number of items to be delivered
- Cracking Technical Interviews
- Reach the numbers by making jumps of two given lengths
- Print the nodes of binary tree as they become the leaf node
- Find the number of distinct islands in a 2D matrix
- Lower and Upper Bound Theory
- Samsung Semiconductor Institute of Research(SSIR Software) intern/FTE | Set-3
- Rearrange Odd and Even values in Alternate Fashion in Ascending Order
- Shannon-Fano Algorithm for Data Compression
- Dijkstra's shortest path with minimum edges
- Sum of similarities of string with all of its suffixes
- Sort the array of strings according to alphabetical order defined by another string
- Smallest power of 2 which is greater than or equal to sum of array elements
- Check if it is possible to reach a number by making jumps of two given length
- Code Optimization Technique (logical AND and logical OR)
- Dividing a Large file into Separate Modules in C/C++, Java and Python
- How to write a Pseudo Code?
- Program for SSTF disk scheduling algorithm
- Longest subsequence such that adjacent elements have at least one common digit
- Program to print the Zigzag pattern
- Largest perfect square number in an Array
- Iterative Letter Combinations of a Phone Number
- Number of array elements derivable from D after performing certain operations
- Ternary Search
- Smallest Pair Sum in an array
- Length of the longest alternating subarray
- Color N boxes using M colors such that K boxes have different color from the box on its left

Given an array arr[] of N elements, the task is to find the length of the longest sub-sequence in arr[] such that all the elements… Read More »

Given an array arr[] containing N integers, the task is to print k different permutations of indices such that the values at those indices form… Read More »

Given an integer N, the task is to find the number of trailing zeroes in the base 16 representation of the factorial of N. Examples:… Read More »

Given N boxes with their capacities which denotes the total number of boxes that it can hold above it. You can stack up the boxes… Read More »

Given an array A containing N elements (N is divisible by 3), the task is to split the numbers into groups of 3, let the… Read More »

Given a string S containing only uppercase English characters. The task is to find whether S is the same as its reflection in a mirror.… Read More »

Given an array containing N elements, each element is either 1 or 2. The task is to find out whether the array can be divided… Read More »

Given three integers N, D and K. The task is to check whether it is possible to make a tree with exactly N vertices, D… Read More »

Given a NxN 2-D matrix, the task to find the sum of all the submatrices. Examples: Input : arr[] = {{1, 1}, {1, 1}}; Output… Read More »

Given a range [L, R], the task is to find a pair (X, Y) such that L ≤ X < Y ≤ R and X… Read More »

Given an array of n length. The task is to check if the given array can be split into an odd number of sub-segment starting… Read More »

Given an array Arr[] of N integers. The task is to find minimum number of elements needed to be removed from the array, so that… Read More »

Given an integer N, the task is to check whether N the given number can be made a perfect square after adding 1 to it.… Read More »

Given an undirected complete graph of N vertices where N > 2. The task is to find the number of different Hamiltonian cycle of the… Read More »

Given an integer K and an array arr[], the task is to split the array arr[] into K consecutive subarrays to find the maximum possible… Read More »