
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
Sunidhi Bansal has Published 1085 Articles

Sunidhi Bansal
790 Views
We are given a positive integer N. The goal is to find the number of operations required to reduce N to 0. Operation applied is N=N-P where P is the smallest prime divisor of P.Let us understand with examplesInput − N=17Output − Count of operations of the given type required ... Read More

Sunidhi Bansal
285 Views
We are given two binary search trees as input and a variable x. The goal is to find pairs of nodes from each tree such that the sum of value of nodes is equal to x. Take node 1 from BST_1 and node 2 from BST_2 and add data part ... Read More

Sunidhi Bansal
215 Views
We are given two arrays containing positive numbers and a value K. The goal is to find unique pairs of elements of arrays such that pairs of type (A, B) has A%B=K or B%A=K and A belongs to the first array and B belongs to the second array.Let us understand ... Read More

Sunidhi Bansal
468 Views
We are given two arrays containing positive numbers and a value x. The goal is to find pairs of elements of arrays such that pairs of type (A, B) has A+B=x and A belongs to the first array and B belongs to the second array.Let us understand with examplesInput − ... Read More

Sunidhi Bansal
208 Views
We are given an array of positive integers. The goal is to find the count of distinct pairs of elements of an array that have at-least one prime member. If the array is [1, 2, 3, 4] then pairs would be (1, 2), (1, 3), (2, 3), (2, 4) and ... Read More

Sunidhi Bansal
278 Views
We are given an array of positive integers. The goal is to find the count of pairs of elements of arr[] such that condition LCM( arr[i], arr[j] ) > minimum of ( arr[i], arr[j] ). That is, the lowest common multiple of elements in a pair is greater than the ... Read More

Sunidhi Bansal
201 Views
We are given an array of numbers. The goal is to find the pair of elements of array such that they hold the conditionIf (i*arr[i] > j*arr[j]) then (arr[i], arr[j]) is a valid pair.If the array is [ 5, 4, 3, 2, 1 ] then pairs will be [3, 1] ... Read More

Sunidhi Bansal
315 Views
We have a sequence generator that starts with 1. At each step 0 becomes 10 and 1 becomes 01. So following changes will occur at consecutive steps −Step 1 − 01Step 2 − 1001Step 3 − 01101001 ……The goal is to find the number of pairs of consecutive 0’s for ... Read More

Sunidhi Bansal
2K+ Views
We are given a string containing an English sentence. The goal is to find the number of words in the string that are palindromes. Palindrome words are those that when read from start or end have the same alphabet sequence. If the sentence is “Madam speaks good Malayalam”, then count ... Read More

Sunidhi Bansal
459 Views
We are given variables x1, x2, y1, y2 representing two points on a 2D coordinate system as (x1, y1) and (x2, y2). The goal is to find all the paths that will have distance equal to the Manhattan distance between these two points.Manhattan DistanceManhattan Distance between two points (x1, y1) ... Read More