Skip to content
All Medium Articles
It is a well established fact that merge sort runs faster than insertion sort. Using asymptotic analysis we can prove that merge sort runs in… Read More
If all decimal numbers are concatenated in a string then we will get a string which looks like string P as shown below. We need… Read More
Given a matrix of N rows and M columns, the task is to find the minimum absolute difference between any of the two adjacent elements… Read More
Given an array, we need to find maximum sum subarray, removing one element is also allowed to get the maximum sum. Examples :  Input :… Read More
Given an array moves[] that contains a permutation of first n natural numbers, each element of this array represents a movement that is each element… Read More
C provides two functions strtok() and strtok_r() for splitting a string by some delimiter. Splitting a string is a very common task. For example, we… Read More
Given a positive floating point number n, the task is to find the smallest integer k, such that when we multiply k with n, we… Read More
Given an array, the task is to calculate the sum of lengths of contiguous subarrays having all elements distinct.Examples:   Input : arr[] = {1, 2,… Read More
The First Round of test was taken online by Amazon on Hackerearth. First Round: 20 MCQs 2 Coding Questions: Find zeroes to be flipped so… Read More
Find all numbers less than n, which are palindromic. Numbers can be printed in any order. Examples :  Input : n = 12 Output :… Read More
In this post, a group chat application using MulticastSocket (Java Platform SE 7) class is discussed. A MulticastSocket is a (UDP) DatagramSocket, with additional capabilities… Read More
In C, array name represents address and when we pass an array, we actually pass address and the parameter receiving function always accepts them as… Read More
Graph Plotting in Python | Set 1  Subplots Subplots are required when we want to show two or more plots in same figure. We can… Read More
Given an array of n elements. The task is to find number of sextuplets that satisfy the below equation such that a, b, c, d,… Read More
Find all circular primes less than given number n. A prime number is a Circular Prime Number if all of its possible rotations are itself… Read More
Given pointer to the head node of a linked list, the task is to reverse the linked list. Examples:  Input : Head of following linked… Read More
Prerequisites :- Nested Classes in Java It is an inner class without a name and for which only a single object is created. An anonymous… Read More
Predict the output of the following programs: Program 1: def gfgFunction():     "Geeksforgeeks is cool website for boosting up technical skills"     return 1    print (gfgFunction.__doc__[17:21])… Read More
A Clique is a subgraph of graph such that all vertices in subgraph are completely connected with each other. Given a Graph, find if it… Read More
Given two coordinates (x, y) and (a, b). Find if it is possible to reach (x, y) from (a, b). Only possible moves from any coordinate… Read More