- Trending Categories
- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Sudhir sharma has Published 1206 Articles
sudhir sharma
155 Views
In this problem, we are given two numbers n and d. Our task is to Find the minimum possible digit sum after adding a number d.Problem Description − we need to minimise the digits sum by adding kth multiple of d to n.Let’s take an example to understand the problem, ... Read More
sudhir sharma
475 Views
In this problem, we are given a binary array bin[] consisting n binary values which happen to be 0 and 1. Our task is to find minimum operations needed to make an Array beautiful.Beautiful array is a special type of binary array which consists of a pattern of alternate 0’s ... Read More
sudhir sharma
652 Views
In this problem, we are given an array arr[] consisting of n positive numbers. Our task is to Find minimum number of merge operations to make an array palindrome.Palindrome array are similar to palindrome strings, the elements at index i and n-i should be the same.Example{5, 1, 7, 2, 7, ... Read More
sudhir sharma
119 Views
In this problem, we are given an array arr[] consisting of n positive elements. Our task is to find minimum in an array without using Relational Operators.Relational operators in programming are those operators which are used to check the relationship between two values. Like == (equals), greater than (>), less ... Read More
sudhir sharma
339 Views
In this problem, we are given a binary tree. Our task is to Find Minimum Depth of a Binary Tree.Binary Tree has a special condition that each node can have a maximum of two children.The minimum depth of a binary tree is the shortest path between the root node to ... Read More
sudhir sharma
116 Views
In this problem, we are given an array arr[] of size m representing the lengths of line segments.The line segments are from 0 to arr[0] , arr[0] to arr[1] and so on. Our task is to find the segment which is at the middle of all segments.Let’s take an example ... Read More
sudhir sharma
193 Views
In this problem, we are given a 2D array mat[r][c] whose elements are sorted row-wise. Our task is to Find median in a row-wise sorted matrix.Description − we need to find the median of elements of the matrix.Let’s take an example to understand the problem, Inputmat = { {2, ... Read More
sudhir sharma
117 Views
In this problem, we are given an array arr[] of size n and an integer m. Our task is to Find mean of subarray means in a given array.Code Description − Here, we need to find the mean of array as the mean of means of subarray of size m.Let’s ... Read More
sudhir sharma
434 Views
In this problem, we are given an array arr[] consisting of n elements and an integer k. Our task is to find the Maximum XOR value of a sub-array of size k.Let’s take an example to understand the problem, Inputarr[] = {3, 1, 6, 2 ,7, 9} k = 3Output12ExplanationAll ... Read More
sudhir sharma
109 Views
In this problem, we are given Q queries each of which is one of the following type, Type 1 − insertion (1, i) to add the element with value i, in your data structure.Type 2 − findXOR (2, i), to find the XOR of all elements of the data structure ... Read More