Category: Recursive

BST

In-place merge two height-balanced BSTs

// A BST node class Node     int knowledge;     Node left, proper;       Node(int knowledge)              this.knowledge = knowledge;         this.left = this.proper = null;       

Algorithm

Check whether a directed graph is Eulerian

import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.Record;   // A category to retailer a graph edge class Edge     int supply, dest;       public Edge(int

BST

Count nodes in a BST that lies within a given range

// BST node class Node     int knowledge;     Node left, proper;       Node(int knowledge)              this.knowledge = knowledge;         this.left = this.proper = null;        class