Courses
Tutorials
Jobs
Practice
Contests
Data Structure
Java
Python
HTML
Interview Preparation
Trending Now
DSA
Web Tech
Foundational Courses
Data Science
Practice Problem
Python
Machine Learning
JavaScript
System Design
Django
DevOps Tutorial
Java
C
C++
ReactJS
NodeJS
Web Design
Web Browser
CP Live
Aptitude
Puzzles
Projects
GBlog
Complete DevOps Roadmap - Beginner to Advanced
DevOps is considered a set of practices that combines the abilities of Software Development i.e Dev and IT Operations i.e Ops together, which results in delivering top-not...
Read More
Sum of nodes in a Binary Search Tree with values from a given range
Given a Binary Search Tree consisting of N nodes and two positive integers L and R, the task is to find the sum of values of all the nodes that lie in the range [L, R].Exa...
Read More
Tree
BST
Queue
Searching
Tree Traversals
Binary Search Trees
tree-level-order
DSA
Lowest Common Ancestor of the deepest leaves of a Binary Tree
Given a Binary Tree consisting of N nodes having distinct values from the range [1, N], the task is to find the lowest common ancestor of the deepest leaves of the binary ...
Read More
Tree
tree-traversal
Searching
DFS
LCA
Recursion
Data Structures
DSA
Check if two Stacks are equal or not without alteration
Given two Stacks S1 and S2, the task is to check if both the stacks are equal or not in the same order without losing the original stacks. If both the stacks are equal, th...
Read More
Microsoft
Stack
interview-preparation
Data Structures
DSA
Check if an array of pairs can be sorted by swapping pairs with different first elements
Given an array arr[] consisting of N pairs, where each pair represents the value and ID respectively, the task is to check if it is possible to sort the array by the first...
Read More
Arrays
Sorting
Mathematical
array-rearrange
Swap-Program
DSA
Number of Relations that are both Irreflexive and Antisymmetric on a Set
Given a positive integer N, the task is to find the number of relations that are irreflexive antisymmetric relations that can be formed over the given set of elements. Sin...
Read More
Mathematical
DBMS-Relational Algebra
maths-power
DSA
Count of numbers up to N having at least one prime factor common with N
Given an integer N, the task is to count the number of integers from the range [1, N] having at least one in common prime factor with N other than 1.Examples:Input: N = 5O...
Read More
Mathematical
prime-factor
HCF
euler-totient
Natural Numbers
DSA
Maximum length of all possible K equal length ropes generated by cutting N ropes
Given an array arr[] consisting of N positive integers representing the lengths of N ropes and a positive integer K, the task is to find the maximum length of the rope tha...
Read More
Arrays
Amazon
Binary Search
Greedy
Mathematical
interview-preparation
DSA
Sort an array in increasing order of their Multiplicative Persistence
Given an array arr[] consisting of N positive integers, the task is to sort the array in increasing order with respect to the count of steps required to obtain a single-di...
Read More
Arrays
Sorting
Mathematical
number-digits
array-rearrange
DSA
Queries to update array by adding or multiplying array elements and print the element present at specified index
Given an array arr[] consisting of N integers and an array Q[] of M pairs representing a query of type {X, Y}, the task is to perform queries of the following type:Query(0...
Read More
Arrays
Mathematical
array-range-queries
DSA
Minimize cost of converting all array elements to Fibonacci Numbers
Given an array arr[] consisting of N integers, the task is to minimize the cost of converting all array elements to a Fibonacci Number, where the cost of converting a numb...
Read More
Arrays
Mathematical
Fibonacci
array-rearrange
DSA
Absolute difference between the count of odd and even factors of N
Given a positive integer N, the task is to find the absolute difference of the count of odd and even factors of N.Examples:Input: N = 12Output: 2Explanation: The even fact...
Read More
Misc
Mathematical
sieve
prime-factor
Prime Number
factor
DSA
Make a string non-palindromic by inserting a given character
Given a string S and a character X, the task is to generate a non-palindromic string by inserting the character X in the string S. If it is not possible to obtain a non-pa...
Read More
Strings
palindrome
frequency-counting
DSA
Maximum sum of pairs that are at least K distance apart in an array
Given an array arr[] consisting of N integers and an integer K, the task is to find the maximum sum of pairs of elements that are separated by at least K indices.Examples:...
Read More
Arrays
Mathematical
Competitive Programming
C++ Programs
prefix
DSA
Find the length of Kth N-sided polygon formed by given operations
Given an integer L, representing the side length of an N-sided regular polygon and integer K, the task is to find the side length of the Kth N-sided regular polygon formed...
Read More
Mathematical
Geometric
Geometric-Lines
Coordinate Geometry
DSA
Program to calculate sum of an Infinite Arithmetic-Geometric Sequence
Given three integers A, D, and R representing the first term, common difference, and common ratio of an infinite Arithmetic-Geometric Progression, the task is to find the ...
Read More
Mathematical
series
series-sum
Geometric Progression
Arithmetic Progressions
DSA
1
...
5683
5684
5685
...
10982