## Merge Two Binary Trees by doing Node Sum (Recursive and Iterative)

Given two binary trees. We need to merge them into a new binary tree. The merge rule is that if two nodes overlap, then sum… Read More »

## Decode a string recursively encoded as count followed by substring

An encoded string (s) is given, the task is to decode it. The pattern in which the strings are encoded is as follows. <count>[sub_str] ==>… Read More »

## Find the Longest Increasing Subsequence in Circular manner

Given an array, the task is to find to LIS (Longest Increasing Subsequence) in a circular way. Examples : Input : arr[] = {5, 4,… Read More »

## Check whether a given array is a k sorted array or not

Given an array of n distinct elements. Check whether the given array is a k sorted array or not. A k sorted array is an… Read More »

## Minimum number of edges between two vertices of a Graph

You are given a undirected graph G(V, E) with N vertices and M edges. We need to find the minimum number of edges between a… Read More »

## Boyer Moore Algorithm | Good Suffix heuristic

We have already discussed Bad character heuristic variation of Boyer Moore algorithm. In this article we will discuss Good Suffix heuristic for pattern searching. Just… Read More »

## Count subarrays having total distinct elements same as original array

Given an array of n integers. Count total number of sub-array having total distinct elements same as that of total distinct elements of original array.… Read More »

## ‘IPCS’ command in Linux with examples

ipcs shows information on the inter-process communication facilities for which the calling process has read access. By default, it shows information about all three resources:… Read More »

## Compute modulus division by a power-of-2-number using Wrapper Class

Prerequisite : Compute modulus division by a power-of-2-number Now as you know for getting n modulus 2k, we just need to return k bits(from LSB)… Read More »

## Producer-Consumer solution using Semaphores in Java | Set 2

Prerequisites – Semaphore in Java, Inter Process Communication, Producer Consumer Problem using Semaphores | Set 1 In computing, the producer–consumer problem (also known as the… Read More »

## Reentrant Lock in Java

Background The traditional way to achieve thread synchronization in Java is by the use of synchronized keyword. While it provides a certain basic synchronization, the… Read More »

## Java.io.RandomAccessFile Class Method | Set 2

Set 1, Set 3 Methods of Java.io.RandomAccessFile Class Method : readLine() : java.io.RandomAccessFile.readLine() reads the next line of text from this file, start reading from… Read More »

## Java.io.RandomAccessFile Class Method | Set 1

Java.io.RandomAccessFile Class provides a way to random access files using reading and writing operations. It works like an array of byte storted in the File.… Read More »

## try and except in Python

try() is used in Error and Exception Handling There are two kinds of errors : Syntax Error : Also known as Parsing Errors, most basic.… Read More »

## Static Keyword in C++

Prerequisite : Static variables in C Static keyword has different meanings when used with different types. We can use static keyword with: Static Variables :… Read More »