Skip to content
All Medium Articles
A sequence {x1, x2, .. xn} is alternating sequence if its elements satisfy one of the following relations :  x1 < x2 > x3 <… Read More
Given a stick of size N, find the number of ways in which it can be cut into K pieces such that length of every… Read More
1st Round : 1)https://www.geeksforgeeks.org/maximum-product-subarray/ 2)https://www.geeksforgeeks.org/sort-an-almost-sorted-array-where-only-two-elements-are-swapped/ 3) Delete all nodes whose value is greater than K 2nd Round (1 hr 30 mins) 1) Clone a Binary… Read More
Given an array of n numbers and a number k. We need to divide the array into k partitions (clusters) of the same or different… Read More
We have already discuss the Binary Threaded Binary Tree.Insertion in Binary threaded tree is similar to insertion in binary tree but we will have to… Read More
SQL Constraints Unique constraint in SQL is used to check whether the sub query has duplicate tuples in it’s result. It returns a boolean value… Read More
CyclicBarrier is used to make threads wait for each other. It is used when different threads process a part of computation and when all threads… Read More
Often, when transferring files from the camera folder to a workspace where we would like to analyze the pictures, it becomes difficult to deal with… Read More
Below is the summary of interview round conducted by amazon. Although i am not able to remember correctly since its almost 2 months. Written Test… Read More
Given a range [L, R], we need to find two integers in this range such that their XOR is maximum among all possible choices of… Read More
Given a string of size ‘n’. The task is to remove or delete the minimum number of characters from the string so that the resultant… Read More
Query: A query is a request for information from a database.  Query Plans: A query plan (or query execution plan) is an ordered set of… Read More
The Hough Transform is a method that is used in image processing to detect any shape, if that shape can be represented in mathematical form.… Read More
Pre-requisite: Linear Regression This article discusses the basics of Logistic Regression and its implementation in Python. Logistic regression is basically a supervised classification algorithm. In a… Read More
Anti-Aliased Line Drawing Below is the image showing line drawn with Bresenham’s line algorithm (left) and Xiaolin Wu’s line algorithm (right) which smooths the line.… Read More
Convert a number m to n with minimum operations. The operations allowed are :   Multiply by 2, i.e., do m = 2 * m Subtract… Read More
Although C does not provide direct support to error handling (or exception handling), there are ways through which error handling can be done in C.… Read More
Given a undirected graph of n nodes and m edges. The task is to find minimum edges required to make Euler Circuit in the given… Read More
Write a program to reverse an integer assuming that the input is a 32-bit integer. If the reversed integer overflows, print -1 as the output. Let… Read More
Given N points in 2-dimensional space, we need to find three points such that triangle made by choosing these points should not contain any other… Read More