- 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
sudhir sharma
165 Views
In this problem, we are given the total score n. Print all combinations of basketball points that are 1, 2, and 3 that give a total score of n.Let’s see an example to understand the problem, Input: 4 Output: 1 1 1 1 1 1 2 1 2 1 1 ... Read More
sudhir sharma
1K+ Views
In this problem, we are given a string. Our task is to print all distinct characters of the string in the order they appear in the string.Let’s take an example to understand our problem, Input: tutorials Point Output: uralsPnThere are multiple ways to solve this problem but we will discuss ... Read More
sudhir sharma
153 Views
In this problem, we are given a string and an integer M. our task is to print all distinct circular strings of length M in lexicographical order (alphabetical order).Let’s take an example to understand the problem, Input: str= “ssssn” M=3 Output: nss sns ssn sssExplanation − all possible circular strings ... Read More
sudhir sharma
650 Views
In this problem, we are given an array of integer values. Our task is to print all distinct elements of the array. The output should contain only distinct values.Let’s take an example to understand the problemInput: array = {1, 5, 7, 12, 1, 6, 10, 7, 5} Output: 1 5 ... Read More
sudhir sharma
185 Views
In this problem, we are given an array of N integers and a number K. Our task is to print all distinct numbers that can be created by adding any K elements from the array. While choosing any number can be repeated K times.Let’s take an example to understand the ... Read More
sudhir sharma
216 Views
In this problem, we are given a string that may contain duplicate characters. Our task is to print all distinct permutations of the strings.Let’s take an example to understand the problem −Input: string = “XYZ” Output: XYZ XZY YXZ YZX ZYX ZXYTo solve this problem, we have to fix one ... Read More
sudhir sharma
271 Views
In this problem, we are given a binary search tree. Our task is to print all even valued nodes of the binary search tree.The binary search tree is a binary tree that follows the following condition −The left sub-tree always contains nodes with smaller values than the parent node.Right, sub-tree ... Read More
sudhir sharma
454 Views
In this problem, we are given a binary tree. Our task is to print all nodes of the tree that are full nodes.The binary tree is a tree in which a node can have a maximum of 2 child nodes. Node or vertex can have no nodes, one child or ... Read More
sudhir sharma
146 Views
In this problem, we are given a sentence. Our task is to print all strings from the sentence that are funny words.Funny word is a word that follows the condition - The absolute difference between adjacent characters of the string and its reverse string is equal.|string[0] - string[1]| = |revstring[0]-revstring[1]|Let’s ... Read More
sudhir sharma
649 Views
In this problem, we are given three values L, R, and d. Our task is to print all good numbers within the range L to R that do not contain the d as its digit.A good number is a number in which every digit is larger than the sum of ... Read More