Consider a very long K-digit number N with digits d0, d1, …, dK-1 (in decimal notation; d0 is the most significant and dK-1 the least… Read More »

#
All Medium Articles

Given a linked list with some two adjacent repeating nodes before a zero, task is to double the first and make next 0. After this,… Read More »

Given an array ‘a[]’ of size n and number of queries q. Each query can be represented by two integers l and r. Your task… Read More »

I applied to Microsoft through referral program for Internship as software development engineer. All of the candidates who applied through referral were invited for an… Read More »

Given a string S, we need to find reciprocal of it. The reciprocal of the letter is found by finding the difference between the position… Read More »

Given an array of numbers and a number k, find the number of subarrays having sum less than k. We may assume that there is… Read More »

Given a string S. Count number of substrings in which each character occurs at most k times. Assume that the string consists of only lowercase… Read More »

Given an array that might contain duplicates, print all distinct elements in sorted order. Examples: Input : 1, 3, 2, 2, 1 Output : 1… Read More »

Given a set S (all distinct elements) of integers, find the largest d such that a + b + c = d where a, b,… Read More »

Given a queue, write a recursive function to reverse it. Standard operations allowed : enqueue(x) : Add an item x to rear of queue. dequeue()… Read More »

Given a root node to a tree, find the sum of all the leaf nodes which are at maximum depth from root node. Example: 1… Read More »

Booth algorithm gives a procedure for multiplying binary integers in signed 2’s complement representation in efficient way, i.e., less number of additions/subtractions required. It operates… Read More »

Given an array A of N integers. You have to answer two types of queries : 1. Update [l, r] – for every i in… Read More »

Prerequiste – Execution, Stages and Throughput Registers Involved In Each Instruction Cycle: Memory address registers(MAR) : It is connected to the address lines of the… Read More »

In controlled access, the stations seek information from one another to find which station has the right to send. It allows only one node to… Read More »

In computer central processing units, micro-operations (also known as micro-ops) are the functional or atomic, operations of a processor. These are low level instructions used… Read More »

Given A and B, the task is to find the number of possible values that X can take such that the given modular equation (A… Read More »

Round 1: Technical Face 2 Face. Write a program to find the range of majority elements in array(non-descending)? Write program to print all the permutation… Read More »

Given n and k, Construct a palindrome of size n using a binary number of size k repeating itself to wrap into the palindrome. The… Read More »

Given two integer number n and d. The task is to find the number between 0 to n which contain the specific digit d. Examples:… Read More »