Sunidhi Bansal has Published 1101 Articles

2-3 Trees - Data Structures and Algorithms in C++

Sunidhi Bansal

Sunidhi Bansal

Updated on 22-Oct-2021 08:56:52

5K+ Views

A 2-3 Tree is a type of tree in data structures in which every node of the tree is either a 2 nodeor 3 nodes. It is a special type of B-Tree with order 3.A 2 node in the tree is one which has one data part and two child ... Read More

Maximize the number of subarrays with XOR as zero in C++

Sunidhi Bansal

Sunidhi Bansal

Updated on 22-Oct-2021 08:54:16

136 Views

We are given an array Arr[] containing integer values. The goal is to find the maximum number of subarrays with XOR as 0. The bits of any subarray can be swapped any number of times.Note:- 1

Maximize the summation of numbers in a maximum of K moves in range [L, R] in C++

Sunidhi Bansal

Sunidhi Bansal

Updated on 22-Oct-2021 08:45:52

81 Views

We are given an array Arr[] containing integers and 2D array Q containing queries. Each query contains 3 values that are lpos, rpos and K. One can move from index i to next index i+1 in a single step or remain in that index. One can move from lpos to ... Read More

Minimum Sum Path In 3-D Array in C++

Sunidhi Bansal

Sunidhi Bansal

Updated on 22-Oct-2021 08:35:04

87 Views

We are given a cube which can be formed using a 3-D array as cube[length][breadth][height]. The task is to calculate the minimum sum path which will be achieved by traversing the cube and hence print the result.Let us see various input output scenarios for this -In − int cube[length][breadth][height] = { ... Read More

Midy’s theorem in C++

Sunidhi Bansal

Sunidhi Bansal

Updated on 22-Oct-2021 08:28:56

155 Views

We are given integer values as a_num that will store the numerator and p_den that will store the denominator which should be a prime number. The task is to check whether the operations performed on a_num after dividing with p_den proves the midy’s theorem or not.Steps to prove Midy’s theorem ... Read More

Maximum Subarray Sum in a given Range in C++

Sunidhi Bansal

Sunidhi Bansal

Updated on 22-Oct-2021 08:23:39

230 Views

We are given with an array of integer elements of any given size. The task is to find the maximum sum which will be calculated by forming the subarrays from the given array within the given range which can be started from any possible index value in an array.Let us ... Read More

Minimize the sum of roots of a given polynomial in C++

Sunidhi Bansal

Sunidhi Bansal

Updated on 22-Oct-2021 08:18:10

58 Views

We are given with an array of integer elements representing the coefficient values of a polynomial. The size of an array will be ‘n’ i.e. number of elements in an array. The degree of polynomial always starts with n-1 as there will be one constant value at the end of ... Read More

Minimum Word Break Problem in C++

Sunidhi Bansal

Sunidhi Bansal

Updated on 22-Oct-2021 07:57:01

171 Views

We are given an array string of words of any given size and the task is to break the words in all possible ways such that after the break the string formed should be a valid string and we have to calculate all such minimum word break as per the ... Read More

Mid-Point Line Generation Algorithm in C++

Sunidhi Bansal

Sunidhi Bansal

Updated on 22-Oct-2021 07:49:54

3K+ Views

A line connects two points. It is a basic element in graphics. To draw a line, you need two points between which you can draw a line on a screen and in terms of graphics we refer to the points as pixels and every pixel is associated with integer coordinates. ... Read More

Maximize the subarray sum after multiplying all elements of any subarray with X in C++

Sunidhi Bansal

Sunidhi Bansal

Updated on 22-Oct-2021 07:42:24

171 Views

We are given with an integer array and an integer variable i.e. ‘X’. The task is to firstly form the subarray from the given array and then multiply all the elements of a subarray with an integer X. At last find out the elements that will contribute the maximum sum.Let ... Read More

Advertisements