## Count all Prime Length Palindromic Substrings

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

- How can one become good at Data structures and Algorithms easily?
- Load Factor and Rehashing
- Implementing a Linked List in Java using Class
- Sum of cousins of a given node in a Binary Tree
- Insert a node at a specific position in a linked list
- Rat in a Maze | Backtracking using Stack
- Maximize the total profit of all the persons
- Sort the array of strings according to alphabetical order defined by another string
- Find the node with maximum value in a Binary Search Tree
- Number of array elements derivable from D after performing certain operations
- Remove last node of the linked list
- Print all nodes between two given levels in Binary Tree
- Sum of all the elements in an array divisible by a given number K
- Applications of Graph Data Structure
- Number of sub-strings which are anagram of any sub-string of another string
- Subtree of all nodes in a tree using DFS
- Find the maximum node at a given level in a binary tree
- Delete all the even nodes from a Doubly Linked List
- Fibonacci Heap - Deletion, Extract min and Decrease key
- How do Dynamic arrays work?
- Print all odd nodes of Binary Search Tree
- Sum and Product of minimum and maximum element of Binary Search Tree
- Count all Grandparent-Parent-Child Triplets in a binary tree whose sum is greater than X
- Find maximum among all right nodes in Binary Tree
- Check if the elements of stack are pairwise sorted
- Product of all nodes in a Binary Tree
- Check whether the two Binary Search Trees are Identical or Not
- Find the product of last N nodes of the given Linked List
- Root to leaf path product equal to a given number
- Sum and Product of the nodes of a Circular Singly Linked List which are divisible by K

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

Stack A stack is a linear data structure in which elements can be inserted and deleted only from one side of the list, called the… Read More »

Given a linked list containing N nodes and a positive integer k should be less than or equal to N. The task is to print… Read More »

Given an integer K and an array arr[] of N integers which contains the ids of the opened apps in a system where arr[0] is… Read More »

Given two integer arrays arr[] and cost[] where cost[i] is the cost of choosing arr[i]. The task is to choose a subset with at least… Read More »

Given a N x M matrix which represents the number of rows and number of columns respectively. Each cell of a matrix is occupied by… Read More »

Given an integer K and a matrix of N rows and M columns, the task is to find the minimum number of operations required to… Read More »

Given a NxN matrix and an integer X. The task is to remove X rows and X columns from the NxN matrix. Remove first X… Read More »

Given N segments (or ranges) represented by two non-negative integers L and R. Divide these segments into two non-empty groups such that there are no… Read More »

Given an integer K and a numeric string str (all the characters are from the range [‘0’, ‘9’]). The task is to count the number… Read More »

Given a matrix mat[][] containing the characters [1 – 9], P and * where P is a person and * is an empty space. An… Read More »

Given a starting position ‘k’ and two jump sizes ‘d1’ and ‘d2’, our task is to find the minimum number of jumps needed to reach… Read More »

Given a Binary Tree, return following value for it. For every level, compute sum of all leaves if there are leaves at this level. Otherwise… Read More »

Prerequisite: XOR Linked List – A Memory Efficient Doubly Linked List | Set 1 XOR Linked List – A Memory Efficient Doubly Linked List |… Read More »

Given an expression string, write a python program to find whether a given string has balanced parentheses or not. Examples: Input : {[]{()}} Output :… Read More »