
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- 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 1149 Articles

sudhir sharma
228 Views
In this problem, we are given an NxN binary matrix bin[][]. Our task is to find the size of the largest ‘+’ formed by all ones in a binary matrix.Let’s take an example to understand the problem, Input0 1 1 1 1 1 0 1 0Output5Solution ApproachA simple solution to ... Read More

sudhir sharma
302 Views
In this problem, we are given an array consisting of (2n+ 1) integer values. Out of all these values, n elements appear twice in the array and there is only one element in the array that appears once. Our task is to Find single in an array of 2n+1 integer ... Read More

sudhir sharma
221 Views
In this problem, we are given an array of words arr[]. Our task is to find the shortest unique prefix for every word in the given list.Let’s take an example to understand the problem, Inputarr[] = {“learn”, “programming”, “code”}Outputc leap lear pSolution ApproachA simple solution to the problem is by ... Read More

sudhir sharma
896 Views
In this problem, we are given a matrix mat[][]. It defines a path with landmines which are marked as 0. Our task is to Find shortest safe route in a path with landmines.While traversing through the safe path, we need to avoid walking adjacent cells of the landmine (left, right, ... Read More

sudhir sharma
1K+ Views
In this problem, we are given a matrix mat[][] of size N*N. Our task is to Find the row with maximum sum in a Matrix.Let’s take an example to understand the problem, Inputmat[][] = { 8, 4, 1, 9 3, 5, 7, 9 2, 4, 6, 8 ... Read More

sudhir sharma
188 Views
In this problem, we are given a binary matrix in which each row is sorted. Our task is to Find row number of a binary matrix having the maximum number of 1s.Let’s take an example to understand the problem, InputbinMat[][] = { 1, 1, 1, 1 0, 0, ... Read More

sudhir sharma
290 Views
In this problem we are given a binary tree and parent pointers. Our task is to Find right sibling of a binary tree with parent pointers.Let’s take an example to understand the problem, InputNode = 3Output7Solution ApproachA simple solution to the problem is finding the leaf node of the nearest ... Read More

sudhir sharma
244 Views
In this problem we are given five values m, n, mth term, nth term, p. Our task is to Find Pth term of a GP if Mth and Nth terms are given.For a GP, we are given the values of mth term and nth term. Using these values, we need ... Read More

sudhir sharma
187 Views
In this problem we are given four values p, q, r, s. Our task is to Find probability that a player wins when probabilities of hitting the target are given.Here, we have two players who are playing a game of archery. And the probability of player 1 hitting the target ... Read More

sudhir sharma
558 Views
In this problem we are given four values A, B, C, M(a prime number). Our task is to Find power of power under mod of a prime.We simply need to find the value of (A ^ (B ^ C)) (mod M).Let’s take an example to understand the problem, InputA = ... Read More