All Medium Articles
Main classes These classes encapsulate a regular expression and the results of matching a regular expression within a target sequence of characters. basic_regex: Regular expression… Read More
In Python3, ascii_letters is a pre-initialized string used as string constant. ascii_letters is basically concatenation of ascii_lowercase and ascii_uppercase string constants. Also, the value generated… Read More
IntStream parallel() is a method in java.util.stream.IntStream. This method returns a parallel IntStream, i.e, it may return itself, either because the stream was already present,… Read More
Stream sorted(Comparator comparator) returns a stream consisting of the elements of this stream, sorted according to the provided Comparator. For ordered streams, the sort method… Read More
Stream sorted() returns a stream consisting of the elements of this stream, sorted according to natural order. For ordered streams, the sort method is stable… Read More
I had got a call through Naukri Portal . I got interview invite for a weekend drive. Round 1 Hacker rank test : Q1 :… Read More
distinct() returns a stream consisting of distinct elements in a stream. distinct() is the method of Stream interface. This method uses hashCode() and equals() methods… Read More
java.util.Calendar.equals() is a method in Calendar class of java.util package. The method compares this Calendar to the specified Object.The method returns true if this object… Read More
Given three matrices A, B and C, find if C is a product of A and B. Examples:  Input : A = 1 1 1 1… Read More
Given three integers A, B and N the task is to find N Geometric means between A and B. WE basically need to insert N… Read More
Given two positive integers N, M. The task is to find the number of strings of length N under the alphabet set of size M… Read More
Given a sorted array of distinct positive integers, print all triplets that form AP (or Arithmetic Progression) Examples :  Input : arr[] = { 2,… Read More
Given a String s, count all special palindromic substrings of size greater than 1. A Substring is called special palindromic substring if all the characters… Read More
Big O notation is a powerful tool used in computer science to describe the time complexity or space complexity of algorithms. It provides a standardized… Read More
Round 0: Online Coding Test (90 Min – 4 Coding Questions) Run length encoding Input : aaaaaabb Output : a5b2 Input :aaaaabccc Output :a5bc3 Linked… Read More
While loop: In SQL SERVER, while loop can be used in similar manner as any other programming language. A while loop will check the condition… Read More
Given two positive integer x and y. we have to find the value of y mod 2x. That is remainder when y is divided by… Read More
Given an array A[] of n integers, find out the number of ordered pairs such that Ai&Aj is zero, where 0<=(i,j)<n. Consider (i, j) and… Read More
Given the value of length, print the crown pattern using ‘*’ and ‘#’. Note : In order to print a perfect crown, take the value of… Read More
Given a linear equation, task is to find the value of variable used. The equation contains only ‘+’, ‘-‘ operation, the variable and its coefficient.… Read More