Courses
Tutorials
Interview Prep
DSA
Practice Problems
C
C++
Java
Python
JavaScript
Data Science
Machine Learning
Courses
Linux
DevOps
Print all the duplicate characters in a string
Given a string s, the task is to identify all characters that appear more than once and print each as a list containing the character and its count. Examples:Input: s = "g...
Read More
Strings
DSA
String Duplicates
Remove duplicates from a string
Given a string s which may contain lowercase and uppercase characters. The task is to remove all duplicate characters from the string and find the resultant string. Note: ...
Read More
Strings
DSA
frequency-counting
Power Function Implementation
Given two numbers b(base) and e(exponent), calculate the value of be.Examples: Input: b = 3.00000, e = 5Output: 243.00000Input: b = 0.55000, e = 3Output: 0.16638Input: b =...
Read More
Divide and Conquer
Mathematical
DSA
Microsoft
Amazon
MakeMyTrip
Modular Arithmetic
maths-power
Java Program for Sum the digits of a given number
Given a number, find the sum of its digits.Example :Input : n = 687Output : 21Input : n = 12Output : 31. Iterative:Java // Java program to compute // sum of dig...
Read More
Java
C Program for Sum the digits of a given number
Given a number, find sum of its digits.Example :Input : n = 687Output : 21Input : n = 12Output : 31. Iterative:C // C program to compute sum of digits in // num...
Read More
C Language
Sum of Digits of a Number
Given a number n, find the sum of its digits.Examples : Input: n = 687Output: 21Explanation: The sum of its digits are: 6 + 8 + 7 = 21Input: n = 12Output: 3Explanation: Th...
Read More
DSA
number-digits
cpp-puzzle
How will you print numbers from 1 to 100 without using a loop?
If we take a look at this problem carefully, we can see that the idea of "loop" is to track some counter value, e.g., "i = 0" till "i = 100". So, if we aren't allowed to u...
Read More
DSA
cpp-puzzle
Find maximum occurring character in a string
Given string s, we need is to find the maximum occurring character in the string str.Examples:Input: s="geeksforgeeks"Output: 'e'Explanation: 'e' occurs 4 times in the st...
Read More
Strings
Hash
DSA
Morgan Stanley
1
...
12123
12124
12125
12126