- 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
Sunidhi Bansal has Published 1100 Articles
Sunidhi Bansal
228 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
356 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
Sunidhi Bansal
233 Views
We are given an array of length N containing 0’s and 1’s only. The value 1 represents a car going towards west direction and value 0 represents a car going towards east direction.We count passing cars as 1 if a pair of car A and car B is such that 0
Sunidhi Bansal
899 Views
We gave three input variables as ‘start’, ‘end’ and ‘number’. The goal is to find pairs of numbers between start and end that have GCD value equal to ‘number’. For example GCD(A, B)=number and both A, B are in range [start, end].Let us understand with examples.Input − start=5 end=20 number=8Output ... Read More
Sunidhi Bansal
189 Views
We are given an array of integers such that each element of the array is in the range [- 1000, 1000]. The goal is to find pairs of elements of the array such that their average is also present in that array. If array is arr[]= [1, 2, 3, 4]. ... Read More
Sunidhi Bansal
137 Views
We are given a number N. The goal is to find the pairs of numbers from 1 to N such that the product of pairs is equal to the sum of pairs.Let us understand with examples.Input − N=11Output − Count of pairs of no. from 1 to N with Product ... Read More
Sunidhi Bansal
2K+ Views
We are given two numbers num_1 and num_2. The goal is to count the number of carry operations required if the numbers are added. If numbers are 123 and 157 then carry operations will be 1. (7+3=10, 1+2+5=8, 1+1=2 ).Let us understand with examplesInput − num_1=432 num_2=638Output − Count of ... Read More
Sunidhi Bansal
71 Views
We are given a number d which represents the number of digits. The goal is to find the count of positive integers with 0 as a digit and have maximum d digits. Count all 1 digit, 2 digit, 3 digit….d digit positive numbers containing at least one 0.We will first ... Read More
Sunidhi Bansal
129 Views
We are given a rectangle with dimensions as height X width. The rectangle is represented on a 2D coordinate system with the left-lower corner at point (0, 0). So the goal is to count the number of rhombi possible inside this rectangle such that all these conditions are met −The ... Read More