
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- 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 328 Articles

Hafeezul Kareem
235 Views
In this tutorial, we are going to find the k-th smallest element after every insertion.We are going to use the min-heap to solve the problem. Let's see the steps to complete the program.Initialise the array with random data.Initialise the priority queue.Till k - 1 there won't be any k-th smallest ... Read More

Hafeezul Kareem
289 Views
In this tutorial, we are going to write a program that finds the k-th prime number which is greater than the given number n.Initialise the number n.Find all the prime numbers till 1e6 and store it in a boolean array.Write a loop that iterates from n + 1 to 1e6.If ... Read More

Hafeezul Kareem
338 Views
In this tutorial, we are going to write a program that finds the k-th odd number from the given array.Let's see the steps to solve the problem.Initialise the array and k.Iterate over the array.If the current element is odd, then decrement the value of k.If k is 0, then return ... Read More

Hafeezul Kareem
108 Views
In this tutorial, we are going to write a program that finds the k-th node in the diagonal traversal of a binary tree.Let's see the steps to solve the problem.Initialise the binary tree with some sample data.Initialise the number k.Traverse the binary tree diagonally using the data structure queue.Decrement the ... Read More

Hafeezul Kareem
642 Views
In this tutorial, we are going to write a program that finds the length of union of segments of a line.We are given starting and ending points of the line segment and we need to find the length of union of segments of the line.The algorithm that we are going ... Read More

Hafeezul Kareem
416 Views
In this tutorial, we are going to write a program that checks whether the given number is Keith Number or not.The number n is called Keith number if it appears in the sequence generated using its digits. The sequence has first n terms as digits of the number n and ... Read More

Hafeezul Kareem
3K+ Views
In this tutorial, we are going to write a program that finds whether the given number is kaprekar number or not.Take a number. Find the square of that number. Divide the number into two parts. If the sum of the two parts is equal to the original number, then the ... Read More

Hafeezul Kareem
849 Views
In this tutorial, we are going to write a program that finds the k-th smallest number in the unsorted array.Let's see the steps to solve the problem.Initialise the array and k.Initialise a empty ordered set.Iterate over the array and insert each element to the array.Iterate over the set from 0 ... Read More

Hafeezul Kareem
230 Views
In this tutorial, we are going to write a program that finds the k-th smallest number in the unsorted array.Let's see the steps to solve the problem.Initialise the array and k.Sort the array using sort method.Return the value from the array with the index k - 1.ExampleLet's see the code. Live ... Read More

Hafeezul Kareem
529 Views
In this tutorial, we are going to write a program that finds the k-th least element from the min-heap.We will use priority queue to solve the problem. Let's see the steps to complete the program.Initialise the min-heap with correct values.Create a priority queue and insert the root node of the ... Read More