All Medium Articles
Given n the number of terms. Find the sum of the series 0.7, 0.77, 0.777, … upto n terms.Examples :   Input : 2 Output :… Read More
Prerequisite – Turing Machine A problem is said to be Decidable if we can always construct a corresponding algorithm that can answer the problem correctly.… Read More
Prerequisite – Critical Section, Process Synchronization, Inter Process Communication The Bakery algorithm is one of the simplest known solutions to the mutual exclusion problem for… Read More
JDBC (Java Database Connectivity) and ODBC (Open Database Connectivity). These both are API standards used for connecting applications to databases. ODBC can be used by… Read More
Prerequisite: Correlation CoefficientGiven two arrays X and Y. Find Spearman’s Rank Correlation. In Spearman rank correlation instead of working with the data values themselves (as… Read More
Round 1: Written test with 2 questions Given an array of size n containing both positive and negative numbers. Find the count of subarrays whose… Read More
Given an array of size n. It is also given that range of numbers is from smallestNumber to smallestNumber + n where smallestNumber is the… Read More
What’s going to happen when we compile and run the following C program snippet? #include "stdio.h" int main() {  int a = 10;  int b… Read More
S1 : Anyone of the followings can be used to declare a node for a singly linked list. If we use the first declaration, “struct… Read More
Let δ denote the transition function and α denoted the extended transition function of the ε-NFA whose transition table is given below: Which of the… Read More
Given a positive integer n and k. Find maximum xor of 1 to n using at most k numbers. Xor sum of 1 to n… Read More
Round 1: Coding Round There were 3 questions to be solved on hackerrank in 90 minutes. Questions were:   Given an array of length n and an… Read More
A couple invites n – 1 other couples to dinner. Once everyone arrives, each person shakes hands with everyone he doesn’t know. Then, the host… Read More
Python String istitle() Method is a built-in string function that returns True if all the words in the string are title cased, otherwise returns False.… Read More
Given two numbers x and y, find unit digit of xy. Examples :  Input : x = 2, y = 1 Output : 2 Explanation… Read More
Prerequisite – Process Synchronization, Inter Process Communication To obtain such a mutual exclusion, bounded waiting, and progress there have been several algorithms implemented, one of which… Read More
Prerequisite – Resource Allocation Graph (RAG), Banker’s Algorithm, Program for Banker’s Algorithm Banker’s Algorithm is a resource allocation and deadlock avoidance algorithm. This algorithm test for… Read More
Given an array of size n. Find the maximum sum of an increasing subsequence.Examples:  Input : arr[] = { 1, 20, 4, 2, 5 }… Read More
Given two investment options A and B, we have to find the less risky investment of the two. The two investments A and B are… Read More
Given an Array of Integers and an Integer value k, find out k non-overlapping sub-arrays which have k maximum sums.  Examples:  Input : arr1[] =… Read More