All Medium Articles
Given a binary tree, flatten it into linked list in-place. Usage of auxiliary data structure is not allowed. After flattening, left of each node should… Read More
Given an array arr[] of positive integers, the task is to count the maximum possible number of pairs (arr[i], arr[j]) such that arr[i] + arr[j]… Read More
java.util.LinkedList.toArray() method is used to convert LinkedList into an Array. It returns the same LinkedList elements but in the form of Array only. We have… Read More
Method #1: Using list comprehension  List comprehension is an elegant way to perform any particular task as it increases readability in the long run. This… Read More
Difference of two columns in pandas dataframe in Python is carried out by using following methods : Method #1 : Using ” -” operator. import… Read More
Prerequisite: Create and Write on an excel sheetXlsxWriter is a Python library using which one can perform multiple operations on excel files like creating, writing,… Read More
numpy.argwhere() function is used to find the indices of array elements that are non-zero, grouped by element. Syntax : numpy.argwhere(arr) Parameters : arr : [array_like]… Read More
Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages… Read More
The Java.util.Stack.size() method in Java is used to get the size of the Stack or the number of elements present in the Stack. Syntax: Stack.size()… Read More
The toArray() method of Java LinkedHashSet is used to form an array of the same elements as that of the LinkedHashSet. Basically, it copies all… Read More
The querySelector() method finds and returns the first HTML element that matches a specific CSS selector. If the selector is invalid, it throws an error.… Read More
The set() method of Java Stack is used to replace any particular element in the stack created using the Stack class with another element. This… Read More
Round 1:(Hackerrank Test) Q1: Binary tree mirror image check ( https://www.geeksforgeeks.org/check-if-two-trees-are-mirror/ ) Q2: Stack reversal in place // just the function ( https://www.geeksforgeeks.org/reverse-a-stack-using-recursion/) Q3: Kendanes… Read More
Given an N X M matrix, where ai, j = 1 denotes the cell is not empty, ai, j = 0 denotes the cell is… Read More
Prerequisite : PrintWriter, BufferedReader. We are given a directory/folder in which n number of files are stored(We dont know the number of files) and we want… Read More
Given an array A of size N. The task is to find the length of smallest subarray which contains both maximum and minimum values. Examples: … Read More
The lower(E ele) method of TreeSet class in Java is used to return the greatest element in this set which is strictly less than the… Read More
An array is a collection of the same type variable. Whereas a string is a sequence of Unicode characters or array of characters. Therefore arrays… Read More
Accolite visited our campus in November 2018. Round1: Accolite visited our campus in November 2018 at 6-8 lpa salary package. The first round was an… Read More
Given an array arr[] of integers, the task is to find the LCM of all the elements of the array modulo M where M =… Read More