
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
253 Views
We are given with N no. of participants in a coding competition. The goal is to find the no. of pairs that are possible when a person can pair with at most one other person. So a pair has at most 2 participants. The participants are allowed to take part ... Read More

Sunidhi Bansal
503 Views
We are given with an array of N elements. The goal is to find the index pairs (i, j) which have the same element value such that i!=j. i.e, Arr[i]=Arr[j] and i!=j. This is used to make pairs of gloves of equal size. Out of N gloves only paired gloves ... Read More

Sunidhi Bansal
490 Views
We are given with an array of numbers Arr[]. The goal is to count the number of triplets whose product is equal to the given number p. There can be more than one triplet with the same values but different elements. For example, (1, 2, 3) and (3, 1, 2) ... Read More

Sunidhi Bansal
293 Views
We are given an array of integers, Arr[] and two variables a and b to define a range [a, b]. The goal is to find the number of triplets whose sum lies in between this range [a, b].We will do this by using three for loops. Increment count if arr[i]+arr[j]+arr[k]>=a ... Read More

Sunidhi Bansal
383 Views
We are given a number N. The goal is to count the number of steps required to reduce the number to 1 by following rules −If the number is power of 2, reduce it to its half.Else reduce it to the N-(nearest power of 2 which is less than N).For ... Read More

Sunidhi Bansal
143 Views
We are given with integers x and p. The goal is to find the number of solutions of the equation −x2=1 ( mod p ) such that x lies in range [1, N].We will do this by traversing from 1 to N and take each number as x check if ... Read More

Sunidhi Bansal
336 Views
We are given a perimeter P of a triangle. Perimeter is the sum of all sides of the triangle. The goal is to find the number of right triangles that can be made which have the same perimeter.If the sides of the triangle are a, b and c. Then a ... Read More

Sunidhi Bansal
712 Views
We are given with a rectangle of length L and breadth B, such that L>=B. The goal is to find the number of squares that a rectangle of size LXB can accommodate.Above figure shows a rectangle of size 3 X 2. It has 2, 2X2 squares and 6, 1X1 squares ... Read More