## Range Sum Queries and Update with Square Root

Given an array A of N integers and number of queries Q. You have to answer two types of queries. Update [l, r] – for… Read More »

- How can one become good at Data structures and Algorithms easily?
- Cracking Technical Interviews
- Print the nodes of binary tree as they become the leaf node
- Reach the numbers by making jumps of two given lengths
- Lower and Upper Bound Theory
- Shannon-Fano Algorithm for Data Compression
- Rearrange Odd and Even values in Alternate Fashion in Ascending Order
- Dijkstra's shortest path with minimum edges
- Sort the array of strings according to alphabetical order defined by another string
- Sum of similarities of string with all of its suffixes
- How to write a Pseudo Code?
- Check if it is possible to reach a number by making jumps of two given length
- Code Optimization Technique (logical AND and logical OR)
- Dividing a Large file into Separate Modules in C/C++, Java and Python
- Find the number in a range having maximum product of the digits
- Smallest power of 2 which is greater than or equal to sum of array elements
- Iterative Letter Combinations of a Phone Number
- Ternary Search
- Merge K sorted arrays | Set 3 ( Using Divide and Conquer Approach )
- Largest perfect square number in an Array
- Length of the longest alternating subarray
- Smallest Pair Sum in an array
- Number of array elements derivable from D after performing certain operations
- Count distinct substrings that contain some characters at most k times
- Color N boxes using M colors such that K boxes have different color from the box on its left
- Jump Pointer Algorithm
- Choose atleast two elements from array such that their GCD is 1 and cost is minimum
- Find alphabet in a Matrix which has maximum number of stars around it
- Maximize the value of A by replacing some of its digits with digits of B
- Find elements of array using XOR of consecutive elements

Given an array A of N integers and number of queries Q. You have to answer two types of queries. Update [l, r] – for… Read More »

Given an integer a as the side of the square ABCD. The task is to find the area of the leaf AECFA inside the square… Read More »

Given a sequence of Words and the Order of the alphabet. The order of the alphabet is some permutation of lowercase letters. The task is… Read More »

Given a string S of length N consisting of lowercase English letters and an integer K. Find the lexicographically smallest string T of length K,… Read More »

Given a number . The tasks is to check if the given number is a Triperfect Number. Triperfect Number: A Number is a Triperfect Number… Read More »

Given a frustum of height , top-radius & base-radius . The task is to find the volume of biggest right circular cylinder that can be… Read More »

Given a cube of side length a. The task is to find the volume of biggest right circular cylinder that can be inscribed within it.… Read More »

Given the base and height of the parallelogram ABCD are b and h respectively. The task is to calculate the area of the triangle ▲ABM… Read More »

There are people which are to be grouped into exactly teams such that there is at least one person in each team. All members of… Read More »

Given two numbers , find which is greater . If , print a^b is greater If , print b^a is greater If , print Both… Read More »

Given an array of N integers. The task is to find the smallest index of an element such that when multiplied by -1 the sum… Read More »

Given r is the radius of three equal circles touching each other. The task is to find the length of the rope tied around the… Read More »

Given some weights of masses a0, a1, a2, …, a100, a being an integer, and a weighing scale where weights can be put on both… Read More »

Given a K-ary tree, where each node is having K children and each edge has some weight. All the edges i.e. K, that goes from… Read More »

Given X and Y coordinates of N points on a Cartesian plane. The task is to find the number of possible triangles with the non-zero… Read More »