Check If A Binary Tree Is Binary Search Tree

Binary Search Tree This tutorial will check if a Binary Tree is Binary Search Tree or not. It is known that a binary search tree (BST) is a node based binary tree data structure which satisfies the following properties: I will implement the algorithm using Java program in O(n) time complexity to check whether the Binary Tree is Binary Search Tree…

Minimum Moves to Equalize Array Elements

Introduction Here I will show you how to find out minimum moves to equalize array elements. I will check the equality of elements from two arrays. As a pre-condition both arrays must have equal number of elements, i.e., in other words both arrays must be of same length. I will read each element from both arrays one by one at…

Real Time Smile Detection in Webcam using Python 3

Introduction Real time smile detection in webcam using Python 3 will show you how your working webcam detects your face and smile and draws a rectangle around your smile on your face. In my previous tutorial we have seen Real Time Eye Detection in Webcam using Python 3. The similar tutorial we will use here to detect your face and smile…

Spring Data JPA Specification Criteria Query With IN Clause Example

Spring Data JPA Specification Here I will create an example on Spring Data JPA Specification Criteria Query with IN Clause. Spring Data JPA Specification Criteria Query generally used for search functionality on a page where users want to search by providing some inputs or by selecting several dropdown values. In this example I will show you how to use collection…

Real Time Eye Detection in Webcam using Python 3

Introduction Real time eye detection in webcam using Python 3 will show you how your working webcam detects your face and eyes and draws a rectangle around your each eye. In my previous tutorial we have seen Real Time Face Detection in Webcam using Python 3. The similar tutorial we will use here to detect your face and eyes and draw…

Remove Duplicates from String using Java

Introduction Removes duplicates from String will remove duplicate characters (if any) from String using Java programming language. For example, let’s say we have a string roytuts and we want to remove duplicates from this string. So in this string the duplicate character is t. Therefore after removing duplicate characters we will get the final string roytus.

Minimum moves to segregate even followed by odd elements in Array

Introduction This tutorial will find out minimum moves to segregate even followed by odd elements in an Array using Java programming language. The function will put all even numbers first, and then odd numbers and finally count the number of moves required to arrange all elements in the desired order. This example also works on duplicate elements but does not…

Return array of products of all other numbers from a given array

Introduction This tutorial will show you how to return array of products of all other numbers from a given array. Let’s say you are given an array of non-zero integers. So you have to return an output array of products of all other numbers except the number itself.

Finding Start and End Index of an element in a sorted Array using Kotlin

Finding start and end index of an element in a sorted array using Kotlin programming language will be shown here. The array may contain duplicate elements and we will see how to find a start and end index for an element in this array elements. We may design the algorithm for finding start and end index of an element in…

How to setup Liquibase in Spring for Multiple DataSources

Introduction In this tutorial I will show you how to setup Liquibase in Spring for multiple datasources. In my previous tutorial I had shown how to setup multiple datadources in Spring Boot application. Here also I am going to create a Spring Boot application to define multiple datasources and will use these datasources into Liquibase. I had created examples using XML…