## Golang – Create Binary Search Tree(BST)

Binary Search Tree(BST) is a binary tree, where the value of left child is less than value of parent and value of right child is greater than value of parent. In BST, Operations like insert, update,search have running time complexity is O(log(n)) and worst case time complexity is O(n) where n is number of elements. BST is generally used in searching algorithm. In this tutorial we will be creating Binary Search Tree

#### Example of Binary Search Tree

Given data : 10, 25, 2, 1, 14, 30, 5, 7 …

## Java Stream

Java Stream API has been introduced in Java 8 which majorly focuses on providing various method for operation on Source. It operates around Source as wrapper making bulk operation fast and in few lines.

Stream bring functional programming to Java and heavily uses lambda expression for its implementation. ParallelStream can be used for multi-threaded operations.

Stream operations can be classified into two sets

- Intermediate Operations
- Terminal Operations

## Sorting in Golang

Golang’s `sort`

package implements sorting for builtins and user-defined types. There are 3 different ways to sort a slice in golang depending on the data stored in the slice.