- 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
Sudhir sharma has Published 1206 Articles
Print all numbers whose set of prime factors is a subset of the set of the prime factors of X in C++
sudhir sharma
161 Views
In this problem, we are given a set of N numbers and a number X. And we have to print all numbers from the array whose set of prime factors is a subset of the set of prime factors of X.Let’s take an example to understand the problemInput: X= 30 ... Read More
sudhir sharma
195 Views
In this problem, we are given a binary search tree and we have to print all the nodes that have odd values.The binary search tree is a special type of tree that possess the following properties −The left subtree always has values smaller than the root node.The right subtree always ... Read More
sudhir sharma
2K+ Views
In this problem, we are given a number n and we have to print all odd numbers from 1 to n and also print the sum of numbers from 1 to n in PL/SQL.PL/SQL is a procedural language extension to SQL. The code is a sequence of instructions that are ... Read More
sudhir sharma
207 Views
In this problem, we have an unsorted array and we have to print all pairs within this array that have an equal sum.Let’s take an example to understand the problem −Input: array = [12, 13, 20, 5] Output: [12, 13] and [20, 5] have sum 25.To solve this problem, we ... Read More
sudhir sharma
358 Views
In this problem, we are given an array of strings and we have to print all pairs of anagrams of that given array.Anagrams are strings that are formed by rearranging the character of another string. Like − hello and lolheLet’s take an example to understand the problem −Input: array = ... Read More
sudhir sharma
2K+ Views
In this problem, we are given an array of size n and a positive integer r. Our task is to print all possible combinations of the elements of the array of size r.Let’s take an example to understand the problem −Input: {5, 6, 7, 8} ; r = 3 Output ... Read More
sudhir sharma
212 Views
In this problem, we are given a string of integers from 0 to 9 and a target value. We have to print out ways in which we can generate expression using +, -, and * operation which is evaluated to the value equal to target.Let’s take an example to understand ... Read More
sudhir sharma
295 Views
In this problem, we are given an mXn 2D matrix and we have to print all possible paths from top left to the bottom right of the matrix. For traversal, we can move only right and down in the matrix.Let’s take an example to understand the topic better −Input: 1 ... Read More
sudhir sharma
2K+ Views
In this problem, we are given a set of characters and a positive integer k and we have to print all possible strings of length k that can be generated using the characters of the set.Let’s take an example to understand the problem better −Input: set = {‘x’, ‘y’, ‘z’} ... Read More
sudhir sharma
316 Views
In this problem, we are given a string and we have to print all those string that can be made using this string by placing space in between the characters of the string.Let’s take an example to understand the topic better −Input: string = ‘XYZ’ Output: XYZ, XY Z, X ... Read More