Concepts Used BFS , Recursion Difficulty Level Easy Problem Statement : Given a binary tree, our task is to print the height of the tree. Consider root node height as...
Concepts Used DFS , Recursion, Hashing Difficulty Level Hard Problem Statement : Given a binary tree, our task is to return the maximum count of distinct integers present in a...
Concepts Used DFS , Recursion, Stack Difficulty Level Medium Problem Statement : Given a Binary Tree, convert it into its mirror. See original problem statement here Solution Approach : Introduction:...
CONCEPTS USED: Sorting DIFFICULTY LEVEL: Medium PROBLEM STATEMENT(SIMPLIFIED): Given an array A containing N bulbs placed on the road of length L, these bulbs can be placed at any point...
Concepts Used Queue, Basic Implementation Difficulty Level Easy Problem Statement : You are given a binary tree, you need to print the average of each level of the tree. See...
Concepts Used Strings Difficulty Level Medium Problem Statement (Simplified): For a number given to us, we have to print a number less than or equal to the given number, and...
Concepts Used: Sorting Difficulty Level: Easy Problem Statement (Simplified): For a given array find the length of largest sorted sub-array in it, but if the current array is not sorted,...
Concepts Used: Mathematics Difficulty Level: Easy Problem Statement (Simplified): Print gcd of two given numbers. gcd(m,n) is the largest number possible which divides both. See original problem statement here Test...
In this article, we will delve deep into the topic of finding the greatest common divisor, GCD of two numbers. Understanding how to find the GCD of two numbers not...
Concepts Used: Sorting Difficulty Level: Easy Problem Statement (Simplified): We have to print the array containing 0s, 1s and 2s in non-decreasing order. See original problem statement here Test Case:...
Concepts Used: Sorting Difficulty Level: Medium Problem Statement (Simplified): You're provided an array containing N elements, you have to answer q queries. In each query, you're provided with x and...
Concepts Used: Sorting Difficulty Level: Easy Problem Statement (Simplified): Find how many elements change their place after sorting array. See original problem statement here Test case: Input: 1 5 8...
Concepts Used: Strings Difficulty Level: Medium Problem Statement (Simplified): For a given number between 0 and 4000, print out it's Roman Form. See original problem statement here Test Case: Input:...
Concepts Used: Strings, Basic Mathematics Difficulty Level: Easy Problem Statement (Simplified): Print the maximum length of string which can be formed such that the number of a is more than...
Palindrome string is a string which is the same on reading from the front side as well as on the rear side. Example of a palindrome string is “NAMAN” as...
Concepts Used: Mathematics Difficulty Level: Medium Problem Statement (Simplified): For a given number N, find the sum of first N primes which don't contain any odd prime digits (3,5,7) in...
Concepts Used: Mathematics Difficulty Level: Medium Problem Statement (Simplified): Perform following operations until one number becomes 0 and print the total number of operations. 1) Subtract larger number from smaller...
In the realm of problem-solving and data manipulation, uncovering the missing element in a sequence embedded within a string can be a perplexing yet intriguing task. This article delves into...
Concepts Used: Mathematics Difficulty Level: Hard Problem Statement (Simplified): For given three numbers r,p,q. We have to find the total number of values divisible by r in a range [p,q]....
Concepts Used Strings Difficulty Level Hard Problem Statement (Simplified): Print the decimal output of fraction of two given numbers and enclose the repeating part in decimal places in brackets. For...
Concepts Used: Mathematics Difficulty Level: Medium Problem Statement (Simplified): For a given array of integers print the total number of integers which divides all the array elements and are less...
Concepts Used: Mathematics Difficulty Level: Easy Problem Statement (Simplified): For a given number N, print Yes if it is prime, else print No. Prime Numbers: Numbers that are divisible by...
Concepts Used Strings Difficulty Level Easy Problem Statement (Simplified): For given two strings A and B, print out if B is a substring of A or not. If yes print...
Concepts Used Strings, Sliding Window Algorithm using two pointers Difficulty Level Medium Problem Statement (Simplified): Print the number of substrings containing all three characters i.e. a,b,c at least once in...
Concepts Used Strings, Mathematics Difficulty Level Hard Problem Statement (Simplified): Find if the number given as a string is the power of two or not. Return 1 if yes, else...
CONCEPTS USED: Recursion DIFFICULTY LEVEL: Medium PROBLEM STATEMENT(SIMPLIFIED): Given two characters C1, C2 and an integer K, print all the possible K length combinations of both the characters. Print the...
Concepts Used Linked list,recursion. Difficulty Level Easy. Problem Statement : Given pointer to the head node of a linked list, the task is to reverse the linked list. See original...
CONCEPTS USED: Greedy algorithm,Prim's minimum spanning tree. DIFFICULTY LEVEL: Hard. PROBLEM STATEMENT(SIMPLIFIED): Aman came home after a long time and he wants to visit all the relatives. The total number...
CONCEPTS USED: Greedy algorithm. DIFFICULTY LEVEL: Medium. PROBLEM STATEMENT(SIMPLIFIED): You are given three stacks containing positive numbers. Let S1 be the sum of elements present in stack-1, S2 be the...
CONCEPTS USED: Greedy algorithm. DIFFICULTY LEVEL: Medium. PROBLEM STATEMENT(SIMPLIFIED): Nikhil wants to bring sofa(s) to his room. But he wants to dedicate the entire length of the room to the...