- Reverse elements of a Parallel Stream in Java
- Check whether product of digits at even places is divisible by sum of digits at odd place of a number
- Java | ==, equals(), compareTo(), equalsIgnoreCase() and compare()
- C# | Array vs ArrayList
- Sum of all odd length palindromic numbers within the range [L, R]
- 10 Ways to Create a Stream in Java
- Move all special char to the end of the String
- Move all Uppercase char to the end of string
- ArrayList iterator() method in Java with Examples
- Check if the given decimal number has 0 and 1 digits only
- Check if a value is present in an Array in Java
- Count rows in a matrix that consist of same element
- Scala | Nested Functions
- Command Line Argument in Scala
- How to remove all non-printable characters in a string in PHP?
- How to trim all strings in an array in PHP ?
- Delete all even elements from a stack
- Find the last non repeating character in string
- Queries to find the last non-repeating character in the sub-string of a given string
- Check if the two given stacks are same
- Program to calculate angle on circumference subtended by the chord when the central angle subtended by the chord is given
- Area of a Regular Pentagram
- Count pairs of elements such that number of set bits in their OR is B[i]
- Program to calculate area of inner circle which passes through center of outer circle and touches its circumference

- Remove duplicates from a given string
- Given only a pointer/reference to a node to be deleted in a singly linked list, how do you delete it?
- Detect loop in a linked list
- Write a Program to Find the Maximum Depth or Height of a Tree
- Convert a Binary Tree into its Mirror Tree
- Write a function to get the intersection point of two Linked Lists
- Given a linked list which is sorted, how will you insert in sorted way
- Compute the minimum or maximum of two integers without branching
- A program to check if a binary tree is BST or not
- Merge two sorted linked lists
- Maximum and minimum of an array using minimum number of comparisons
- Queue using Stacks
- Remove duplicates from a sorted linked list
- Reverse a Doubly Linked List
- Construct Tree from given Inorder and Preorder traversals
- Maximum difference between two elements such that larger element appears after the smaller number
- Check for balanced parentheses in an expression
- Count of Binary Digit numbers smaller than N
- Delete alternate nodes of a Linked List
- Find the two repeating elements in a given array
- Reverse a Linked List in groups of given size | Set 1
- Evaluation order of operands
- Find duplicates in O(n) time and O(1) extra space | Set 1
- Program for Fibonacci numbers
- Print a given matrix in spiral form
- Sliding Window Maximum (Maximum of all subarrays of size k)
- Reverse alternate K nodes in a Singly Linked List
- Segregate even and odd nodes in a Linked List
- Detect and Remove Loop in a Linked List
- Find whether an array is subset of another array | Added Method 3
- Sudoku | Backtracking-7
- Smallest of three integers without comparison operators
- Check whether two strings are anagram of each other
- Find a triplet that sum to a given value
- K'th smallest element in BST using O(1) Extra Space
- Find the smallest positive number missing from an unsorted array | Set 1
- Find four elements that sum to a given value | Set 2 ( O(n^2Logn) Solution)
- Find the element that appears once
- Lexicographic rank of a string
- Given a sequence of words, print all anagrams together | Set 2
- Transitive closure of a graph
- Sort a linked list of 0s, 1s and 2s
- The Stock Span Problem
- Largest Independent Set Problem | DP-26
- Find multiplication of sums of data of leaves at same levels
- Tug of War
- Check whether a given graph is Bipartite or not
- QuickSort on Doubly Linked List
- Dice Throw | DP-30
- Swap Kth node from beginning with Kth node from end in a Linked List
- Remove "b" and "ac" from a given string
- Iterative Method to find Height of Binary Tree
- Check for Identical BSTs without building the trees
- QuickSort on Singly Linked List
- How to check if a given point lies inside or outside a polygon?
- Merge k sorted arrays | Set 1
- Difference between sums of odd level and even level nodes of a Binary Tree
- Print Postorder traversal from given Inorder and Preorder traversals
- Check if all leaves are at same level
- Extract Leaves of a Binary Tree in a Doubly Linked List
- Find the first non-repeating character from a stream of characters
- Find next right node of a given key
- Splay Tree | Set 1 (Search)
- Find LCA in Binary Tree using RMQ
- Remove minimum elements from either side such that 2*min becomes more than max
- Search in a Row-wise and Column-wise Sorted 2D Array using Divide and Conquer algorithm
- Program for nth Catalan Number
- Boolean Parenthesization Problem | DP-37
- Channel Assignment Problem
- Find next greater number with same set of digits
- Shortest path with exactly k edges in a directed and weighted graph
- Pattern Searching using a Trie of all Suffixes
- Mobile Numeric Keypad Problem
- Snake and Ladder Problem
- Convert a Binary Tree to Threaded binary tree | Set 1 (Using Queue)
- Multiply two polynomials
- K'th Smallest/Largest Element in Unsorted Array | Set 1
- K'th Smallest/Largest Element in Unsorted Array | Set 2 (Expected Linear Time)
- K'th Smallest/Largest Element in Unsorted Array | Set 2 (Expected Linear Time)
- Check a given sentence for a given set of simple grammer rules
- K'th Smallest/Largest Element in Unsorted Array | Set 3 (Worst Case Linear Time)
- Flood fill Algorithm - how to implement fill() in paint?
- Check if a given array contains duplicate elements within k distance from each other
- Find a common element in all rows of a given row-wise sorted matrix
- Rearrange an array such that 'arr[j]' becomes 'i' if 'arr[i]' is 'j' | Set 1
- Vertex Cover Problem | Set 2 (Dynamic Programming Solution for Tree)
- Find number of days between two given dates
- Find the longest substring with k unique characters in a given string
- Swap nodes in a linked list without swapping data
- Merge Sort for Doubly Linked List
- How to handle duplicates in Binary Search Tree?
- Select a Random Node from a Singly Linked List
- Sort an almost sorted array where only two elements are swapped
- Remove spaces from a given string
- Count total number of N digit numbers such that the difference between sum of even and odd digits is 1
- Print string of odd length in 'X' format
- Find the largest rectangle of 1's with swapping of columns allowed
- Find all possible outcomes of a given expression
- Maximum weight transformation of a given string
- Given an array of pairs, find all symmetric pairs in it
- Longest Repeating Subsequence
- How to check if a given array represents a Binary Heap?
- Find minimum possible size of array with given rules for removing elements
- Find Minimum Depth of a Binary Tree
- Range Minimum Query (Square Root Decomposition and Sparse Table)
- Print all Jumping Numbers smaller than or equal to a given value
- Reorder an array according to given indexes
- Combinatorial Game Theory | Set 3 (Grundy Numbers/Nimbers and Mex)
- Merge two sorted linked lists such that merged list is in reverse order
- Count number of squares in a rectangle
- Print individual digits as words without using if or switch
- Determinant of a Matrix
- Merge two sorted arrays with O(1) extra space
- Adjoint and Inverse of a Matrix
- Count Integral points inside a Triangle
- Lagrange's Interpolation
- Form minimum number from given sequence
- How to avoid overflow in modular multiplication?
- 1's and 2's complement of a Binary Number
- Check whether given degrees of vertices represent a Graph or Tree
- Bin Packing Problem (Minimize number of used Bins)
- Count numbers having 0 as a digit
- Printing Paths in Dijkstra's Shortest Path Algorithm
- Querying maximum number of divisors that a number in a given range has
- Construct Ancestor Matrix from a Given Binary Tree
- Point arbit pointer to greatest value right side node in a linked list
- Non-recursive program to delete an entire binary tree
- GCDs of given index ranges in an array
- Common elements in all rows of a given matrix
- Sort linked list which is already sorted on absolute values
- Minimax Algorithm in Game Theory | Set 3 (Tic-Tac-Toe AI - Finding optimal move)
- Rearrange array in alternating positive & negative items with O(1) extra space | Set 2
- Printing Shortest Common Supersequence
- Maximum product of a triplet (subsequnece of size 3) in array
- Find maximum length Snake sequence
- Find smallest range containing elements from k lists
- Find if string is K-Palindrome or not | Set 1
- Delete middle of linked list
- Check if a linked list is Circular Linked List
- Longest Common Prefix using Word by Word Matching
- Find frequency of each element in a limited range array in less than O(n) time
- Number of ways to calculate a target number using only array elements
- Rearrange a string so that all same characters become atleast d distance away
- How to find Lexicographically previous permutation?
- Longest Common Prefix using Divide and Conquer Algorithm
- Maximum value K such that array has at-least K elements that are >= K
- Lower case to upper case - An interesting fact
- Find even occurring elements in an array of limited range
- Heap's Algorithm for generating permutations
- Printing Longest Common Subsequence | Set 2 (Printing All)
- Remove duplicates from an array of small primes
- Program to convert a given number to words | Set 2
- Two Dimensional Binary Indexed Tree or Fenwick Tree
- Rearrange positive and negative numbers with constant extra space
- Minimax Algorithm in Game Theory | Set 4 (Alpha-Beta Pruning)
- Range LCM Queries
- Generate 0 and 1 with 25% and 75% probability
- Sub-string Divisibility by 3 Queries
- Find longest palindrome formed by removing or shuffling chars from string
- Longest Geometric Progression
- Find all strings that match specific pattern in a dictionary
- Find height of a special binary tree whose leaf nodes are connected
- Reverse an array in groups of given size | Set 2 (Variations of Set 1 )
- Find if an expression has duplicate parenthesis or not
- Third largest element in an array of distinct elements
- Subtract Two Numbers represented as Linked Lists
- A Space Optimized DP solution for 0-1 Knapsack Problem
- Check if string follows order of characters defined by a pattern or not | Set 2
- Find Two Missing Numbers | Set 1 (An Interesting Linear Time Solution)
- Count digit groupings of a number with given constraints
- Check if string follows order of characters defined by a pattern or not | Set 3
- Count Distinct Subsequences
- Find minimum elements after considering all possible transformations
- Program to check if an array is sorted or not (Iterative and Recursive)
- Maximum Consecutive Increasing Path Length in Binary Tree
- Pairs of complete strings in two sets of strings
- Frequency Measuring Techniques for Competitive Programming
- Count and Toggle Queries on a Binary Array
- Binary Indexed Tree : Range Update and Range Queries
- Vigenère Cipher
- Remove Invalid Parentheses
- Number of ways to make mobile lock pattern
- Longest common subsequence with permutations allowed
- Longest consecutive sequence in Binary tree
- Optimum location of point to minimize total distance
- Minimum steps to reach end of array under constraints
- Check if a string has all characters with same frequency with one variation allowed
- Check if a string can become empty by recursively deleting a given sub-string
- Program to find the Type of Triangle from the given Coordinates
- Remove minimum number of characters so that two strings become anagram
- XOR Cipher
- Count all pairs with given XOR
- Find pairs with given sum in doubly linked list
- Find maximum difference between nearest left and right smaller elements
- Convert a number into negative base representation
- Sort a string according to the order defined by another string
- Distinct strings with odd and even changes allowed
- Sum of maximum elements of all subsets
- Find if there is a pair in root to a leaf path with sum equals to root's data
- Find Maximum Sum Strictly Increasing Subarray
- Count characters at same position as in English alphabet
- Minimum Product Spanning Tree
- Maximum subsequence sum such that no three are consecutive
- Maximum sum of nodes in Binary tree such that no two are adjacent
- Find all sides of a right angled triangle from given hypotenuse and area | Set 1
- Count pairs whose products exist in array
- Count minimum number of "move-to-front" moves to sort an array
- Minimum characters to be added at front to make string palindrome
- Print all nodes in a binary tree having K leaves
- Minimum difference between adjacent elements of array which contain elements from each row of a matrix
- Maximum 0's between two immediate 1's in binary representation
- Find all permuted rows of a given row in a matrix
- Paper Cut into Minimum Number of Squares
- Sort even-placed elements in increasing and odd-placed in decreasing order
- Find the first natural number whose factorial is divisible by x
- LCA for general or n-ary trees (Sparse Matrix DP approach )
- Sort an array when two halves are sorted
- Program to toggle all characters in a string
- Minimum number of elements which are not part of Increasing or decreasing subsequence in array
- LCS (Longest Common Subsequence) of three strings
- Check linked list with a loop is palindrome or not
- Find Maximum dot product of two arrays with insertion of 0's
- Rearrange an array to minimize sum of product of consecutive pair elements
- Find pairs in array whose sums already exist in array
- K-th smallest element after removing some integers from natural numbers
- Sqrt (or Square Root) Decomposition Technique | Set 1 (Introduction)
- Break an array into maximum number of sub-arrays such that their averages are same
- Find three element from different three arrays such that a + b + c = sum
- Queries on substring palindrome formation
- Count of index pairs with equal elements in an array
- Boggle | Set 2 (Using Trie)
- Maximum difference between frequency of two elements such that element having greater frequency is also greater
- Friends Pairing Problem
- Printing all solutions in N-Queen Problem
- Minimum steps to reach target by a Knight | Set 1
- Count binary strings with k times appearing adjacent two set bits
- Program for FCFS CPU Scheduling | Set 1
- Check if reversing a sub array make the array sorted
- Minimum operations required to remove an array
- Find all triplets with zero sum
- Number of subsequences in a string divisible by n
- Print consecutive characters together in a line
- Pizza cut problem (Or Circle Division by Lines)
- Check if a Binary Tree contains duplicate subtrees of size 2 or more
- Program for Worst Fit algorithm in Memory Management
- Number with maximum number of prime factors
- Nearest element with at-least one common prime factor
- Type of array and its maximum element
- A permutation where each element indicates either number of elements before or after it
- Sort array after converting elements to their squares
- Sort all even numbers in ascending order and then sort all odd numbers in descending order
- Find N'th item in a set formed by sum of two arrays
- Program for Banker's Algorithm | Set 1 (Safety Algorithm)
- Make largest palindrome by changing at most K-digits
- Word formation using concatenation of two dictionary words
- Find largest word in dictionary by deleting some characters of given string
- Largest divisible subset in array
- Count of strings that can be formed using a, b and c under given constraints
- Maximum edge removal from tree to make even forest
- Find the missing number in a string of numbers with no separator
- Count substrings with same first and last characters
- Find the Deepest Node in a Binary Tree
- Sum of nodes at k-th level in a tree represented as string
- Print all full nodes in a Binary Tree
- Convert decimal fraction to binary number
- Find sum of non-repeating (distinct) elements in an array
- Number of pair of positions in matrix which are not accessible
- Find the largest multiple of 3 from array of digits | Set 2 (In O(n) time and O(1) space)
- Move all occurrences of an element to end in a linked list
- Deletion from a Circular Linked List
- Iterative program to count leaf nodes in a Binary Tree
- Finding LCM of more than two (or array) numbers without using GCD
- Prufer Code to Tree Creation
- Count the number of subarrays having a given XOR
- Find the next identical calendar year
- Nth Square free number
- Binary Search Tree insert with Parent Pointer
- Doubly Circular Linked List | Set 2 (Deletion)
- Smallest length string with repeated replacement of two distinct adjacent
- Find first non matching leaves in two binary trees
- Largest subset of Graph vertices with edges of 2 or more colors
- Count of arrays in which all adjacent elements are such that one of them divide the another
- Reverse string without using any temporary variable
- Number of sink nodes in a graph
- How to implement decrease key or change key in Binary Search Tree?
- Binary Search for Rational Numbers without using floating point arithmetic
- Lexicographically minimum string rotation | Set 1
- Generate all binary permutations such that there are more or equal 1's than 0's before every point in all permutations
- Print All Distinct Elements of a given integer array
- Program to add two polynomials
- How to check if given four points form a square
- Connected Components in an undirected graph
- Greedy Algorithm to find Minimum number of Coins
- Remove recurring digits in a given number
- Check if a sorted array can be divided in pairs whose sum is k
- Print level order traversal line by line | Set 1
- Iterative Search for a key 'x' in Binary Tree
- Linked List | Set 1 (Introduction)
- Doubly Linked List | Set 1 (Introduction and Insertion)
- Delete all occurrences of a given key in a linked list
- Find Length of a Linked List (Iterative and Recursive)
- Delete last occurrence of an item from linked list
- Stack | Set 3 (Reverse a string using stack)
- Number of subtrees having odd count of even numbers
- Minimum number of Appends needed to make a string palindrome
- Move spaces to front of string in single traversal
- Clustering/Partitioning an array such that sum of square differences is minimum
- Find distance from root to given node in a binary tree
- Count full nodes in a Binary tree (Iterative and Recursive)
- Count numbers whose sum with x is equal to XOR with x
- Binary representation of next greater number with same number of 1's and 0's
- TimSort
- Threaded Binary Search Tree | Deletion
- Reverse an array without using subtract sign ‘-‘ anywhere in the code
- First element occurring k times in an array
- K-th Element of Two Sorted Arrays
- Left-Child Right-Sibling Representation of Tree
- Print array of strings in sorted order without copying one string into another
- Determine if a string has all Unique Characters
- Find index of an extra element present in one sorted array
- Shortest Uncommon Subsequence
- Averages of Levels in Binary Tree
- Find the n-th number made of even digits only
- Biggest number by arranging numbers in certain order
- Program to find Smallest and Largest Word in a String
- Program to remove vowels from a String
- Maximum value of an integer for which factorial can be calculated on a machine
- Removing punctuations from a given string
- Print numbers 1 to N using Indirect recursion
- Toggle case of a string using Bitwise Operators
- Minimum edge reversals to make a root
- Output of Java program | Set 22 (Overloading)
- Sum of divisors of factorial of a number
- First negative integer in every window of size k
- Sum of product of all pairs of array elements
- Check if two numbers are bit rotations of each other or not
- Iterative method to check if two trees are mirror of each other
- Program to calculate the value of sin(x) and cos(x) using Expansion
- Convert a given Binary Tree to Circular Doubly Linked List | Set 2
- Check whether given string can be generated after concatenating given strings
- String containing first letter of every word in a given string with spaces
- URLify a given string (Replace spaces is %20)
- Maximizing Unique Pairs from two arrays
- Program for Least Recently Used (LRU) Page Replacement algorithm
- Find mirror of a given node in Binary tree
- Print the path common to the two paths from the root to the two given nodes
- Reverse vowels in a given string
- Find minimum value to assign all array elements so that array product becomes greater
- Count of only repeated element in a sorted array of consecutive elements
- Non-overlapping sum of two sets
- Boyer Moore Algorithm | Good Suffix heuristic
- Bubble sort using two Stacks
- Count pairs from two sorted arrays whose sum is equal to a given value x
- Find number of diagonals in n sided convex polygon
- Find Corners of Rectangle using mid points
- Length of the transverse common tangent between the two non intersecting circles
- Program to find line passing through 2 Points
- Check if a string is Isogram or not
- Multistage Graph (Shortest Path)
- Check if absolute difference of consecutive nodes is 1 in Linked List
- Find a pair of elements swapping which makes sum of two arrays same
- Check if an array represents Inorder of Binary Search tree or not
- Print all permutation of a string using ArrayList
- Find the sum of last n nodes of the given Linked List
- Sum of product of all elements of sub-arrays of size k
- Maximize matrix as per given condition
- Count pairs from two linked lists whose sum is equal to a given value
- Find the Sub-array with sum closest to 0
- Count quadruples from four sorted arrays whose sum is equal to a given value x
- Given a number as a string, find the number of contiguous subsequences which recursively add up to 9 | Set 2
- Largest number in BST which is less than or equal to N
- All unique triplets that sum up to a given value
- Find k-th bit in a binary string created by repeated invert and append operations
- Keyword Cipher
- Program for Shortest Job First (SJF) scheduling | Set 2 (Preemptive)
- Print the string after the specified character has occurred given no. of times
- Remove duplicates from a sorted doubly linked list
- Remove duplicates from an unsorted doubly linked list
- Squareroot(n)-th node in a Linked List
- Print last k digits of a^b (a raised to power b)
- Shuffle 2n integers in format {a1, b1, a2, b2, a3, b3, ......, an, bn} without using extra space
- Null Cipher
- Print odd positioned nodes of odd levels in level order of the given binary tree
- Find an element in Bitonic array
- Iterative method to find ancestors of a given binary tree
- Minimum rotations required to get the same string
- Maximize a given unsigned number number by swapping bits at it's extreme positions.
- Find mirror image of a point in 2-D plane
- Convert all substrings of length 'k' from base 'b' to decimal
- Preorder Successor of a Node in Binary Tree
- Range query for Largest Sum Contiguous Subarray
- Check if binary representation of a given number and its complement are anagram
- Check if a string is Pangrammatic Lipogram
- Longest Prime Subarray after removing one element
- Next greater element in same order as input
- Minimum Index Sum for Common Elements of Two Lists
- Calculate number of nodes between two vertices in an acyclic Graph by Disjoint Union method
- Counts Path in an Array
- Remove brackets from an algebraic string containing + and - operators
- Check if a large number can be divided into two or more segments of equal sum
- Remove minimum number of elements such that no common element exist in both array
- Find if an array contains a string with one mismatch
- Check whether right angled triangle is valid or not for large sides
- Adding elements of an array until every element becomes greater than or equal to k
- Sum of all even numbers in range L and R
- Count subarrays with equal number of occurrences of two given elements
- Merge two sorted lists (in-place)
- Sort first half in ascending and second half in descending order | 1
- Length of the smallest sub-string consisting of maximum distinct characters
- Remove three consecutive duplicates from string
- Sum and Product of Prime Frequencies of Characters in a String
- Generating distinct subsequences of a given string in lexicographic order
- Sum triangle from array
- Balance pans using given weights that are powers of a number
- Print the nodes at odd levels of a tree
- Check if a grid can become row-wise and column-wise sorted after adjacent swaps
- Best meeting point in 2D binary array
- All possible binary numbers of length n with equal sum in both halves
- Maximum number of unique prime factors
- Minimum number of Square Free Divisors
- Sort an array according to absolute difference with a given value "using constant extra space"
- Check if two unsorted arrays (with duplicates allowed) have same elements
- Count all triplets whose sum is equal to a perfect cube
- Sum of upper triangle and lower triangle
- Pattern Printing question asked in CGI Coding Round
- Lexicographically smallest permutation of {1, .. n} such that no. and position do not match
- Count number of digits after decimal on dividing a number
- Minimum operation to make all elements equal in array
- Insert a node after the n-th node from the end
- Check if a graphs has a cycle of odd length
- Possible moves of knight
- Number of substrings with count of each character as k
- Find substrings that contain all vowels
- Count unset bits of a number
- Array range queries over range queries
- Convert singly linked list into circular linked list
- Maximize the binary matrix by filpping submatrix once
- Remove array end element to maximize the sum of product
- Lexicographically first alternate vowel and consonant string
- Permutations to arrange N persons around a circular table
- K-th ancestor of a node in Binary Tree
- Generate two output strings depending upon occurrence of character in input string.
- Sort string of characters
- Right view of Binary Tree using Queue
- Number of ways to arrange N items under given constraints
- Count single node isolated sub-graphs in a disconnected graph
- Unique element in an array where all elements occur k times except one
- Maximum possible XOR of every element in an array with another array
- Kth ancestor of a node in binary tree | Set 2
- Largest number with one swap allowed
- Linked List Sum of Nodes Between 0s
- Check if a string is suffix of another
- Sudo Placement[1.4] | BST Traversal
- Longest alternating sub-array starting from every index in a Binary Array
- Generate all passwords from given character set
- Check whether a number has exactly three distinct factors or not
- Sub-tree with minimum color difference in a 2-coloured tree
- Longest Repeated Subsequence
- Check if a two character string can be made using given words
- Node having maximum sum of immediate children and itself in n-ary tree
- Sort a Rotated Sorted Array
- Next Larger element in n-ary tree
- Replace nodes with duplicates in linked list
- Number of triangles that can be formed
- Number of subarrays having absolute sum greater than K | Set-2
- Combinations in a String of Digits
- Maximize value of (a[i]+i)*(a[j]+j) in an array
- Count of strings where adjacent characters are of difference one
- k-th missing element in increasing sequence which is not present in a given sequence
- Lexicographically smallest string whose hamming distance from given string is exactly K
- Generate permutations with only adjacent swaps allowed
- Tile Stacking Problem
- Check if two BSTs contain same set of elements
- Print k numbers where all pairs are divisible by m
- Secretary Problem (A Optimal Stopping Problem)
- Pairs of Positive Negative values in an array
- Given a HUGE number check if it's a power of two.
- Remove all consecutive duplicates from the string
- Direction of a Point from a Line Segment
- Cumulative frequency of count of each element in an unsorted array
- Index Mapping (or Trivial Hashing) with negatives allowed
- Count of strings that can be formed from another string using each character at-most once
- Even numbers at even index and odd numbers at odd index
- Queries for the product of first N factorials
- Program to sort string in descending order
- Lexicographically smallest permutation with distinct elements using minimum replacements
- Double Base Palindrome
- Distinct permutations of the string | Set 2
- Minimum number of elements to add to make median equals x
- Average numbers in array
- Replace a character c1 with c2 and c2 with c1 in a string S
- Count all 0s which are blocked by 1s in binary matrix
- Remove all characters other than alphabets from string
- Recursive insertion and traversal linked list
- Root to leaf path with maximum distinct nodes
- Check whether the given array is perfect or not
- Largest increasing subsequence of consecutive integers
- Binary tree to string with brackets
- Make three non-empty sets with negative, positive and 0 products
- Sort an array with swapping only with a special element is allowed
- Sorting using trivial hash function
- Binary String of given length that without a palindrome of size 3
- Maximum consecutive numbers present in an array
- Count sub-arrays which have elements less than or equal to X
- Minimum Word Break
- Prime factors of a big number
- Frequency of a substring in a string
- Find index of closing bracket for a given opening bracket in an expression
- Smallest number whose set bits are maximum in a given range
- Next word that does not contain a palindrome and has characters from first k
- Construct lexicographically smallest palindrome
- Print Longest Palindromic Subsequence
- Camel case of a given sentence
- Minimum jumps to reach last building in a matrix
- Program to find the minimum (or maximum) element of an array
- Split the string into substrings using delimiter
- Minimum cost to construct a string
- Queries for maximum difference between prime numbers in given ranges
- Count subarrays where second highest lie before highest
- Game of replacing array elements
- DFS traversal of a tree using recursion
- Print n smallest elements from given array in their original order
- Number of ways to insert a character to increase the LCS by one
- Encrypt string with product of number of vowels and consonants in substring of size k
- Construct a graph from given degrees of all vertices
- A backtracking approach to generate n bit Gray Codes
- Form the largest palindromic number using atmost two swaps
- Count number of increasing subsequences of size k
- Reverse a Doubly Linked List | Set-2
- First common element in two linked lists
- Find the size of largest subset of anagram words
- Sorting array of strings (or words) using Trie | Set-2 (Handling Duplicates)
- Number of ways to form a heap with n distinct integers
- Count subarrays with equal number of 1's and 0's
- Check whether a binary tree is a full binary tree or not | Iterative Approach
- Program for triangular patterns of alphabets
- Possible edges of a tree for given diameter, height and vertices
- Minimum difference between groups of size two
- Iterative searching in Binary Search Tree
- Value of k-th index of a series formed by append and insert MEX in middle
- Postorder traversal of Binary Tree without recursion and without stack
- Subsequence queries after removing substrings
- Reverse a Doubly Linked List | Set 4 (Swapping Data)
- Find max of two Rational numbers
- Maximum occurring character in an input string | Set-2
- Find LCM of rational numbers
- Find a string in lexicographic order which is in between given two strings
- Growable array based stack
- Max occurring divisor in an interval
- How to traverse through all values for a given key in multimap?
- Java Program to find largest element in an array
- Latin alphabet cipher
- Median and Mode using Counting Sort
- Minimum array element changes to make its elements 1 to N
- Insertion Sort by Swapping Elements
- Convert string X to an anagram of string Y with minimum replacements
- Reduce Hamming distance by swapping two characters
- Find the Degree of a Particular vertex in a Graph
- Find number of pairs in an array such that their XOR is 0
- Water Connection Problem
- Count maximum-length palindromes in a String
- Row wise sorting in 2D array
- Lexicographical concatenation of all substrings of a string
- Stable sort for descending order
- Sum of the alphabetical values of the characters of a string
- Balanced expressions such that given positions have opening brackets
- Height of a generic tree from parent array
- Largest value in each level of Binary Tree
- Print alternate nodes of a linked list using recursion
- Maximum number of trailing zeros in the product of the subsets of size k
- Linked List Pair Sum
- Print the alternate nodes of linked list (Iterative Method)
- Alternate Odd and Even Nodes in a Singly Linked List
- Majority element in a linked list
- Count pairs from two sorted matrices with given sum
- Consecutive sequenced numbers in a string
- Total numbers with no repeated digits in a range
- Modify a binary tree to get preorder traversal using right pointers only
- N Queen in O(n) space
- Print Binary Tree levels in sorted order | Set 2 (Using set)
- HCF of array of fractions (or rational numbers)
- Iterative program to Calculate Size of a tree
- Non-Repeating Element
- Insertion sort to sort even and odd positioned elements in different orders
- Sum of products of all combination taken (1 to n) at a time
- Array Index with same count of even or odd numbers on both sides
- Minimum operations to make two numbers equal
- Row-wise vs column-wise traversal of matrix
- Top three elements in binary tree
- Maximum occurring character in a linked list
- Time taken by Loop unrolling vs Normal loop
- Check whether bits are in alternate pattern in the given range | Set-2
- Primality Test | Set 5(Using Lucas-Lehmer Series)
- Longest Path with Same Values in a Binary Tree
- Sum of maximum elements of all possible sub-arrays of an array
- Convert String into Binary Sequence
- Find common elements in three linked lists
- Insertion in Unrolled Linked List
- Find the only repetitive element between 1 to n-1
- Function to copy string (Iterative and Recursive)
- Check if any valid sequence is divisible by M
- Sort the linked list in the order of elements appearing in the array
- Rank of an element in a stream
- Check if two strings are permutation of each other
- Number of recycled pairs in an array
- Schedule jobs so that each server gets equal load
- Find one extra character in a string
- Get maximum left node in binary tree
- Delete array elements which are smaller than next or become smaller
- Largest subset with maximum difference as 1
- Number of subarrays with m odd numbers
- Maximum Perimeter Triangle from array
- Rat in a Maze with multiple steps or jump allowed
- Minimal moves to form a string by adding characters or appending string itself
- Space optimization using bit manipulations
- Maximum Subarray Sum Excluding Certain Elements
- Count subarrays with same even and odd elements
- Find largest d in array such that a + b + c = d
- Leftover element after performing alternate Bitwise OR and Bitwise XOR operations on adjacent pairs
- Count substrings with each character occurring at most k times
- Find unique elements in linked list
- Largest of two distinct numbers without using any conditional statements or operators
- Array range queries for searching an element
- Check if two people starting from different points ever meet
- Check if linked list is sorted (Iterative and Recursive)
- K'th Largest element in BST using constant extra space
- Sum of all elements of N-ary Tree
- Level order traversal with direction change after every two levels
- Find the Largest Cube formed by Deleting minimum Digits from a number
- Count numbers formed by given two digit with sum having given digits
- Hill Cipher
- Two Dimensional Segment Tree | Sub-Matrix Sum
- Arithmetic Number
- Making elements of two arrays same with minimum increment/decrement
- Lexicographical Maximum substring of string
- Program for Gauss-Jordan Elimination Method
- Number of children of given node in n-ary Tree
- Print BST keys in given Range | O(1) Space
- Generate n-bit Gray Codes | Set 2
- Find sub-string with given power
- Maximum in an array that can make another array sorted
- Program to reverse a string (Iterative and Recursive)
- Find the value of N XOR'ed to itself K times
- Maximum adjacent difference in an array in its sorted form
- Euler tour of Binary Tree
- Lexicographically Kth smallest way to reach given coordinate from origin
- Ways to choose three points with distance between the most distant points <= L
- Convert BST to Max Heap
- Count pairs with set bits sum equal to K
- Reverse String according to the number of words
- Postorder successor of a Node in Binary Tree
- System of Linear Equations in three variables using Cramer's Rule
- Maximum product quadruple (sub-sequence of size 4) in array
- Largest set with bitwise OR equal to n
- Partition negative and positive without comparison with 0
- Add n binary strings
- Subtract 1 without arithmetic operators
- Find the only element that appears b times
- Longest arithmetic progression with the given common difference
- Longest subarray such that adjacent elements have at least one common digit | Set 1
- Print concentric rectangular pattern in a 2d matrix
- Multiset Equivalence Problem
- Reverse nodes of a linked list without affecting the special characters
- Vieta's Formulas
- Infix to Prefix conversion using two stacks
- Queries for number of array elements in a range with Kth Bit Set
- Find the number of operations required to make all array elements Equal
- Sum of multiplication of triplet of divisors of a number
- Move first element to end of a given Linked List
- Recursive program to generate power set
- BigInteger andNot() Method in Java
- Repeated Character Whose First Appearance is Leftmost
- Delete leaf nodes with value k
- Duplicates in an array in O(n) time and by using O(1) extra space | Set-3
- Minimum number of prefix reversals to sort permutation of first N numbers
- Number of permutations such that sum of elements at odd index and even index are equal
- Print all distinct integers that can be formed by K numbers from a given array of N numbers
- kth smallest/largest in a small range unsorted array
- Number of sequences which has HEAD at alternate positions to the right of the first HEAD
- Sum of K largest elements in BST using O(1) Extra space
- Rearrange a Linked List in Zig-Zag fashion | Set-2
- nth Rational number in Calkin-Wilf sequence
- Number of Larger Elements on right side in a string
- Count number of steps to cover a distance if steps can be taken in powers of 2
- Permutation of a string with maximum number of characters greater than its adjacent characters
- Minimum element left from the array after performing given operations
- Sudo Placement | Placement Tour
- Check if concatenation of two strings is balanced or not
- Count of elements of an array present in every row of NxM matrix
- Longest Common Prefix Matching | Set-6
- Sort an array where a subarray of a sorted array is in reverse order
- Sudo Placement[1.3] | Playing with Stacks
- Sudo Placement[1.3] | Final Destination
- Implement a stack using singly linked list
- Check if a number has same number of set and unset bits
- Merge first half and reversed second half of the linked list alternatively
- Sudo Placement[1.4] | Jumping the Subtree
- Sum of all maximum frequency elements in Matrix
- Sum of all odd frequency elements in a Matrix
- Longest Common Subsequence | DP using Memoization
- Edit distance and LCS (Longest Common Subsequence)
- Find index of first occurrence when an unsorted array is sorted
- Elements of first array that have more frequencies
- Merge Sort with O(1) extra space merge and O(n lg n) time
- Sum of elements in range L-R where first half and second half is filled with odd and even numbers
- Sudo Placement[1.5] | Partition
- Sudo Placement[1.5] | Wolfish
- Absolute difference between the first X and last X Digits of N
- Sum of cousin nodes of a given node in a BST
- Floor in Binary Search Tree (BST)
- Average of ASCII values of characters of a given string
- Find the multiple of x which is closest to a^b
- Number of elements smaller than root using preorder traversal of a BST
- Check if all array elements are distinct
- Sort first half in ascending and second half in descending order | Set 2
- Print all the pairs that contains the positive and negative values of an element
- Longest substring with count of 1s more than 0s
- Minimum length of jumps to avoid given array of obstacles
- Count number of Distinct Substring in a String
- Shortest distance between two nodes in an infinite binary tree
- Find indices of all occurrence of one string in other
- Time difference between expected time and given time
- Minimize the difference between minimum and maximum elements
- Maximum value of XOR among all triplets of an array
- Flatten a binary tree into linked list | Set-2
- Delete array element in given index range [L - R]
- Total sum except adjacent of a given node in BST
- Next Smaller Element
- Counting frequencies of array elements
- First strictly greater element in a sorted array in Java
- Difference between fundamental data types and derived data types
- Number of divisors of product of N numbers
- Lowest Common Ancestor in Parent Array Representation
- Find the maximum node at a given level in a binary tree
- Balanced expressions such that given positions have opening brackets | Set 2
- Check if Queue Elements are pairwise consecutive
- Modulo power for large numbers represented as strings
- Root to leaf path sum equal to a given number in BST
- Preorder from Inorder and Postorder traversals
- FIFO (First-In-First-Out) approach in Programming
- Program to count number of distinct Squares and Cubes upto N
- Count number of primes in an array
- Count ways to reach a score using 1 and 2 with no consecutive 2s
- Lexicographically smallest permutation of a string with given subsequences
- Program to find sum of the given sequence
- Remove duplicates from a string in O(1) extra space
- Sum of the nodes of a Singly Linked List
- Program to invert bits of a number Efficiently
- Solve the Logical Expression given by string
- Total character pairs from two strings, with equal number of set bits in their ascii value
- Find all angles of a triangle in 3D
- Longest dividing subsequence
- Design an online book reader system
- Balance a string after removing extra brackets
- Search an Element in Doubly Circular Linked List
- Maximize the product of four factors of a Number
- Find a palindromic string B such that given String A is a subsequense of B
- Check if given string can be formed by two other strings or their permutations
- Delete every Kth node from circular linked list
- Count all pairs of adjacent nodes whose XOR is an odd number
- Program to Find the value of cos(nΘ)
- Print the number of set bits in each node of a Binary Tree
- Minimum and Maximum prime numbers in an array
- Sum and Product of all Prime Nodes of a Singly Linked List
- Count Unary Numbers in a Range
- Divide an array into K subarray with the given condition
- Find the winner of the Game to Win by erasing any two consecutive similar alphabets
- Find number of magical pairs of string of length L
- Generating numbers that are divisor of their right-rotations
- Numbers less than N which are product of exactly two distinct prime numbers
- Ways to write N as sum of two or more positive integers | Set-2
- Find the Second Largest Element in a Linked List
- Check if two Linked Lists are permutations of each other
- Program to calculate the value of nCr Efficiently
- Check whether the two Binary Search Trees are Identical or Not
- Understanding The Coin Change Problem With Dynamic Programming
- Find column with maximum sum in a Matrix
- Find row with maximum sum in a Matrix
- Find the largest good number in the divisors of given number N
- How to access elements of a Square Matrix
- Insert a node in Binary Search Tree Iteratively
- Meta Binary Search | One-Sided Binary Search
- Find Sum of pair from two arrays with maximum sum
- Sum of all the prime numbers in a given range
- Check whether the given number is Euclid Number or not
- Pair of prime numbers with a given sum and minimum absolute difference
- Delete all the even nodes of a Circular Linked List
- Find the product of last N nodes of the given Linked List
- Program to print Spiral Pattern
- Product of all leaf nodes of binary tree
- Sum of Fibonacci Numbers with alternate negatives
- Print Sum and Product of all Non-Leaf nodes in Binary Tree
- Product of non-repeating (distinct) elements in an Array
- Product of all prime numbers in an Array
- Program to replace every space in a string with hyphen
- Check if suffix and prefix of a string are palindromes
- Minimum number of nodes in an AVL Tree with given height
- Product of the alternate nodes of linked list
- Sum of the alternate nodes of linked list
- Kth prime number greater than N
- Find the longest common prefix between two strings after performing swaps on second string
- Find the common nodes in two singly linked list
- Program to find sum of 1 + x/2! + x^2/3! +...+x^n/(n+1)!
- Sum and Product of maximum and minimum element in Binary Tree
- Remove even frequency characters from the string
- Sum of Fibonacci numbers at even indexes upto N terms
- Sub-strings having exactly k characters that have ASCII value greater than p
- Count triplets in a sorted doubly linked list whose product is equal to a given value x
- Sort prime numbers of an array in descending order
- Maximize the sum of array by multiplying prefix of array with -1
- Count the numbers < N which have equal number of divisors as K
- Check if all the palindromic sub-strings are of odd length
- Reduce the string by removing K consecutive identical characters
- Linked List Product of Nodes Between 0s
- Lexicographically largest string formed from the characters in range L and R
- Search in a sorted 2D matrix (Stored in row major order)
- Check if a given tree graph is linear or not
- How to Remove Duplicates from ArrayList in Java
- Print all nodes between two given levels in Binary Tree
- Check whether bitwise OR of N numbers is Even or Odd
- Remove characters from string that appears strictly less than K times
- Replace all occurrences of pi with 3.14 in a given string
- Find length of longest Fibonacci like subsequence
- Maximum number of Unique integers in Sub-Array of given size
- Get K-th letter of the decoded string formed by repeating substrings
- Find the smallest after deleting given elements
- String after processing backspace characters
- Replace every elements in the array by its frequency in the array
- Number of leading zeros in binary representation of a given number
- Maximizing the elements with a[i+1] > a[i]
- Find array elements with frequencies in range [l , r]
- Remove elements from the array whose frequency lies in the range [l, r]
- Assign other value to a variable from two possible values
- Longest subarray in which all elements are greater than K
- Problem of 8 Neighbours of an element in a 2-D Matrix
- Check whether a number has consecutive 0's in the given base or not
- Find subsequences with maximum Bitwise AND and Bitwise OR
- Replace consonants with next immediate consonants alphabetically in a String
- Convert all lowercase characters to uppercase whose ASCII value is co-prime with k
- Replace all consonants with nearest vowels in a string
- Array elements with prime frequencies
- Sum and Product of all the nodes which are less than K in the linked list
- Number of ways to partition a string into two balanced subsequences
- Count subarrays with all elements greater than K
- Count and Sum of composite elements in an array
- Lexicographically smallest string formed by removing at most one character
- Maximum number of contiguous array elements with same number of set bits
- Print nodes of linked list at given indexes
- Check whether it is possible to make both arrays equal by modifying a single element
- De Bruijn sequence | Set 1
- Count of Prime Nodes of a Singly Linked List
- Find maximum distance between any city and station
- Program to find Prime Numbers Between given Interval
- Sum and Product of all Composite numbers which are divisible by k in an array
- Check whether all the rotations of a given number is greater than or equal to the given number or not
- Sum of every K’th prime number in an array
- Check whether frequency of characters in a string makes Fibonacci Sequence
- Product of all the Composite Numbers in an array
- Program to find the smallest element among three elements
- XOR of Prime Frequencies of Characters in a String
- Longest subarray with elements having equal modulo K
- Count occurrences of the average of array elements with a given number
- Number of sub-arrays that have at least one duplicate
- Find number from given list for which value of the function is closest to A
- Minimum number of elements to be removed so that pairwise consecutive elements are same
- Rearrange a string in the form of integer sum followed by the minimized character
- Multiplication of two polynomials using Linked list
- Find if array has an element whose value is half of array sum
- Find a number that divides maximum array elements
- Count the number of rectangles such that ratio of sides lies in the range [a,b]
- Sort elements of array whose modulo with K yields P
- Aronson's Sequence
- Array implementation of queue (Simple)
- Paths with maximum number of 'a' from (1, 1) to (X, Y) vertically or horizontally
- Difference between a Static Queue and a Singly Linked List
- Print all numbers less than N with at-most 2 unique digits
- Check whether count of distinct characters in a string is Prime or not
- Search a node in Binary Tree
- Largest right circular cone that can be inscribed within a sphere
- Largest cube that can be inscribed within a right circular cone
- Find all numbers that divide maximum array elements
- Generate a sequence with the given operations
- Check if the array has an element which is equal to product of remaining elements
- Sort perfect squares in an array at their relative positions
- Common prime factors of two numbers
- Total number of subsets in which the product of the elements is even
- Largest cube that can be inscribed within a right circular cylinder
- Count pairs with Bitwise XOR as EVEN number
- Minimum element of each row and each column in a matrix
- Program to convert the diagonal elements of the matrix to 0
- Find largest number smaller than N with same set of digits
- Sorting rows of matrix in descending order followed by columns in ascending order
- Sum of elements in an array having prime frequency
- Final string after performing given operations
- Sum of elements whose square root is present in the array
- Level Order Successor of a node in Binary Tree
- Check if array can be sorted with one swap
- Find smallest and largest element from square matrix diagonals
- Minimum number of moves to make all elements equal
- Second Chance (or Clock) Page Replacement Policy
- Find the largest interval that contains exactly one of the given N integers.
- Find alphabet in a Matrix which has maximum number of stars around it
- Time taken by two persons to meet on a circular track
- Number of comparisons in each direction for m queries in linear search
- Delete all Non-Prime Nodes from a Singly Linked List
- Rearrange all elements of array which are multiples of x in decreasing order
- Sum of Bitwise-OR of all subarrays of a given Array | Set 2
- Number of sub-strings which are anagram of any sub-string of another string
- Find maximum among all right nodes in Binary Tree
- Check if a triplet with given sum exists in BST
- Ceiling of every element in same array
- Buddy Memory Allocation Program | Set 1 (Allocation)
- Digits of element wise sum of two arrays into a new array
- Number of Paths of Weight W in a K-ary tree
- Buddy Memory Allocation Program | Set 2 (Deallocation)
- Sum of elements in an array with frequencies greater than or equal to that element
- Find a sub matrix with maximum XOR
- Sort the array in a given index range
- Find k-th character of decrypted string | Set - 2
- Remove all continuous occurrences of 'a' and all occurrences of 'b'
- Count numbers upto N which are both perfect square and perfect cube
- Subtraction in the Array
- Average of remaining elements after removing K largest and K smallest elements from array
- Count the number of special permutations
- Count all Grandparent-Parent-Child Triplets in a binary tree whose sum is greater than X
- Substring Reverse Pattern
- Largest palindromic prime in an array
- Sum of elements from an array having even parity
- Check if the string satisfies the given condition
- Flatten a binary tree into linked list | Set-3
- Count of numbers which can be made power of 2 by given operation
- Count of Numbers in Range where first digit is equal to last digit of the number
- Minimum number of operations required to sum to binary string S
- Split a string in equal parts such that all parts are palindromes
- Number of array elements derivable from D after performing certain operations
- Print first N terms of series (0.25, 0.5, 0.75, ...) in fraction representation
- Minimize the maximum minimum difference after one removal from array
- Count distinct substrings that contain some characters at most k times
- Length of Diagonal of a n-sided regular polygon
- Count number of pairs (i, j) such that arr[i] * arr[j] > arr[i] + arr[j]
- Minimum absolute difference between N and a power of 2
- Finding in and out degrees of all vertices in a graph
- Maximum value of arr[i] % arr[j] for a given array
- Generate permutation of 1 to N such that absolute difference of consecutive numbers give K distinct integers
- Check if all the elements can be made of same parity by inverting adjacent elements
- Smallest multiple of 3 which consists of three given non-zero digits
- Ways to paint N paintings such that adjacent paintings don't have same colors
- Check if a number can be expressed as sum two abundant numbers
- Ternary Search
- Find nth term of the series 5 2 13 41
- Find Pth term of a GP if Mth and Nth terms are given
- Count distinct elements in an array
- Difference between Sum of Cubes and Sum of First N Natural Numbers
- Replace each node with its Surpasser Count in Linked List
- Program to check if a number is divisible by any of its digits
- Generate lexicographically smallest string of 0, 1 and 2 with adjacent swaps allowed
- Check if a number can be represented as a sum of 2 triangular numbers
- Print numbers such that no two consecutive numbers are co-prime and every three consecutive numbers are co-prime
- Make Binary Search Tree
- Number of unique pairs in an array
- Minimum replacements to make adjacent characters unequal in a ternary string
- Minimum replacements such that the difference between the index of the same characters is divisible by 3
- Form lexicographically smallest string with minimum replacements having equal number of 0s, 1s and 2s
- Modify the string by swapping continuous vowels or consonants
- Maximize the subarray sum after multiplying all elements of any subarray with X
- Maximize the value of x + y + z such that ax + by + cz = n
- Maximum money that can be withdrawn in two steps
- Number of sub-strings that contain the given character exactly k times
- Maximum size of sub-array that satisfies the given condition
- Lexicographically largest sub-sequence of the given string
- Iterative Method To Print Left View of a Binary Tree
- Count triplet pairs (A, B, C) of points in 2-D space that satisfy the given condition
- Find the integers that doesnot ends with T1 or T2 when squared and added X
- Distribute candies in a Binary Tree
- Sum of minimum elements of all possible sub-arrays of an array
- Find the number of points that have atleast 1 point above, below, left or right of it
- Find sub-matrix with the given sum
- Count possible moves in the given direction in a grid
- Number of strings that satisfy the given condition
- Print Leaf Nodes at a given Level
- Program to implement Run Length Encoding using Linked Lists
- Check whether the point (x, y) lies on a given line
- Generate a random permutation of elements from range [L, R] (Divide and Conquer)
- Merge K sorted arrays | Set 3 ( Using Divide and Conquer Approach )
- Minimize the sum of the squares of the sum of elements of each group the array is divided into
- Delete nodes which have a greater value on right side using recursion
- Program to construct a DFA which accept the language L = {a
^{n}b^{m}| n mod 2=0, m≥1} - Search element in a Spirally sorted Matrix
- Count of numbers between range having only non-zero digits whose sum of digits is N and number is divisible by M
- Minimum removals to make array sum odd
- Maximum Bitwise AND pair from given range
- Print All Leaf Nodes of a Binary Tree from left to right | Set-2 ( Iterative Approach )
- Count array elements that divide the sum of all other elements
- Longest sub-sequence of array containing Lucas numbers
- Number of submatrices with all 1s
- Find Nth positive number whose digital root is X
- Bitwise AND of N binary strings
- Number of trailing zeroes in base B representation of N!
- Sum of minimum element of all subarrays of a sorted array
- k-th missing element in an unsorted array
- Count all elements in the array which appears at least K times after their first occurrence
- Two equal sum segment range queries
- Character pairs from two strings with even sum
- Minimum matches the team needs to win to qualify
- Minimum cost to make a string free of a subsequence
- Given number of matches played, find number of teams in tournament
- Find Nth term of the series 1, 6, 18, 40, 75, ....
- Find Nth term of the series 1, 5, 32, 288 ...
- Longest double string from a Palindrome
- Minimum sum path between two leaves of a binary tree
- Maximize the summation of numbers in a maximum of K moves in range [L, R]
- Print all the sum pairs which occur maximum number of times
- Print the last k nodes of the linked list in reverse order | Iterative Approaches
- Sum of the series (1*2) + (2*3) + (3*4) + ...... upto n terms
- Count of a, b & c after n seconds for given reproduction rate
- Smallest integer > 1 which divides every element of the given array
- Encrypt a string by repeating i-th character i times
- Maximum number that can be display on Seven Segment Display using N segments
- Sum of (maximum element - minimum element) for all the subsets of an array.
- Print Binary Tree levels in sorted order | Set 3 (Tree given as array)
- Minimum steps to make all the elements of the array divisible by 4
- Distinct state codes that appear in a string as contiguous sub-strings
- Find sum of a[i]%a[j] for all valid pairs
- Find the most valued alphabet in the String
- Print leaf nodes in binary tree from left to right using one stack
- Reverse Anti Clockwise Spiral Traversal of a Binary Tree
- Count of numbers from range [L, R] whose sum of digits is Y
- Program to Encrypt a String using ! and @
- Last digit of Product of two Large or Small numbers (a * b)
- Count how many times the given digital clock shows identical digits
- Search an element in given N ranges
- Minimum cuts required to convert a palindromic string to a different palindromic string
- Count maximum elements of an array whose absolute difference does not exceed K
- First string from the given array whose reverse is also present in the same array
- Count of pairs from 1 to a and 1 to b whose sum is divisible by N
- Minimum changes required such that the string satisfies the given condition
- Check if Matrix remains unchanged after row reversals
- Smallest and Largest N-digit perfect squares
- Find if the given number is present in the infinite sequence or not
- Generate all the binary strings of N bits
- Maximum trace possible for any sub-matrix of the given matrix
- Minimum value among AND of elements of every subset of an array
- Check if the given array can be reduced to zeros with the given operation performed given number of times
- Count sub-arrays whose product is divisible by k
- Minimum steps to delete a string by deleting substring comprising of same characters
- Maximum sum from three arrays such that picking elements consecutively from same is not allowed
- Find a distinct pair (x, y) in given range such that x divides y
- Minimum cost to reach end of array array when a maximum jump of K index is allowed
- Find the index of the element in an array which divides most elements before it
- Number of ways of scoring R runs in B balls with at most W wickets
- Programs for printing pyramid patterns using recursion
- Loss when two items are sold at same price and same percentage profit/loss
- Sum of Fibonacci Numbers in a range
- Maximum sub-tree sum in a Binary Tree such that the sub-tree is also a BST
- Maximum volume of cube for every person when edge of N cubes are given
- Determine the number of squares of unit area that a given line will pass through.
- Count nodes with two children at level L in a Binary Tree
- Spanning Tree With Maximum Degree (Using Kruskal's Algorithm)
- Sum of degrees of all nodes of a undirected graph
- Replace array elements by sum of next two consecutive elements
- Count the number of non-increasing subarrays
- Print all leaf nodes of a binary tree from right to left
- Pairs of strings which on concatenating contains each character of "string"
- Generate original array from difference between every two consecutive elements
- Generate all binary strings of length n with sub-string "01" appearing exactly twice
- Length of the longest substring that do not contain any palindrome
- Minimum steps to color the tree with given colors
- Find the final radiations of each Radiated Stations
- Find original numbers from gcd() every pair
- Count the number of pairs (i, j) such that either arr[i] is divisible by arr[j] or arr[j] is divisible by arr[i]
- Maximum number of people that can be killed with strength P
- Sum of the series Kn + ( K(n-1) * (K-1)1 ) + ( K(n-2) * (K-1)2 ) + ....... (K-1)n
- Number of ways of choosing K equal substrings of any length for every query
- Find the number of binary strings of length N with at least 3 consecutive 1s
- Find the number of integers x in range (1,N) for which x and x+1 have same number of divisors
- Reduce the fraction to its lowest form
- Lazy Propagation in Segment Tree | Set 2
- Shell-Metzner Sort
- Check if two strings are same ignoring their cases
- Find the number of sub arrays in the permutation of first N natural numbers such that their median is M
- Sum of all the levels in a Binary Search Tree
- Check if matrix A can be converted to B by changing parity of corner elements of any submatrix
- Length of the normal from origin on a straight line whose intercepts are given
- Number of subsequences with zero sum
- Find the maximum possible value of a[i] % a[j] over all pairs of i and j
- Maximize the maximum subarray sum after removing atmost one element
- Sum of elements in 1st array such that number of elements less than or equal to them in 2nd array is maximum
- Given a string and an integer k, find the kth sub-string when all the sub-strings are sorted according to the given condition
- Count different numbers possible using all the digits their frequency times
- Remove all occurrences of any element for maximum array sum
- Print all numbers whose set of prime factors is a subset of the set of the prime factors of X
- Highest power of a number that divides other number
- Sum of the series 1, 2, 4, 3, 5, 7, 9, 6, 8, 10, 11, 13.. till N-th term
- Reverse alternate k characters in a string
- Count of sub-strings that contain character X at least once
- Check if given two straight lines are identical or not
- Minimum cost to modify a string
- Find the position of box which occupies the given ball
- Check if string can be made lexicographically smaller by reversing any substring
- Find sum of factorials in an array
- Find the Diameter or Longest chord of a Circle
- Number of character corrections in the given strings to make them equal
- Maximum length of subarray such that sum of the subarray is even
- Sliding Window Maximum (Maximum of all subarrays of size k) using stack in O(n) time
- Count of strings whose prefix match with the given string to a given length k
- Sum of all parent-child differences in a Binary Tree
- Shortest distance from the centre of a circle to a chord
- Radius of the circle when the width and height of an arc is given
- Length of direct common tangent between the two non-intersecting Circles
- Length of direct common tangent between two intersecting Circles
- Shortest distance between a point and a circle
- Print even positioned nodes of even levels in level order of the given binary tree
- Count pairs with average present in the same array
- Minimizing array sum by applying XOR operation on all elements of the array
- Count unique numbers that can be generated from N by adding one and removing trailing zeros
- Minimum number of cubes whose sum equals to given number N
- Rat and Poisoned bottle Problem
- Longest alternative parity subsequence
- Number of positions such that adding K to the element is greater than sum of all other elements
- Largest even number that can be formed by any number of swaps
- Find the largest Perfect Subtree in a given Binary Tree
- Iterative Postorder traversal | Set 3
- Check if the robot is within the bounds of the grid after given moves
- Convert Directed Graph into a Tree
- Make lexicographically smallest palindrome by substituting missing characters
- Count number of subsets whose median is also present in the same subset
- Bellman Ford Algorithm (Simple Implementation)
- Choose X such that (A xor X) + (B xor X) is minimized
- Print characters having odd frequencies in order of occurrence
- Ratio of the distance between the centers of the circles and the point of intersection of two direct common tangents to the circles
- Minimum integer such that it leaves a remainder 1 on dividing with any element from the range [2, N]
- Minimum operations required to change the array such that |arr[i] - M| <= 1
- Minimum number of given operations required to reduce the array to 0 element
- Program to find the rate percentage from compound interest of consecutive years
- Find prime number K in an array such that (A[i] % K) is maximum
- K-th ancestor of a node in Binary Tree | Set 3
- Delete all even elements from a stack
- Minimum sum obtained from groups of four elements from the given array
- Create linked list from a given array
- Count squares with odd side length in Chessboard
- Check if the number is valid when flipped upside down
- Minimum number of sub-strings of a string such that all are power of 5
- Bitwise AND of sub-array closest to K
- Find letter's position in Alphabet using Bit operation
- Create new linked list from two given linked list with greater element at each node
- Number of trees whose sum of degrees of all the vertices is L
- Queries for bitwise OR in the index range [L, R] of the given array
- Find the last non repeating character in string
- Generate all unique partitions of an integer | Set 2
- Check if the given Prufer sequence is valid or not
- Print an N x M matrix such that each row and column has all the vowels in it
- Find N distinct numbers whose bitwise Or is equal to K
- Count the nodes of the given tree whose weighted string is a palindrome
- Count the nodes of the tree whose weighted string contains a vowel
- Exterior angle of a cyclic quadrilateral when the opposite interior angle is given
- Factorial of an Array of integers
- Find the permutation p from the array q such that q[i] = p[i+1] - p[i]
- Fibonacci Power
- Print the degree of every node from the given Prufer sequence
- Distance between centers of two intersecting circles if the radii and common chord length is given
- Print the node with the maximum degree in the prufer sequence
- Count duplicates in a given linked list
- Find the largest possible k-multiple set
- Length of the perpendicular bisector of the line joining the centers of two circles
- Find the number of Chicks in a Zoo at Nth day
- Check if the two given stacks are same
- Find the smallest positive number missing from an unsorted array : Hashing Implementation
- Sum of XOR of all sub-arrays of length K
- Length of the largest substring which have character with frequency greater than or equal to half of the substring
- Count pairs of characters in a string whose ASCII value difference is K
- Find a way to fill matrix with 1's and 0's in blank positions
- Maximum distance between two unequal elements
- Number of ways to split a binary number such that every part is divisible by 2
- Count of adjacent Vowel Consonant Pairs
- Gap Buffer Data Structure
- Largest sub-string where all the characters appear at least K times
- Construct the Rooted tree by using start and finish time of its DFS traversal
- Run Length Decoding in Linked List
- Find if a binary matrix exists with given row and column sums
- Area of a Regular Pentagram
- Create a Sorted Array Using Binary Search
- Count Distinct Rectangles in N*N Chessboard
- Number of sub-sequence such that it has one consecutive element with difference less than or equal to 1
- Total number of odd length palindrome sub-sequence around each centre
- Print Upper Hessenberg matrix of order N
- Find the node with minimum value in a Binary Search Tree using recursion
- Number of ways to get a given sum with n number of m-faced dices
- Order of indices which is lexicographically smallest and sum of elements is <= X
- Count pairs of elements such that number of set bits in their OR is B[i]
- Add Two Numbers Represented by Linked Lists | Set 3
- Minimum operations to make sum of neighbouring elements <= X
- Queries for number of distinct elements from a given index till last index in an array
- Maximum number of region in which N non-parallel lines can divide a plane
- Kth smallest element in the array using constant space when array can't be modified
- Print first N terms of Lower Wythoff sequence
- Delete Nth node from the end of the given linked list
- Number of possible permutations when absolute difference between number of elements to the right and left are given
- Find K vertices in the graph which are connected to at least one of remaining vertices
- Check whether str1 can be converted to str2 with the given operations
- Number of elements from the array which are reachable after performing given operations on D
- Find the minimum number of elements that should be removed to make an array good
- Construct a DFA which accept the language L = {w | w ∈ {a,b}* and Na(w) mod 3 = Nb (w) mod 3}
- Bitonic point in the given linked list
- Construct a DFA which accept the language L = {a
^{n}b^{m}| n > =1, (m) mod 3 = 1} - Reverse a Linked List in groups of given size (Iterative Approach)
- Smallest number greater or equals to N such that it has no odd positioned bit set
- Find a subarray whose sum is divisible by size of the array
- Pair with a given sum in BST | Set 2
- Find the minimum absolute difference in two different BST's
- Pair with minimum absolute difference | BST
- Add one to a number represented as linked list | Set 2
- Find the number of paths of length K in a directed graph
- Partition the string in two parts such that both parts have at least k different characters
- Sort an array without changing position of negative numbers
- Find the position of the given row in a 2-D array
- Unbounded Fractional Knapsack
- Find Leftmost and Rightmost node of BST from its given preorder traversal
- Find a partition point in array to maximize its xor sum
- Check if the given n-ary tree is a binary tree
- Length of longest subarray in which elements greater than K are more than elements not greater than K
- Count of strings in the first array which are smaller than every string in the second array
- Find distinct characters in distinct substrings of a string
- Check if it is possible to redistribute the Array
- Count of non-overlapping sub-strings "101" and "010" in the given binary string
- Programs to print Triangle and Diamond patterns using recursion
- Number of Quadruples with GCD equal to K
- Decimal to Binary using recursion and without using power operator
- Remove Minimum coins such that absolute difference between any two piles is less than K
- Count total set bits in all numbers from 1 to n | Set 2
- Maximum length palindromic substring such that it starts and ends with given char
- Print the lexicographically smallest array by swapping elements whose sum is odd
- Find the number of words of X vowels and Y consonants that can be formed from M vowels and N consonants
- Distinct strings such that they contains given strings as sub-sequences
- Case-specific sorting of Strings in O(n) time and O(1) space
- Minimum Bitwise OR operations to make any two array elements equal
- Partition the array in K segments such that bitwise AND of individual segment sum is maximized
- Count ways to divide circle using N non-intersecting chord | Set-2
- Count equal pairs from given string arrays
- Check if a number is Fermat Pseudoprime
- Find k ordered pairs in array with minimum difference d
- Maximum length sub-array which satisfies the given conditions
- Program to Find the Incenter of a Triangle
- Divide the array in K segments such that the sum of minimums is maximized
- Find array such that no subarray has xor zero or Y
- Sum of the Tan(x) expansion upto N terms
- Find the number of occurrences of a character upto preceding position
- Maximum sum contiguous nodes in the given linked list
- Count of elements that can be deleted without disturbing the mean of the initial array
- Find prime numbers in the first half and second half of an array
- Minimum number of times A has to be repeated such that B is a substring of it
- Print Binary Search Tree in Min Max Fashion
- Euler zigzag numbers ( Alternating Permutation )
- Find smallest positive number Y such that Bitwise AND of X and Y is Zero
- Square root of a number without using sqrt() function
- Program for sum of cosh(x) series upto Nth term
- Modular Exponentiation of Complex Numbers
- Check if the product of every contiguous subsequence is different or not in a number
- Find the kth smallest number with sum of digits as m
- Rearrange the characters of the string such that no two adjacent characters are consecutive English alphabets
- Ramanujan Prime
- Quadruplet pair with XOR zero in the given Array
- Maximum Bitwise AND value of subsequence of length K
- Largest substring with same Characters
- Sum of prime numbers without odd prime digits
- Maximum number of elements without overlapping in a Line
- Remove Nth node from end of the Linked List
- FCFS Disk Scheduling Algorithms
- Sum of the sums of all possible subsets
- Find the number of cells in the table contains X
- How to learn Pattern printing easily?
- Find the smallest positive number missing from an unsorted array | Set 3
- Check whether two points (x1, y1) and (x2, y2) lie on same side of a given line or not
- Find the maximum sum of digits of the product of two numbers
- Find the Deepest Node in a Binary Tree Using Queue STL - SET 2
- Lexicographical smallest alternate Array
- Equal Sum and XOR of three Numbers
- Minimum number of Binary strings to represent a Number
- Number of Subsequences with Even and Odd Sum
- Count Set-bits of number using Recursion
- Minimize the cost of buying the Objects
- Sum of digits with even number of 1's in their binary representation
- Remove duplicates from unsorted array using Set data structure
- Find the smallest positive number which can not be represented by given digits
- Sum of all natural numbers from L to R ( for large values of L and R )
- Number of Subsequences with Even and Odd Sum | Set 2
- Count all the permutation of an array
- Find all numbers between range L to R such that sum of digit and sum of square of digit is prime
- Minimum given operations required to convert a given binary string to all 1's
- Reverse every word of the string except the first and the last character
- Count inversions in an array | Set 4 ( Using Trie )
- First N terms whose sum of digits is a multiple of 10
- Sand Timer Flip Counting Problem
- Check if a number is Flavius Number
- Swap Alternate Boundary Pairs
- Probability such that two subset contains same number of elements
- Sum of elements till the smallest index such that there are no even numbers to its right
- Program to find the next prime number
- Count the number of elements which are greater than any of element on right side of an array
- Position of Elements which are equal to sum of all Preceding elements
- Queries for rotation and Kth character of the given string in constant time
- Number of substrings that start with "geeks" and end with "for"
- Maximum XOR of Two Numbers in an Array
- Delete the last leaf node in a Binary Tree
- Find Kth element in an array containing odd elements first and then even elements
- Nth Fibonacci number using Pell's equation
- Area of the largest square that can be formed from the given length sticks using Hashing
- Generate N integers satisfying the given conditions
- Comparing X^Y and Y^X for very large values of X and Y
- Largest substring of str2 which is a prefix of str1
- Count the values greater than X in the modified array
- Print even positioned nodes of odd levels in level order of the given binary tree
- Print odd positioned nodes of even levels in level order of the given binary tree
- Find permutation with maximum remainder Sum
- Reverse the given string in the range [L, R]
- Maximum OR value of a pair in an array
- Print characters having even frequencies in order of occurrence
- Queries for the smallest and the largest prime number of given digit
- Count of numbers below N whose sum of prime divisors is K
- Find the count of subsequences where each element is divisible by K
- Generate an array having Bitwise AND of the previous and the next element
- Count occurrences of a prime number in the prime factorization of every element from the given range
- Make the list non-decreasing by changing only one digit of the elements
- Write a function to get the intersection point of two Linked Lists | Set 2
- Replace elements with absolute difference of smallest element on left and largest element on right
- Number of Subarrays with positive product
- Find number of subarrays with XOR value a power of 2
- Find the minimum capacity of the train required to hold the passengers
- Count total unset bits in all the numbers from 1 to N
- Find the sum of all possible pairs in an array of N elements
- Find out the prime numbers in the form of A+nB or B+nA
- Count of triples (A, B, C) where A*C is greater than B*B
- Count the number of subsequences of length k having equal LCM and HCF
- Contiguous unique substrings with the given length L
- Count of subsets not containing adjacent elements
- Sum of the digits of square of the given number which has only 1's as its digits
- XOR of elements in an array having prime frequency
- Queries to check whether all the elements in the given range occurs even number of times
- Sum of squares of all Subsets of given Array
- Array containing power of 2 whose XOR and Sum of elements equals X
- Find third number such that sum of all three number becomes prime
- Count of Multiples of A ,B or C less than or equal to N
- Total ways of selecting a group of X men from N men with or without including a particular man
- Find the number of strings formed using distinct characters of a given string
- Nth number in a set of multiples of A , B or C
- Check if all elements of binary array can be made 1
- Find numbers which are multiples of first array and factors of second array
- Find the possible permutation of the bits of N
- Count of N-digit numbers in base K with no two consecutive zeroes
- Largest sub-matrix with all equal elements
- Print nodes having maximum and minimum degrees
- QuickSelect (A Simple Iterative Implementation)
- Find Partition Line such that sum of values on left and right is equal
- Minimize the cost of partitioning an array into K groups
- Sum of Digits of the Good Strings
- Minimum halls required for class scheduling
- Find the count of natural Hexadecimal numbers of size N
- Find a pair (n,r) in an integer array such that value of nCr is maximum
- Maximize the expression (A AND X) * (B AND X) | Bit Manipulation
- Minimum number of substrings the given string can be splitted into that satisfy the given conditions
- Sum of numbers in a range [L, R] whose count of divisors is prime
- Minimum number of additons to make the string balanced
- Maximum number of line intersections formed through intersection of N planes
- Program to find Nth odd Fibonacci Number
- Longest Increasing Subsequence using Longest Common Subsequence Algorithm
- Count of N-bit binary numbers without leading zeros
- Find the next fibonacci number
- Find missing elements from an Array
- Maximum Sum of Products of two arrays by toggling adjacent bits
- Divide the array into minimum number of sub-arrays having unique elements
- Find the minimum value of X for an expression
- Minimum increment or decrement operations required to make the array sorted
- Largest Even and Odd N-digit numbers in Octal Number System
- Number of coloured 0's in an N-level hexagon
- Queries to find the count of characters preceding the given location
- Program to print the Diagonals of a Matrix
- Count number of ways to arrange first N numbers
- Count non-adjacent subsets from numbers arranged in Circular fashion
- Minimum, maximum and average price values for all the items of given type
- Number of ways N can be divided into four parts to construct a rectangle
- Length of the longest subsegment which is UpDown after inserting atmost one integer
- Finding the converging element of the diagonals in a square matrix
- Find the deleted value from the array when average of original elements is given
- Probability that a random pair chosen from an array (a[i], a[j]) has the maximum sum
- Count of matchsticks required to represent the given number
- Number of K length subsequences with minimum sum
- Maximum number of times str1 appears as a non-overlapping substring in str2
- Generate an array B[] from the given array A[] which satisfies the given conditions
- Number of subsets whose mean is maximum
- Sum of all the numbers in the Nth parenthesis
- Calculate the Sum of GCD over all subarrays
- Minimum numbers with one's place as 9 to be added to get N
- Number of cells in the Nth order figure
- Find parent of each node in a tree for multiple queries
- Find distance of nodes from root in a tree for multiple queries
- Sum of all the numbers in the Nth row of the given triangle
- Check if a given number is factorial of any number
- Make the array non-decreasing with the given operation
- Count of pairs in an array such that the highest power of 2 that divides their product is 1
- Find the number of positive integers less than or equal to N that have an odd number of digits
- Number of index pairs such that s[i] and s[j] are anagrams
- Increasing permutation of first N natural numbers
- Coxeter method to construct the magic square
- Minimize sum by dividing all elements of a subarray by K
- Count of integers obtained by replacing ? in the given string that give remainder 5 when divided by 13
- Find count of pair of nodes at even distance
- Check if given path between two nodes of a graph represents a shortest paths
- Maximum sum of minimums of pairs in an array
- Find the player who will win the Coin game
- Minimum number of moves to reach N starting from (1, 1)
- Find the number of squares inside the given square grid
- Maximum circular subarray sum of size K
- Find the smallest subarray having atleast one duplicate
- Count of subsets with sum equal to X
- Sum of all the numbers present at given level in Modified Pascal’s triangle
- Count of squares that can be drawn without lifting the pencil
- Number of subsets with a given AND value
- Longest sub-sequence with minimum LCM
- Number of subsets with a given OR value
- Sum of subsets of all the subsets of an array | O(2^N)
- Sum of subsets of all the subsets of an array | O(N)
- Longest subsequence whose sum is divisible by a given number
- Find all palindrome numbers of given digits
- Number of non-decreasing sub-arrays of length less than or equal to K
- Maximum number of splits of a binary number
- Longest subsequence with a given AND value | O(N)
- Check the divisibility of Hexadecimal numbers
- Convert a Singly Linked List to an array
- Permute the elements of an array following given order
- Form N by adding 1 or 2 in minimum number of operations X where X is divisible by M
- Minimum difference between any two primes from the given range
- Maximum prime moves to convert X to Y
- Longest subsequence with a given OR value : Dynamic Programming Approach
- Program for nth Fuss–Catalan Number
- Rearrange array elements such that Bitwise AND of first N - 1 elements is equal to last element
- Smallest subarray with GCD as 1 | Segment Tree
- Number of subsets with sum divisible by M | Set 2
- Find the sum of remaining sticks after each iterations
- Maximum sum subarray of even length
- Diameter of a Binary Indexed Tree with N nodes
- Check whether a node is leaf node or not for multiple queries
- Convert a String to a Singly Linked List
- Calculate the number of set bits for every number from 0 to N
- Check whether the given decoded string is divisible by 6
- Minimum possible travel cost among N cities
- Find the parent of a node in the given binary tree
- Form a Spiral Matrix from the given Array
- Index of character depending on frequency count in string
- N consecutive ropes problem
- Minimum cost to reverse edges such that there is path between every pair of nodes
- Sum of the updated array after performing the given operation
- Clockwise rotation of Doubly Linked List by N places
- Maximize sum by choosing elements from different section of a matrix
- Maximum frequency of a remainder modulo 2
^{i} - Maximum number of consecutive 1's in binary representation of all the array elements
- Compare numbers represented by Linked Lists
- Minimum operations required to make the string satisfy the given condition
- Check if there exists a connected graph that satisfies the given conditions
- Find extra element in the second array
- Maximum possible remainder when an element is divided by other element in the array
- Program to show Belady's Anomaly
- Number of subsequences of maximum length K containing no repeated elements
- Maximum possible array sum after performing the given operation
- Minimize the number by changing at most K digits
- Sum of all the prime numbers with the maximum position of set bit ≤ D
- Count of times second string can be formed from the characters of first string
- Maximize distance between any two consecutive 1's after flipping M 0's
- Maximum possible GCD after replacing at most one element in the given array
- Count of indices in an array that satisfy the given condition
- Count of integers from the range [0, N] whose digit sum is a multiple of K
- Check if the level order traversal of a Binary Tree results in a palindrome
- Restore a permutation from the given helper array
- Check if there exists a prime number which gives Y after being repeatedly subtracted from X
- Minimum cost to partition the given binary string
- Minimize the sum of digits of A and B such that A + B = N
- Check whether the given string is Palindrome using Stack
- Find an integer in the given range that satisfies the given conditions
- Sum of all N digit palindrome numbers
- Longest subsequence having difference atmost K
- Reduce the number to minimum multiple of 4 after removing the digits
- Print all palindrome dates between the given years
- Minimum cells to be flipped to get a 2*2 submatrix with equal elements
- Count of nodes that are greater than Ancestors
- Count of primes below N which can be expressed as the sum of two primes
- Goldbach's Weak Conjecture for Odd numbers
- Find all the possible remainders when N is divided by all positive integers from 1 to N+1
- Maximum sum combination from the given array
- Find the final number obtained after performing the given operation
- Check if a symmetric plus is possible from the elements of the given array
- Check if given string contains all the digits
- Winner in the Rock-Paper-Scissor game using Bit manipulation
- Print all perfect squares from the given range
- Count subarrays such that remainder after dividing sum of elements by K gives count of elements
- Minimum steps to get 1 at the center of a binary matrix
- Number of cells in a matrix that satisfy the given condition
- Create a sorted linked list from the given Binary Tree
- Count of subarrays having exactly K distinct elements
- Find if the glass will be empty or not when the rate of drinking is given
- Minimum count of Full Binary Trees such that the count of leaves is N
- Knapsack with large Weights
- Remove one element to get minimum OR value
- Remove one element to get maximum XOR
- Number of subsequences in a given binary string divisible by 2
- Remove minimum numbers from the array to get minimum OR value
- Number of subsequences with positive product
- Remove vowels from a string stored in a Binary Tree
- Count the total number of triangles after Nth operation
- Number of pairs in an array having sum equal to product
- Queries On Array with disappearing and reappearing elements
- Number of sub-sequences of non-zero length of a binary string divisible by 3
- Longest sub-sequence of a binary string divisible by 3
- Check if N rectangles of equal area can be formed from (4 * N) integers
- Minimum cost to traverse from one index to another in the String
- Minimum cost to reach from the top-left to the bottom-right corner of a matrix
- Number of trailing zeros in N * (N - 2) * (N - 4)*....
- Maximum XOR value of maximum and second maximum element among all possible subarrays
- Prime Numbers present at Kth level of a Binary Tree
- Count of 1's in any path in a Binary Tree
- Radius of the inscribed circle within three tangent circles
- Find two numbers with the given LCM and minimum possible difference
- Problem in comparing Floating point numbers and how to compare them correctly?
- Maximum product of sum of two contiguous subarrays of an array
- Smallest number greater than n that can be represented as a sum of distinct power of k