- 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 345 Articles
Hafeezul Kareem
8K+ Views
In this tutorial, we are going write a program that multiplies the given two numbers using bitwise operators.The left shift () is used for the division.The multiplication of two numbers x, y can be written as x * y = (x * 2) * (y / 2) if y is ... Read More
Hafeezul Kareem
235 Views
To get the result of n * 3.5 we need to calculate (n * 2) + n + (n / 2). Moving the bits to left by 1 will give you n * 2 and moving the bits to right by will you n / 2. Add those to get ... Read More
Hafeezul Kareem
813 Views
Given a number n, we need to find the count of multiples of 3 or 7 till n. Let's see an example.Input100Output43There are total of 43 multiples of 3 or 7 till 100.AlgorithmInitialise the number n.Initialise the count to 0.Write a loop that iterates from 3 to n.Increment the count ... Read More
Hafeezul Kareem
676 Views
Given a linked list, we have to move the last element to the front. Let's see an example.Input1 -> 2 -> 3 -> 4 -> 5 -> NULLOutput5 -> 1 -> 2 -> 3 -> 4 -> NULLAlgorithmInitialise the linked list.Return if the linked list is empty or it has ... Read More
Hafeezul Kareem
225 Views
Given a linked list with random integers and zeroes. We have to move all the zeroes to the front of the linked list. Let's see an example.Input3 -> 0 -> 1-> 0 -> 0 -> 1 -> 0 -> 0 -> 3 -> NULLOutput0->0->0->0->0->3->1->1->3->NULL AlgorithmInitialise the linked list.Return if the ... Read More
Hafeezul Kareem
634 Views
In this tutorial, we are going to write a program that moves all zeroes to front and ones to end of the array.Given an array with zeroes and ones along with random integers. We have to move all the zeroes to start and ones to the end of the array. ... Read More
Hafeezul Kareem
2K+ Views
Given array with multiple zeroes in it. We have to move all the zeroes in the array to the end. Let's see an example.Inputarr = [4, 5, 0, 3, 2, 0, 0, 0, 5, 0, 1]Output4 5 3 2 5 1 0 0 0 0 0AlgorithmInitialise the array.Initialise an index ... Read More
Hafeezul Kareem
126 Views
The Motzkin number series starts with 1, 1, 4, 9, etc.., We can get the generalised nth term with the sequence. The Motzkin number sequence is as follows.a0 = 1a1 = 1a2 = 4a3 = 9an = ((2 * n + 1)/ n + 2) * M(n-1) +((3 * n ... Read More