
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
1K+ Views
We are given with an array arr[] of N elements. The goal is to find the count of all valid pairs of indexes (i, j) such that either arr[i] is divisible by arr[j] or arr[j] is divisible by arr[i] and i!=j.We will do this by traversing the array arr[] using ... Read More

Sunidhi Bansal
834 Views
We are given an array which contains the length of sides of triangles. The goal is to find the number of possible triangles that can be made by taking any three sides from that array.We will do this by checking if the sum of any two is always > third ... Read More

Sunidhi Bansal
203 Views
We are given two numbers N and K. The goal is to find the count of numbers between 1 and N that have divisors equal to the divisors of K in range [1, N].We will first count the divisors of K in range [1, N] and store in variable count.Now ... Read More

Sunidhi Bansal
245 Views
We are given with an array of distinct elements that are unsorted. The goal is to find the cross lines after the array is sorted. Cross lines are counted as shown below −Arr[]={ 1, 2, 4, 3, 5 } There are 3 cross lines as shown belowArr[]= { 1, 2, ... Read More

Sunidhi Bansal
380 Views
We are given four integers L, R, A and B. The goal is to find the count of numbers in range [L, R] that fully divide either A or B or both.We will do this by traversing from L to R and for each number if number%A==0 or number%B==0 then ... Read More

Sunidhi Bansal
334 Views
We are given with an array of numbers Arr[]. The goal is to count the number of pairs whose difference is equal to the maximum difference of all possible pairs. Count pairs (i!=j) and arr[x]- arr[y] is maximum possible.We will do this by first finding the maximum difference where (i!=j). ... Read More

Sunidhi Bansal
402 Views
We are given with an array of N elements. The goal is to find the count of all pairs (Arr[i], Arr[j]) which have a sum which is a perfect square such that i!=j. That is Arr[i]+Arr[j] is a perfect square.We will do this by calculating the sum of pairs and ... Read More

Sunidhi Bansal
672 Views
We are given with an array of N elements. The goal is to find the count of all pairs (Arr[i], Arr[j]) which have a sum which is a perfect square such that i!=j. That is Arr[i]+Arr[j] is a perfect square.We will do this by calculating the sum of pairs and ... Read More