- 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
Ayush Gupta has Published 541 Articles
![Ayush Gupta](https://www.tutorialspoint.com/assets/profiles/134135/profile/60_13095-1568350695.jpg)
Ayush Gupta
150 Views
In this problem, we are given an array arr[] of size n. And Q queries, each consisting of two elements l and r. Our task is to create a program to solve Queries for number of distinct elements in a subarray in C++.Problem description − Here for each querry, we ... Read More
![Ayush Gupta](https://www.tutorialspoint.com/assets/profiles/134135/profile/60_13095-1568350695.jpg)
Ayush Gupta
306 Views
In this problem, we are given an array arr[] of size n and we are given a query. Each query contains two values (L, R). our task is to create a program to solve queries for number of distinct elements in a subarrayProblem description − Here, we will need to ... Read More
![Ayush Gupta](https://www.tutorialspoint.com/assets/profiles/134135/profile/60_13095-1568350695.jpg)
Ayush Gupta
107 Views
In this program, we are given Q queries, each query has a positive integer N. Our task is to create a program to solve queries on sum of odd number digit sums of all the factors of a number in C++.Problem description − To solve each query, we need to ... Read More
![Ayush Gupta](https://www.tutorialspoint.com/assets/profiles/134135/profile/60_13095-1568350695.jpg)
Ayush Gupta
69 Views
In this problem, we are given an array of N integers. There are Q queries, each containing an integer value m. Our task to create a program to solve Queries for number of distinct integers in Suffix in C++.Problem description − Here, we will need to find the total number ... Read More
![Ayush Gupta](https://www.tutorialspoint.com/assets/profiles/134135/profile/60_13095-1568350695.jpg)
Ayush Gupta
56 Views
In this problem, we are given a bitonic Sequence and Q queries. Each query has an integer x. Our task is to print the length of the bitonic sequence after inserting integers after each query. And at the end print the bitonic sequence.Problem description − Here, we are given a ... Read More
![Ayush Gupta](https://www.tutorialspoint.com/assets/profiles/134135/profile/60_13095-1568350695.jpg)
Ayush Gupta
495 Views
In this problem, we are given n points that lie of a 2D plane, each coordinate is (x, y). Our task is two solve queries. For each query, we are given an integer R. We need to find the count of points lying inside the circle, taking the circle’s center ... Read More
![Ayush Gupta](https://www.tutorialspoint.com/assets/profiles/134135/profile/60_13095-1568350695.jpg)
Ayush Gupta
83 Views
In this problem, we are given a binary matrix bin[][] of size nXm. Our task is to solve all q queries. For query(x, y), we need to find the number of submatrix of size x*x such that all the elements of array y (binary number).Problem descriptionHere, we need to count ... Read More
![Ayush Gupta](https://www.tutorialspoint.com/assets/profiles/134135/profile/60_13095-1568350695.jpg)
Ayush Gupta
72 Views
In this tutorial, we will be discussing a program to find queries to check if it is possible to join boxes in a circle.For this we will be provided with a circle of boxes running from 1 to n. Our task is to find whether box i can be connected ... Read More
![Ayush Gupta](https://www.tutorialspoint.com/assets/profiles/134135/profile/60_13095-1568350695.jpg)
Ayush Gupta
72 Views
In this tutorial, we will be discussing a program to find maximum value with the choice of either dividing or considering as it is.For this we will be provided with an integer value. Our task is to find the maximum value with either by dividing the number into four parts ... Read More
![Ayush Gupta](https://www.tutorialspoint.com/assets/profiles/134135/profile/60_13095-1568350695.jpg)
Ayush Gupta
121 Views
In this tutorial, we will be discussing a program to find query for ancestor-descendant relationship in a tree.For this we will be provided with a rooted tree and Q queries. Our task is to find the two roots given in the query is an ancestor of the other or not.Example Live ... Read More