All Medium Articles
For a shirt cost price = 400Rs. Shopkeeper prints a tag on it with Markup% = 20% to earn a profit of 7.5%. What is… Read More
Q. A young pair of chinchillas (one of each sex) is placed on an island. A pair of chinchillas does not breed until they are… Read More
Suppose we have a string of length- n and we want to generate all combinations/permutations taken r at a time with/without repetitions.  There are four… Read More
Using Java in competitive programming is not something many people would suggest just because of its slow input and output, and well indeed it is… Read More
Given an N x N matrix, find a k x k submatrix where k <= N and k >= 1, such that sum of all… Read More
A product is sold at two consecutive discounts of 30% and subsequently 40%. If the marked price on the product is 1500, What is the… Read More
A product is sold at two consecutive discounts of 30% and subsequently 40%. If the product is sold for 1500, what is the marked price… Read More
Ram spends 20% of is salary on food, 15 % of remaining on cloths, and 400 on entertainment. If his salary is 10000, how much… Read More
At what time will the hrs hand and minute hand will be pointing just opposite to each other between 7:00 AM and 8:00 AM? (A)… Read More
Given a 2D grid of characters and a word, find all occurrences of given word in grid. A word can be matched in all 8… Read More
Recently I appeared in interview for MTS-1 Adobe. Here is my experience. Written Round: Very easy aptitude Questions on geometry, DI, profit loss etc. Main… Read More
How to do the following operations efficiently if there are large number of queries for them.  Insertion Deletion Searching Clearing/Removing all the elements. One solution… Read More
Round 1: It was a written round with three question. Q1) Find a peak element. Q2) Top View of binary tree. Q3) Maximum difference between… Read More
Round 1: It was a writen round with three questions : 1. Find a row with maximum number of 1’s in a sorted 2D Boolean… Read More
(Wiki) Cheryl’s Birthday is the unofficial name given to a mathematics brain teaser that was asked in the Singapore and Asian Schools Math Olympiad, and… Read More
Write code to convert a matrix in a specific way without using extra space.  Input:      1 2 3      4 5 6 … Read More
The Iterator pattern is a widely used design pattern in software development that provides a way to access the elements of an aggregate object (such… Read More
Prerequisite – Binary Heap  K-ary heaps are a generalization of binary heap(K=2) in which each node have K children instead of 2. Just like binary… Read More
The following is the explanation to the C++ code to play a video in C++ using the tool OpenCV. Things to know: (1) The code will… Read More
Identifying languages (or problems*) as decidable, undecidable or partially decidable is a very common question in GATE. With correct knowledge and ample experience, this question… Read More