All Medium Articles
A matrix is a two-dimensional data object made of m rows and n columns, therefore having total m x n values. If most of the… Read More
Given a positive integer n. Consider a matrix of n rows and n columns, in which each element contain absolute difference of its row number… Read More
Given a linked list having two pointers in each node. The first one points to the next node of the list, however, the other pointer… Read More
Given a binary tree, print it vertically. The following example illustrates vertical order traversal.  1 / \ 2 3 / \ / \ 4 5… Read More
A binary tree and a number k are given. Print every path in the tree with sum of the nodes in the path as k. A… Read More
ObjectInputStream Class deserializes the primitive data and objects previously written by ObjectOutputStream. Both ObjectOutputStream and ObjectInputStream are used as it provides storage for graphs of… Read More
Given n strings and a weight associated with each string. The task is to find the maximum weight of string having the given prefix. Print… Read More
The recruiter approached me via linkedin and sent me an Hackerrank test. After clearing it, i was invited for f2f interviews at their Hyderabad office.… Read More
java.io.FilePermission class is used to represent access to a file or a directory. These accesses are in the form of a path name and a… Read More
If a graph is a complete graph with n vertices, then total number of spanning trees is n(n-2) where n is the number of nodes… Read More
Linked Questions 49-50 A digital computer has a memory unit of 256k x 16 and a cache memory of 4k words. The cache uses direct… Read More
Given an array of n positive distinct integers representing lengths of lines that can form a triangle. The task is to find the number of… Read More
Square Root Decomposition Technique is one of the most common query optimization techniques used by competitive programmers. This technique helps us to reduce Time Complexity… Read More
Here, we will build a C++ program to return a local array from a function. And will come across the right way of returning an… Read More
Recently I attended interview at Amazon for SDE 1 profile. Round 1 (Written): 3 questions were given and I was asked to write the executable… Read More
Given an integer array, the task is to divide the array into the maximum number of sub-arrays such that the averages of all subarrays are… Read More
Given the array representation of Complete Binary Tree i.e, if index i is the parent, index 2*i + 1 is the left child and index… Read More
The diameter of an N-ary tree is the longest path present between any two nodes of the tree. These two nodes must be two leaf… Read More
Writing URLs in programming code doesn’t affect the program and the compiler will not throw any error. Here, we will how to use Url in various… Read More
Given a number (as string) and two integers a and b, divide the string in two non-empty parts such that the first part is divisible… Read More