- 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
Dev Prakash Sharma has Published 556 Articles
Dev Prakash Sharma
2K+ Views
Given a 32-bit Unsigned Binary Number, the task is to count the set bits, i.e., '1's present in it.For ExampleInput:N = 00000000000000100111Output:4Explanation: Total set bits present in the given unsigned number is 4, thus we will return the output as '4'.Approach to Solve this ProblemWe have given an unsigned 32-bit binary ... Read More
Dev Prakash Sharma
416 Views
Given a string 'a' and a character 'char', the task is to print the distance of 'char' from each character of the given string. The size of the distance array is same as the size of the string, since we have to find the distance of the character from each ... Read More
Dev Prakash Sharma
909 Views
Let us suppose we have a Binary Tree having a root node and its left child and right child. The task is to find the total sum of leaf nodes of the tree which are left to its parent node.For ExampleInput-1: Output:15Explanation: In the given input Binary Tree, the sum ... Read More
Dev Prakash Sharma
1K+ Views
A Linked List is a linear data structure in which each node has two blocks such that one block contains the value or data of the node and the other block contains the address of the next field.Let us assume that we have a linked list such that each node ... Read More
Dev Prakash Sharma
172 Views
Let us suppose we have two strings 'a' and 'b' and a string 'merge'. The task is to fill the string 'merge' with the characters from 'a' and 'b' in such a way that, If the string 'a' is non-empty, then remove the first character from the string 'a' and ... Read More
Dev Prakash Sharma
168 Views
Let us suppose we have three numbers. The task is to count the total number of optimal steps to make all these numbers '0'.For ExampleInput-1:a = 4 b = 4c = 6Output:7Explanation: Total number of optimal steps to make all the numbers '0' is, (4, 4, 6)Removing '1' from 1st and ... Read More
Dev Prakash Sharma
185 Views
Let us suppose we have three integers 'a' and 'b' and 'limit'. The task is to print the numbers in the range [a, limit]. List of these numbers is said to be powerful integers and represented as, a^i + b^j such that i >= 0 and j >= 0For ExampleInput-1:a ... Read More
Dev Prakash Sharma
220 Views
A string is said to be a palindromic string if it remains the same after reversing it.In this particular problem, we've given two strings 'a' and 'b' of the same length. If they are split with some indexes, then the task is to check whether the sum of the strings ... Read More
Dev Prakash Sharma
492 Views
Let us suppose we have a binary tree and the task is to check whether it constructs a symmetry of itself or not. A Symmetric Binary tree constructs the mirror image of itself.For ExampleInput-1: Output:TrueExplanation:Since the given binary tree constructs the mirror image of itself, the output ... Read More
Dev Prakash Sharma
4K+ Views
In a binary tree, each node contains two children, i.e left child and right child. Let us suppose we have a binary tree and we need to check if the tree is balanced or not. A Binary tree is said to be balanced if the difference of height of left ... Read More
To Continue Learning Please Login
Login with Google