- 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
25K+ Views
In this tutorial, we are going to learn how to create a linked list from the given array.Let's see the steps to solve the problem.Initialize the array with dummy data.Write the struct node.Iterate over the array.Create a new node with the data.Insert the new node into the linked list.Print the ... Read More
Hafeezul Kareem
28K+ Views
In this tutorial, we are going to learn how to add a new column to the existing DataFrame in pandas. We can have different methods to add a new column. Let's all of them.Using ListWe can add a new column using the list. Follow the steps to add a new ... Read More
Hafeezul Kareem
37K+ Views
In this article, we are going to learn how to find the frequency of elements in a Python list. We can solve the problem in different ways. Let's see two of them.Follow the below steps to write the code.Initialize the list with elements and an empty dictionary.Iterate over the list ... Read More
Hafeezul Kareem
397 Views
We can find the multiples using % operator without any hurdles. But, the problem states that we can't use % operator.Here, we make use of the + operator. We can get the multiples by adding 3 or 5 to the previous multiple. Let's see an example.Input15Output1 2 3 - Multiple ... Read More
Hafeezul Kareem
160 Views
Given a binary matrix, we need to find the minimum distance from each cell to the nearest cell that contains 1.Let's see an example.Input0 0 1 1 1 0 0 0 0Output1 1 0 0 0 1 1 1 2The minimum distance is the one that is minimum from current ... Read More
Hafeezul Kareem
288 Views
Given an array, we need to find the number of pairs with maximum sum. Let's see an example.Inputarr = [3, 6, 5, 2, 1, 2, 3, 4, 1, 5]Output2 The maximum pair sum is 10. There are 2 pairs with maximum sum. They are (5, 5) and (6, 4).AlgorithmInitialise the ... Read More
Hafeezul Kareem
144 Views
Given an array, we have to find the number of pairs whose Bitwise OR is an odd number. Let's see the example.Inputarr = [1, 2]Output1 There is only one pair whose Bitwise OR is an odd number. And the pair is (1, 2).AlgorithmInitialise the array with random numbers.Initialise the count ... Read More
Hafeezul Kareem
767 Views
Given an array, we have to find the number of pairs whose sum is a power of 2. Let's see the example.Inputarr = [1, 2, 3]Output1 There is only one pair whose sum is a power of 2. And the pair is (1, 3).AlgorithmInitialise array with random numbers.Initialise the count ... Read More
Hafeezul Kareem
117 Views
Given numbers N and K, we have to count the number of pairs whose sum is divisible by K. Let's see an example.InputN = 3 K = 2Output1 There is only one pair whose sum is divisible by K. And the pair is (1, 3).AlgorithmInitialise the N and K.Generate the ... Read More
Hafeezul Kareem
102 Views
The line equation that should be satisfied is y = mx + c. Given an array, m, and c, we have to find the number of order points satisfying the line equation. Let's see an example.Inputarr = [1, 2, 3] m = 1 c = 1Output2The pairs satisfying the line ... Read More