- 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
Hafeezul Kareem has Published 344 Articles
Hafeezul Kareem
134 Views
In this tutorial, we are going to write a program that finds the number that is smaller than or equal to N and divisible by k.Let's see the steps to solve the problem.Initialise the numbers n and k.Find the remainder with modulo operator.If the remainder is zero, then return n.Else ... Read More
Hafeezul Kareem
58 Views
In this tutorial, we are going to write a program that finds the largest number which is less than given x and should have at most k set bits.Let's see the steps to solve the problem.Initialise the numbers x and k.Find the set bits in the number x.Write a loop ... Read More
Hafeezul Kareem
263 Views
In this tutorial, we are going to write a program that finds the number less than N with digit sum greater than the digit sum of n.Let's see the steps to solve the problem.Write a function to find the digits sum.Initialise n.Write a loop that iterates from n - 1 ... Read More
Hafeezul Kareem
205 Views
In this tutorial, we are going to write a program that finds the largest n-digit number that is divisible by the given three numbers.Let's see the steps to solve the problem.Initialise three numbers along with n.Find the LCM of three numbers.Store the largest number with n-digits.If the largest number is ... Read More
Hafeezul Kareem
105 Views
In this tutorial, we are going to write a program that finds the largest k-digit number that is divisible by x.Let's see the steps to solve the problem.Initialise the x and k.Find the value of pow(10, k) - 1 which is largest k-digit number.Now, remove the remainder value from the ... Read More
Hafeezul Kareem
203 Views
In this tutorial, we are going to write a program that finds the largest difference between the two elements in the given array.Let's see the steps to solve the problem.Initialise the array.Find the max and min elements in the array.Return max - min.ExampleLet's see the code. Live Demo#include using namespace ... Read More
Hafeezul Kareem
633 Views
In this tutorial, we are going to write a program that finds the largest possible even number with a single swap of digits.Let's see the steps to solve the problem.Initialise the number in string format.Iterate over the given number.Find the even digit that is less than or equal to the ... Read More
Hafeezul Kareem
123 Views
In this tutorial, we are going to write a program that finds the largest number whose digits are all even and not greater than the given n.Let's see the steps to solve the problem.Initialise the number n.Write a loop from i = n .Check whether the digits of current number ... Read More
Hafeezul Kareem
313 Views
In this tutorial, we are going to write a program that finds the largest even and odd number of n digits number.Let's see the steps to solve the problem.Initialise the number n.The largest odd number is pow(10, n) - 1.The largest even number is odd - 1.ExampleLet's see the code. Live ... Read More
Hafeezul Kareem
229 Views
In this tutorial, we are going to write a program that finds out the larger among the ab and baIt's a straightforward problem. Let's see the steps to solve it.Initialise the values of a and b.Take the log of both the values.Compute the values of $b\:\log\:a$ and $a\:\log\:b$Compare the both ... Read More