## Find median of BST in O(n) time and O(1) space

Given a Binary Search Tree, find median of it. If no. of nodes are even: then median = ((n/2th node + (n+1)/2th node) /2 If… Read More »

## Multi-threaded Chat Application in Java | Set 2 (Client Side Programming)

Prerequisites : Introducing threads in socket programming, Multi-threaded chat Application | Set 1 This article gives the implementation of client program for the multi-threaded chat… Read More »

## Multi-threaded chat Application in Java | Set 1 (Server Side Programming)

Prerequisites : Introducing threads in socket programming In the above article, a simple date time server was created which handled multiple user requests at the… Read More »

## Introducing Threads in Socket Programming in Java

Prerequisites : Socket Programming in Java This article assumes that you have basic knowledge of socket programming in java and the basic details of client-server… Read More »

## Check if a number N starts with 1 in b-base

Given a number N and base b if N in base b representation starts with 1 print Yes else print No Examples : Input :… Read More »

## Image Processing in Java | Set 12 ( Contrast Enhancement )

In this article we will learn how to enhance contrast of an image using OpenCV library. In order to enhance contrast histogram equalization techniques are… Read More »

## Leaf nodes from Preorder of a Binary Search Tree

Given a Preorder traversal of a Binary Search Tree. The task is to print leaf nodes of the Binary Search Tree from the given preorder.… Read More »

## Split numeric, alphabetic and special symbols from a String

Given a string str, divide the string into three parts one containing a numeric part, one containing alphabetic and one containing special characters. Examples: Input… Read More »

## Maximum modulo of all the pairs of array where arr[i] >= arr[j]

Given an array of n integers. Find the maximum value of arr[i] mod arr[j] where arr[i] >= arr[j] and 1 <= i, j <= n… Read More »

## Count total divisors of A or B in a given range

Given four integers m, n, a, b. Find how many integers from range m to n are divisible by a or b. Examples : Input:… Read More »

## How to make object eligible for garbage collection in Java?

An object is eligible to be garbage collected if its reference variable is lost from the program during execution.Sometimes they are also called unreachable objects.… Read More »

## JDBC Drivers

Java Database Connectivity (JDBC) is an application programming interface (API) for the programming language Java, which defines how a client may access any kind of… Read More »

## Different methods to copy in C++ STL | std::copy(), copy_n(), copy_if(), copy_backward()

Various varieties of copy() exist in C++ STL that allows to perform the copy operations in different manners, all of them having their own use.… Read More »

## ‘dd’ command in Linux

dd is a command-line utility for Unix and Unix-like operating systems whose primary purpose is to convert and copy files. On Unix, device drivers for… Read More »

## Java.util.ArrayDeque Class in Java | Set 2

Java.util.ArrayDeque Class in Java | Set 1 More Methods of util.ArrayDeque Class : offer(Element e) : java.util.ArrayDeque.offer(Element e) : inserts element at the end of… Read More »