We have an integer array that is sorted in ascending order. We also have 3 integers A, B and C. We need to apply A*x*x… Read More

All Medium Articles

Java Based: OOPs concepts ( mostly polymorphism and difference between encapsulation and abstraction) Difference between abstract class and interface. Difference between == and .equals() functions.… Read More

Prerequisites :- Nested Classes in Java Local Inner Classes are the inner classes that are defined inside a block. Generally, this block is a method… Read More

Prerequisites : Input/Output from external file in C/C++, Java and Python for Competitive Programming In above post, we saw a way to have standard input/output… Read More

Given an array of n numbers. Our task is to find out the number of ways to divide the array into three contiguous parts such… Read More

Prerequisite: Singleton Pattern In this article, we will see that what are various concepts which can break singleton property of a class and how to… Read More

Only user-defined functions. No inbuilt functions at all. No scanning for inputs, directly assign to vars. Level 1: (2 hours – pen & paper) 1.Solve the equation… Read More

Telephonic Round: Given a 2D matrix with elements 1 and 0, where 1 is land and 0 is water. Find the number of islands. Design… Read More

Given a sorted linked list, delete all nodes that have duplicate numbers (all occurrences), leaving only numbers that appear once in the original list. Examples: Input… Read More

Given a binary input that represents binary representation of positive number n, find binary representation of smallest number greater than n with same number of… Read More

Given a date and a positive integer x. The task is to find date after adding x days to the given date Examples: Attention reader! Don’t… Read More

In previous articles, we discussed about singleton design pattern and singleton class implementation in detail. In this article, we will see how we can create singleton… Read More

Given a Binary Tree, write a function that returns the size of the largest subtree which is also a Binary Search Tree (BST). If the… Read More

Given N modular equations: A ≅ x1mod(m1) . . A ≅ xnmod(mn) Find x in the equation A ≅ xmod(m1*m2*m3..*mn) where mi is prime, or… Read More

Many websites use small strings of text known as cookies to store persistent client-side state between connections. Cookies are passed from server to client and… Read More

Predict the output of the following C++ programs. Question 1Want to learn from the best curated videos and practice problems, check out the C++ Foundation… Read More

Given a integer ‘x’, find the number of values of ‘a’ satisfying the following conditions: 0 <= a <= x a XOR x = a… Read More

dup() The dup() system call creates a copy of a file descriptor. Take a step-up from those "Hello World" programs. Learn to implement data structures… Read More

We are living in a world where everything is happening at the speed of a Formula-1 car in a race track. Keeping tick of essentials… Read More